Developer Docs

Built for Developers

One REST API. Every Armenian processor. Go live in 5 minutes.

REST + JSON HMAC Signed JS SDK
REST API
JSON request / response
JS SDK
Inline, modal, redirect
Webhooks
HMAC-SHA256 signed
OpenAPI
Auto-generated docs
Quick Start

Four steps to go live

1

Register and get your API key

Create an account, verify your email, and generate an API key from the dashboard. The key is shown once — store it securely.

auth-header
# Your API key header
X-Paynet-Key: pk_live_a1b2c3d4e5f6...
2

Create a payment via API

POST to /api/v1/payments with your order details. Receive a checkout_url in response.

create-payment.sh
curl -X POST https://paynet.am/api/v1/payments \
  -H "X-Paynet-Key: pk_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 500000,
    "currency": "AMD",
    "order_id": "ORD-2024-001",
    "processor": "idram",
    "domain": "shop.am",
    "return_url": "https://shop.am/thanks",
    "callback_url": "https://shop.am/webhooks/paynet"
  }'
3

Redirect customer to checkout

Use the checkout_url from the response to redirect, or embed inline with the JS SDK.

Response · 201 Created
response.json
{
  "uuid": "018e7b2c-...",
  "checkout_url": "https://paynet.am/pay/018e7b2c-...",
  "status": "pending"
}
4

Receive webhook on completion

Paynet sends a signed webhook to your callback_url when the payment status changes. Verify the HMAC-SHA256 signature and update your order.

REST API

Create payments with a single request

Send amount, currency, processor, and your callback URL. We handle processor-specific protocols, credential injection, and callback verification automatically.

JSON request / response
API key auth (SHA-256 hashed)
Auto-generated OpenAPI docs
Idempotent requests via order_id
UUID-based transaction references
View full API reference
create-payment.sh
# Create a payment
curl -X POST https://paynet.am/api/v1/payments \
  -H "X-Paynet-Key: pk_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 500000,
    "currency": "AMD",
    "order_id": "ORD-2024-001",
    "processor": "idram",
    "domain": "shop.am",
    "return_url": "https://shop.am/thanks",
    "callback_url": "https://shop.am/webhooks/paynet"
  }'

# Response: 201 Created
{
  "uuid": "018e7b2c-...",
  "checkout_url": "https://paynet.am/pay/018e7b2c-...",
  "status": "pending"
}
Webhooks

Real-time payment notifications

Paynet sends signed webhook payloads to your endpoint whenever a payment status changes. Automatic retry with exponential backoff ensures delivery.

HMAC-SHA256 signed payloads
Automatic retry with backoff
Delivery logs in dashboard
Idempotent delivery IDs

Verify the X-Paynet-Signature header using HMAC-SHA256 with your webhook secret.

webhook-payload.sh
# Webhook delivery
POST https://shop.am/webhooks/paynet
X-Paynet-Signature: sha256=abc123...
X-Paynet-Delivery: dlv_018e7b2c...

{
  "event": "payment.completed",
  "transaction": {
    "uuid": "018e7b2c-...",
    "order_id": "ORD-2024-001",
    "amount": 500000,
    "currency": "AMD",
    "status": "completed",
    "processor": "idram"
  }
}
Test mode

Build against a full sandbox

Every account has test API keys (prefixed with a test marker). Payments created with a test key run through a fake processor — no real money moves, no live subscription required. Switch your dashboard transactions to the Test tab to see them.

Separate test API keys
Fake processor — instant results
Magic card numbers for each outcome
Live/Test toggle in dashboard
Magic test cards
# Approved payment
4111 1111 1111 1111
# Declined by issuer
4000 0000 0000 0002
# Insufficient funds
4000 0000 0000 0069
# Processor timeout
4000 0000 0000 0119
JavaScript SDK

Embed checkout in your site

Load our lightweight JS SDK and open the checkout as an inline embed, modal overlay, or full-page redirect. Three modes, one script tag.

Inline
Embed in a container div on your page
Modal
Overlay popup without leaving the page
Redirect
Full-page redirect to hosted checkout
checkout.js
<!-- Load the SDK -->
<script src="https://paynet.am/sdk/v1/paynet.js">
</script>

<!-- Container for inline mode -->
<div id="paynet-container"></div>

<script>
Paynet.open({
  checkoutUrl: "{{ checkout_url }}",
  mode: "inline",
  container: "#paynet-container",
  onSuccess: function(data) {
    console.log("Paid:", data.order_id);
  },
  onError: function(error) {
    console.error("Failed:", error.message);
  }
});
</script>
Start building

Ready to integrate?

Get your API key and start accepting payments in under 5 minutes.