/api/v3/paymentsIdempotency-Key requiredCreate a payment
The 201 response contains payment_url and expires_at. Take the customer to payment_url; the payment page is valid for 24 hours. If 409 / 9000039 is returned, repeat the same request with the same Idempotency-Key.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
amount | string | Required | Positive amount, as a fixed-scale decimal string with 2 decimals (e.g. "250.00"), in currency_code. It must be within the payment limits of your account (checked in USD at the current rate after conversion; view your limits on the panel’s API Key & Integration page); otherwise the request returns 422 9000005. |
currency_code | string | Required | Source currency.USDEURAEDTRY |
merchant_reference | string | null | Optional | Your own order reference (at most 64 characters). Unique per account and environment: a reference cannot be reused, not even for an expired payment (409 9000007). Optional.maxLength 64 |
webhook_url | string | null | Optional | https:// URL that receives the signed notifications (payment.paid, payment.refunded, payment.failed). The host must resolve in DNS to a public address (no private or reserved IP, no localhost), the URL is at most 500 characters and must not contain a user name or password. Optional: when omitted, the webhook URL saved in the panel for the environment of your signing key is used; if none is saved, no notification is sent.maxLength 500 |
merchant_name | string | null | Optional | Name shown on the payment screen. Optional; defaults to Hesap <account number> (your 6-digit account number). A value longer than 120 characters is truncated, not rejected. |
return_url | string · uri | null | Optional | Optional return_url (up to 2048 characters). Live requires HTTPS; sandbox also accepts HTTP on localhost, 127.0.0.1 or [::1]. No user information, fragment, control characters or whitespace. International host names are normalized to ASCII. Invalid URL: 422 / 9000038. When the payment ends, the result page shows a button that takes the customer to this address with code, status and, if you sent one, merchant_reference added to the query; there is no automatic redirect. Keep it unchanged when retrying with the same Idempotency-Key.maxLength 2048 |
Request body · Example
{
"amount": "10.00",
"currency_code": "USD",
"merchant_reference": "INV-104",
"merchant_name": "Test Shop",
"return_url": "https://shop.example.invalid/return?basket=104"
}limits holds currency_code, min_amount and max_amount (null: no upper limit). The amounts below are examples, not your limits.
HTTP 422 / 9000005
{
"type": "https://www.cryptoavans.com/errors/9000005",
"title": "Invalid amount",
"status": 422,
"code": "9000005",
"correlation_id": "example",
"detail": "Amount outside the account limits.",
"limits": {
"currency_code": "USD",
"min_amount": "25.00",
"max_amount": null
}
}Response · 201
Payment created. Returns 200 instead when replayed with the same Idempotency-Key.
Payment
| Field | Type | Description |
|---|---|---|
code | string | Short payment code (4–16 lowercase chars). |
merchant_reference | string | null | Your order reference, echoed back. |
status | string | Payment lifecycle status: created until the customer pays, then paid; expired when the link lapses unpaid.createdpaidexpired |
amount | string | Gross amount, as a fixed-scale decimal string with 2 decimals, in currency_code. |
currency_code | string | Source currency of this payment; read the returned value rather than assuming the example currency.USDEURAEDTRY |
environment | string | Environment this payment belongs to.sandboxlive |
payment_url | string | Take the customer to the returned payment_url as a normal page (top-level navigation); do not build or change the address yourself. The page cannot be embedded in an iframe. No card data is sent to this API. |
created_at | string · date-time | Creation time (UTC, ISO-8601). |
expires_at | string · date-time | UTC. The payment page is valid for 24 hours after creation. Create a new payment after expiry; there is no renewal endpoint. Verify payment with GET /api/v3/payments/{code} or a signed webhook; the customer’s return to your site is informational. |
paid_at | string · date-time | null | When it was paid, or null. |
payment_url_kind | string | Always platform (our payment page). The field is kept for existing integrations; provider_hosted is no longer returned.platformprovider_hosted |
card | MerchantCardSummary | null | Card evidence from the successful paid attempt; null until paid or when unavailable. |
failure | PaymentFailureSummary | null | Latest failed attempt while unpaid, otherwise null. Non-terminal: the payment may still be paid until expires_at. attempt_count counts failed attempts across retries. |
Response · Example
{
"code": "a1b2c3d4",
"merchant_reference": "INV-104",
"status": "created",
"amount": "10.00",
"currency_code": "USD",
"environment": "live",
"payment_url": "https://pay.example.com/l/a1b2c3d4",
"payment_url_kind": "platform",
"created_at": "2026-10-05T12:00:00Z",
"expires_at": "2026-10-06T12:00:00Z",
"paid_at": null,
"card": null,
"failure": null
}Other responses
200Idempotent replay: the original payment is returned; no second payment is created.422Amount outside the account limits (9000005, including conversion below 0.01 or beyond capacity) includes limits in the account base currency. Sandbox uses the same validation. Other validation errors may omit limits.