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, add your domain and create an API key from the dashboard. The key is shown once - store it securely. Test keys work immediately; live keys and live payments need business verification.

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

Create a payment via API

POST to /api/v1/payments with the amount, your order id and a return URL. Receive a checkout_url in response. Amounts are whole AMD.

create-payment.sh
curl -X POST https://paynet.am/api/v1/payments \
  -H "X-Paynet-Key: sk_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 15000,
    "order_id": "ORD-2024-001",
    "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 the amount, your order id and a return URL; the buyer picks a payment method on the hosted checkout. Name a processor only when you want to pre-select one. We handle each provider's protocol, credentials and callback verification.

JSON request / response
API key auth (SHA-256 hashed)
Auto-generated OpenAPI docs
Idempotent requests via the Idempotency-Key header (24-hour window)
UUID-based transaction references
View full API reference OpenAPI spec (JSON) for Postman or codegen AI prompt (llms.txt): paste it into ChatGPT, Claude or Cursor and let it build the integration Postman collection (also imports into Insomnia and Bruno): every request drafted, the key as one variable
create-payment.sh
# Create a payment
curl -X POST https://paynet.am/api/v1/payments \
  -H "X-Paynet-Key: sk_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 15000,
    "order_id": "ORD-2024-001",
    "domain": "shop.am",
    "return_url": "https://shop.am/thanks",
    "callback_url": "https://shop.am/webhooks/paynet",
    "processor": "idram"
  }'

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

Real-time payment notifications

Paynet sends a signed webhook to your endpoint whenever a payment reaches a final status, and on refunds. Failed deliveries are retried three times (after 1, 5 and 30 minutes). Treat it as a nudge: read the payment back before you act.

HMAC-SHA256 signed payloads
Retried after 1, 5 and 30 minutes
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: 3f1a9c...  # hex HMAC-SHA256 of the raw body, keyed with your webhook secret

{
  "delivery_id": "9b1d6f0e-...",
  "event": "transaction.status.updated",
  "livemode": true,
  "timestamp": 1787400000,
  "transaction": {
    "uuid": "018e7b2c-...",
    "order_id": "ORD-2024-001",
    "status": "completed",
    "amount": 15000,
    "refunded_amount": 0,
    "currency": "AMD",
    "processor": "idram",
    "completed_at": "2026-08-22T10:00:00+00:00"
  },
  "refund": null,
  "receipt": null
}
# Then confirm before you act: GET /api/v1/orders/ORD-2024-001/payment
Test mode

Build against a full sandbox

Create an API key with the Test environment (sk_test_...), or install the Sandbox provider and send "processor": "sandbox" - that also works inside the CMS plugins. Either way no bank is contacted, no money moves and nothing is counted. Test payments show under the Test tab in your dashboard.

Separate test API keys
Fake processor - instant results
Magic card numbers for each outcome
Live/Test toggle in dashboard
Magic test cards
# Approved
4111 1111 1111 1111
# Declined by issuer
4000 0000 0000 0002
# Insufficient funds
4000 0000 0000 0069
# Processor timeout
4000 0000 0000 0119
# 3-D Secure failed
4000 0000 0000 0101
# Amount limit exceeded
4000 0000 0000 0127
# Duplicate transaction
4000 0000 0000 0200
# Transaction expired
4000 0000 0000 0259
# Processor unavailable
4000 0000 0000 0309
# General failure
4000 0000 0000 0341
JavaScript SDK

Embed checkout in your site

Create the payment on your server, then hand the checkout URL to our lightweight JS SDK to open it inline, as a modal overlay, or as a full-page redirect. Three modes, one script tag, and your secret key never leaves your server.

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.