All articles
June 2, 2026 · 2 min read

Integrate Paynet checkout in 15 minutes

A developer walkthrough: create an API key, start a payment, redirect to checkout, and verify the webhook — with test cards so nothing touches real money.

This guide takes you from zero to a working payment in about fifteen minutes. You will create a payment, send the shopper to checkout, and confirm the result from a webhook — all in test mode, so no real money moves.

1. Get a test API key

In your dashboard, create a test API key. Test keys are clearly marked and produce sandbox transactions that run through a fake processor — perfect for development.

2. Create a payment

Send a single request with the amount (in Armenian dram), your order id, and where to return the shopper:

curl https://paynet.am/api/v1/payments \
  -H "X-Paynet-Key: sk_test_..." \
  -d amount=5000 \
  -d currency=AMD \
  -d order_id=ORD-1001 \
  -d return_url=https://shop.am/return \
  -d callback_url=https://shop.am/webhooks/paynet \
  -d processor=arca

The response includes a checkout_url. Redirect the shopper there.

3. Use the magic test cards

On the sandbox checkout you can simulate any outcome with these numbers:

  • 4111 1111 1111 1111 — approved
  • 4000 0000 0000 0002 — declined
  • 4000 0000 0000 0069 — insufficient funds
  • 4000 0000 0000 0119 — processor timeout

4. Verify the webhook

When the payment completes, Paynet POSTs a signed payload to your callback_url:

{ "event": "payment.completed", "livemode": false, "transaction": { "status": "completed", "amount": 5000 } }

Verify the X-Paynet-Signature header (HMAC-SHA256 with your webhook secret) before trusting the body. That signature check is the one step you should never skip.

5. Go live

Swap your test key for a live key, point your store at the live processors, and you are accepting real payments. The same code path you just tested handles production — no rewrite required.