zPayLink

Developers

Connect zPayLink services to your product

Add payments, USDT acceptance and the other zPayLink services you need to your own software, through APIs with signed webhooks and test environments.

Contents

Overview

APIs, status and base URLs

Four zPayLink products have an API for your software. Each is documented here from its source code; the status column says what is open today.

ProductStatusBase URL
zGateTest environment open; limited Mainnet launchhttps://gate.zpaylink.com/staging/api/v1https://gate.zpaylink.com/api/v1
zCheckTest keys onlyhttps://check.zpaylink.com/api/v1
zPayFor merchants onboarded by zPayLinkhttps://pay.zpaylink.com/api/v1
zVoiceFor organizations set up by zPayLinkhttps://voice.zpaylink.com/api/v1

Getting started

From access to your first request

  1. Request access

    Call us to set up your account: zGate merchant accounts and keys are issued by zPayLink; zCheck, zVoice and zPay organizations are created by zPayLink and their admins then create keys in the console (zPay: on the merchant's page, after zPayLink adds your server IP to the access list).

  2. Start in test mode

    Use test keys (zgk_test_, zck_test_) on the test URLs. zGate test payments run on BNB Smart Chain Testnet; zCheck test results are simulated.

  3. Call the API from your server

    Send the key as Authorization: Bearer <key> over HTTPS from your backend. Keys never belong in browsers or mobile apps; the APIs do not allow cross-origin browser calls.

  4. Receive webhooks

    Give zPayLink (zGate) or the console (zCheck, zPay) an HTTPS endpoint, verify every signature and answer 2xx quickly.

  5. Go live

    Switch to live keys where a product is open for live use. The status of each product is listed above and in its reference.

Authentication

Bearer API keys on every API

Every request carries one API key in the Authorization header. Keys are shown once when created, stored only as hashes and scoped; a test key never works in live mode and the reverse.

HTTP
Authorization: Bearer <your API key>
ProductKey formatHow keys are issued
zGatezgk_test_… / zgk_live_…Keys are issued by zPayLink when your merchant account is set up: test keys work only on the test URL, live keys only on production. The full key is shown once; zPayLink stores only a keyed hash. Default scopes: invoices:read, invoices:write, transactions:read, webhooks:write, balance:read; a read-only key has the read scopes only.
zCheckzck_test_…Organization admins and developers create keys in the zCheck console (Developers, API keys). The key is shown once; rotation keeps the old key valid for a grace period (24 hours by default, up to 7 days). Scopes: verifications:read, verifications:write (both by default) and verifications:submit for server-to-server uploads.
zPayzpm_live_… (legacy zpm_test_…)An organization admin creates keys in the zPay dashboard on the merchant's page (Merchants, the merchant, API keys, Create key). Every new key is a standard key (zpm_live_), shown once and stored only as a SHA-256 hash. Optional IP allowlist (up to 20 addresses or CIDR ranges) and expiry. Rotation issues a new key and keeps the old one valid for a grace period (24 hours by default, 0 to 168). A key works only while its merchant is active. Scopes: payment_requests:write, payment_requests:read, rates:read.
zVoicezvk_live_… / zvk_test_…Organization owners and admins create keys in the zVoice console (Developers, API keys) with scopes: call_requests:read, call_requests:write, comments:write, agents:read, recordings:read, qc:read, commissions:read. Shown once, up to 20 active keys per organization.

Products

What each product offers developers

Products without an API for third-party software

  • zRateThe rates page and widget are for viewing; there is no API with keys, limits or a stability commitment.API not available
  • zTraderConnects your MetaTrader 5 terminal through the zTrader bridge with a key from the console; not an API for third-party software.API not available
  • zPulseIts Expert Advisors report to zPulse with a key from the console; not an API for third-party software.API not available
  • zWatchIn development: no software and no API yet. In DevelopmentAPI not available

API reference

Endpoints

JSON over HTTPS. Examples show the main fields with fictional values; responses can contain more fields. Placeholders such as 0xDEPOSIT_ADDRESS stand for real values.

zGate APITest environment open; limited Mainnet launch

USDT (BEP-20) payments on BNB Smart Chain: create an invoice, show its unique deposit address, hosted page or payment link, and receive signed webhooks as the payment is detected, confirmed and settled.

The test environment on BNB Smart Chain Testnet is open to merchants with a key. On Mainnet, invoices are accepted only within a small, operator-set limit per merchant while the launch is limited. Merchant balance withdrawals, sweeps and refunds are not enabled.

Base URLs
https://gate.zpaylink.com/staging/api/v1Test (BNB Smart Chain Testnet, chain 97)https://gate.zpaylink.com/api/v1Production (BNB Smart Chain, chain 56)
Authentication
Authorization: Bearer <key> zgk_test_… / zgk_live_…
Issuing keys
Keys are issued by zPayLink when your merchant account is set up: test keys work only on the test URL, live keys only on production. The full key is shown once; zPayLink stores only a keyed hash. Default scopes: invoices:read, invoices:write, transactions:read, webhooks:write, balance:read; a read-only key has the read scopes only.
Idempotency
POST /invoices accepts an optional Idempotency-Key header (1 to 128 characters: letters, digits and . _ : -), unique per merchant and kept for the life of the invoice. The same key with the same body returns 200 with the current invoice and Idempotent-Replayed: true; the same key with a different body returns 409 idempotency_conflict.
Rate limits
300 requests per minute per key and 60 invoice creations per minute per key; 600 requests per minute per IP before authentication and 30 failed authentications per minute per IP. Responses carry RateLimit-Limit and RateLimit-Remaining; a 429 carries Retry-After. The edge also limits each IP to 20 requests per second (that 429 is a plain page, not JSON).

Developer downloads

Kit statusTest environment open; limited Mainnet launch

Everything to integrate offline: give the kit to your team or AI coding assistant. Technical documents are in English.

Endpoints of this API
MethodPathEndpoint
POST/invoicesCreate an invoice
GET/invoices/{id}Retrieve an invoice
GET/invoicesList invoices
GET/transactionsList transactions
GET/networkNetwork status
POST/webhooks/testSend a test webhook
GET/eventsList events
POST/events/{id}/redeliverRedeliver an event

POST/invoicesCreate an invoice

Creates a USDT invoice with its own deposit address. Unknown body fields are rejected. Amounts are decimal strings (up to 18 decimals); the default range is 1 to 100000 USDT and merchant or launch limits can be lower.

Scope
invoices:write
Idempotency-Key
optional header
Response
201 Created
Body
ParameterTypeRequiredDescription
merchant_order_idstringyesYour order reference: 1 to 64 characters, letters, digits and . _ : -
amountstringyesDecimal string such as "25.00"; no sign or exponent
assetstringyesMust be "USDT"
networkstringyes"bsc-testnet" on the test URL, "bsc" on production
expires_in_minutesinteger5 to 1440; default set by zPayLink (30)
descriptionstring | nullUp to 255 characters, no control characters
metadataobject | nullYour data, up to 4096 bytes as JSON and 4 levels deep
Request
cURL
curl -X POST https://gate.zpaylink.com/staging/api/v1/invoices \
  -H "Authorization: Bearer $ZGATE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"merchant_order_id":"ORDER-1001","amount":"25.00","asset":"USDT","network":"bsc-testnet","description":"Order 1001","metadata":{"customer_ref":"C-77"}}'
Node.js
const res = await fetch('https://gate.zpaylink.com/staging/api/v1/invoices', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${process.env.ZGATE_API_KEY}`,
    'Idempotency-Key': crypto.randomUUID(),
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "merchant_order_id": "ORDER-1001",
    "amount": "25.00",
    "asset": "USDT",
    "network": "bsc-testnet",
    "description": "Order 1001",
    "metadata": {
      "customer_ref": "C-77"
    }
  })
});
const data = await res.json();
Response
JSON201 Created
{
  "id": "inv_7k2m9qx4r8t3w6y5p2n4",
  "object": "invoice",
  "merchant_id": "mch_9w4k7m2x5q8r3t6y2p4n",
  "merchant_order_id": "ORDER-1001",
  "status": "pending",
  "late": false,
  "final": false,
  "network": "bsc-testnet",
  "chain_id": 97,
  "asset": "USDT",
  "token_contract": "0xTOKEN_CONTRACT",
  "token_decimals": 18,
  "amount": "25.00",
  "amount_raw": "25000000000000000000",
  "amount_received": "0.00",
  "amount_received_raw": "0",
  "amount_pending": "0.00",
  "amount_pending_raw": "0",
  "deposit_address": "0xDEPOSIT_ADDRESS",
  "required_confirmations": 15,
  "payment_uri": "ethereum:0xTOKEN_CONTRACT@97/transfer?address=0xDEPOSIT_ADDRESS&uint256=25000000000000000000",
  "hosted_url": "https://gate.zpaylink.com/staging/pay/inv_7k2m9qx4r8t3w6y5p2n4",
  "description": "Order 1001",
  "metadata": { "customer_ref": "C-77" },
  "created_at": "2026-10-15T09:00:00.000Z",
  "expires_at": "2026-10-15T09:30:00.000Z",
  "updated_at": "2026-10-15T09:00:00.000Z",
  "detected_at": null,
  "finalized_at": null,
  "expired_at": null
}
Errors
  • 422 invalid_request
  • 422 merchant_limit
  • 409 idempotency_conflict
  • 403 merchant_inactive
  • 503 payments_not_activated
  • 503 wallet_unavailable
  • 429 rate_limited
  • Show the customer hosted_url, or deposit_address with the exact amount, or payment_uri (EIP-681) as a QR code. Each invoice has its own address.
  • Fetch token_contract and required_confirmations from GET /network instead of hard-coding them.

GET/invoices/{id}Retrieve an invoice

Returns the invoice with its on-chain transactions (up to 100, including orphaned ones after a reorganisation). Use it to confirm a status before you fulfil an order.

Scope
invoices:read
Response
200 OK
Path parameters
ParameterTypeRequiredDescription
idstringyesInvoice id (inv_…)
Request
cURL
curl https://gate.zpaylink.com/staging/api/v1/invoices/inv_7k2m9qx4r8t3w6y5p2n4 \
  -H "Authorization: Bearer $ZGATE_API_KEY"
Node.js
const res = await fetch('https://gate.zpaylink.com/staging/api/v1/invoices/inv_7k2m9qx4r8t3w6y5p2n4', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${process.env.ZGATE_API_KEY}`
  }
});
const data = await res.json();
Response
JSON200 OK
{
    "id": "inv_7k2m9qx4r8t3w6y5p2n4",
  "object": "invoice",
  "merchant_id": "mch_9w4k7m2x5q8r3t6y2p4n",
  "merchant_order_id": "ORDER-1001",
  "status": "pending",
  "late": false,
  "final": false,
  "network": "bsc-testnet",
  "chain_id": 97,
  "asset": "USDT",
  "token_contract": "0xTOKEN_CONTRACT",
  "token_decimals": 18,
  "amount": "25.00",
  "amount_raw": "25000000000000000000",
  "amount_received": "0.00",
  "amount_received_raw": "0",
  "amount_pending": "0.00",
  "amount_pending_raw": "0",
  "deposit_address": "0xDEPOSIT_ADDRESS",
  "required_confirmations": 15,
  "payment_uri": "ethereum:0xTOKEN_CONTRACT@97/transfer?address=0xDEPOSIT_ADDRESS&uint256=25000000000000000000",
  "hosted_url": "https://gate.zpaylink.com/staging/pay/inv_7k2m9qx4r8t3w6y5p2n4",
  "description": "Order 1001",
  "metadata": { "customer_ref": "C-77" },
  "created_at": "2026-10-15T09:00:00.000Z",
  "expires_at": "2026-10-15T09:30:00.000Z",
  "updated_at": "2026-10-15T09:00:00.000Z",
  "detected_at": null,
  "finalized_at": null,
  "expired_at": null,
  "transactions": [
    {
      "id": "trf_3n8p2q5r9t4w7y2k6m3x",
      "object": "transaction",
      "invoice_id": "inv_7k2m9qx4r8t3w6y5p2n4",
      "network": "bsc-testnet",
      "tx_hash": "0xTRANSACTION_HASH",
      "log_index": 4,
      "block_number": 51234567,
      "block_hash": "0xBLOCK_HASH",
      "token_contract": "0xTOKEN_CONTRACT",
      "from": "0xPAYER_ADDRESS",
      "to": "0xDEPOSIT_ADDRESS",
      "amount": "25.00",
      "amount_raw": "25000000000000000000",
      "status": "confirmed",
      "confirmations": 15,
      "after_expiry": false,
      "detected_at": "2026-10-15T09:04:10.000Z",
      "confirmed_at": "2026-10-15T09:05:00.000Z",
      "orphaned_at": null,
      "explorer_url": "https://testnet.bscscan.com/tx/0xTRANSACTION_HASH"
    }
  ]
}
Errors
  • 404 not_found
  • 401 unauthorized

GET/invoicesList invoices

Newest first, with cursor pagination: pass the last id of a page as starting_after to get the next one.

Scope
invoices:read
Response
200 OK
Query parameters
ParameterTypeRequiredDescription
statusstringpending, detected, confirming, paid, underpaid, overpaid, expired or failed
merchant_order_idstringExact match
limitinteger1 to 100, default 20
starting_afterstringAn invoice id
Request
cURL
curl https://gate.zpaylink.com/staging/api/v1/invoices \
  -H "Authorization: Bearer $ZGATE_API_KEY"
Node.js
const res = await fetch('https://gate.zpaylink.com/staging/api/v1/invoices', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${process.env.ZGATE_API_KEY}`
  }
});
const data = await res.json();
Response
JSON200 OK
{
  "object": "list",
  "data": [
    { "id": "inv_7k2m9qx4r8t3w6y5p2n4", "object": "invoice", "status": "paid", "amount": "25.00" }
  ],
  "has_more": false
}
Errors
  • 422 invalid_request
  • List items are full invoice objects; the example is shortened.

GET/transactionsList transactions

On-chain transfers to your deposit addresses, newest detected first. Status is seen, confirmed or orphaned.

Scope
transactions:read
Response
200 OK
Query parameters
ParameterTypeRequiredDescription
invoice_idstringOnly this invoice
limitinteger1 to 100, default 20
starting_afterstringA transaction id (trf_…)
Request
cURL
curl https://gate.zpaylink.com/staging/api/v1/transactions \
  -H "Authorization: Bearer $ZGATE_API_KEY"
Node.js
const res = await fetch('https://gate.zpaylink.com/staging/api/v1/transactions', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${process.env.ZGATE_API_KEY}`
  }
});
const data = await res.json();
Response
JSON200 OK
{
  "object": "list",
  "data": [
    {
      "id": "trf_3n8p2q5r9t4w7y2k6m3x",
      "object": "transaction",
      "invoice_id": "inv_7k2m9qx4r8t3w6y5p2n4",
      "network": "bsc-testnet",
      "tx_hash": "0xTRANSACTION_HASH",
      "log_index": 4,
      "block_number": 51234567,
      "block_hash": "0xBLOCK_HASH",
      "token_contract": "0xTOKEN_CONTRACT",
      "from": "0xPAYER_ADDRESS",
      "to": "0xDEPOSIT_ADDRESS",
      "amount": "25.00",
      "amount_raw": "25000000000000000000",
      "status": "confirmed",
      "confirmations": 15,
      "after_expiry": false,
      "detected_at": "2026-10-15T09:04:10.000Z",
      "confirmed_at": "2026-10-15T09:05:00.000Z",
      "orphaned_at": null,
      "explorer_url": "https://testnet.bscscan.com/tx/0xTRANSACTION_HASH"
    }
  ],
  "has_more": false
}
Errors
  • 422 invalid_request

GET/networkNetwork status

Token contract, confirmations required and the health of the chain connection (ok, degraded, down, misconfigured or not_started). Works with any valid key.

Scope
Any valid key
Response
200 OK
Request
cURL
curl https://gate.zpaylink.com/staging/api/v1/network \
  -H "Authorization: Bearer $ZGATE_API_KEY"
Node.js
const res = await fetch('https://gate.zpaylink.com/staging/api/v1/network', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${process.env.ZGATE_API_KEY}`
  }
});
const data = await res.json();
Response
JSON200 OK
{
  "network": "bsc-testnet",
  "chain_id": 97,
  "asset": "USDT",
  "token_contract": "0xTOKEN_CONTRACT",
  "required_confirmations": 15,
  "status": "ok"
}

POST/webhooks/testSend a test webhook

Queues a signed webhook.test event to every active endpoint of your account (10 per minute per key).

Scope
webhooks:write
Response
202 Accepted
Request
cURL
curl -X POST https://gate.zpaylink.com/staging/api/v1/webhooks/test \
  -H "Authorization: Bearer $ZGATE_API_KEY"
Node.js
const res = await fetch('https://gate.zpaylink.com/staging/api/v1/webhooks/test', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${process.env.ZGATE_API_KEY}`
  }
});
const data = await res.json();
Response
JSON202 Accepted
{
  "object": "event",
  "id": "evt_5q2w8e4r7t3y6u9p2k4m",
  "type": "webhook.test",
  "deliveries_queued": 1
}
Errors
  • 403 insufficient_scope
  • 429 rate_limited

GET/eventsList events

The webhook events of your account with the exact signed payload and the state of every delivery. Use it to reconcile after downtime.

Scope
invoices:read
Response
200 OK
Query parameters
ParameterTypeRequiredDescription
invoice_idstringOnly events of this invoice
typestringAn event type such as invoice.paid
limitinteger1 to 100, default 20
starting_afterstringAn event id
Request
cURL
curl https://gate.zpaylink.com/staging/api/v1/events \
  -H "Authorization: Bearer $ZGATE_API_KEY"
Node.js
const res = await fetch('https://gate.zpaylink.com/staging/api/v1/events', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${process.env.ZGATE_API_KEY}`
  }
});
const data = await res.json();
Response
JSON200 OK
{
  "object": "list",
  "data": [
    {
      "id": "evt_8m3k6p2q9r4t7w2y5x3n",
      "object": "event",
      "type": "invoice.paid",
      "invoice_id": "inv_7k2m9qx4r8t3w6y5p2n4",
      "created_at": "2026-10-15T09:05:01.000Z",
      "payload": { "id": "evt_8m3k6p2q9r4t7w2y5x3n", "object": "event", "type": "invoice.paid" },
      "deliveries": [
        { "url": "https://shop.example.com/webhooks/zgate", "status": "delivered", "attempts": 1, "last_http_status": 200, "last_error": null, "last_attempt_at": "2026-10-15T09:05:02.000Z", "delivered_at": "2026-10-15T09:05:02.000Z", "next_attempt_at": null }
      ]
    }
  ],
  "has_more": false
}
  • payload is the full signed body; the example is shortened.

POST/events/{id}/redeliverRedeliver an event

Sends an event again now to your active endpoints, with the same event id (10 per minute per key). The attempt counter is not reset.

Scope
webhooks:write
Response
202 Accepted
Path parameters
ParameterTypeRequiredDescription
idstringyesEvent id (evt_…)
Request
cURL
curl -X POST https://gate.zpaylink.com/staging/api/v1/events/evt_8m3k6p2q9r4t7w2y5x3n/redeliver \
  -H "Authorization: Bearer $ZGATE_API_KEY"
Node.js
const res = await fetch('https://gate.zpaylink.com/staging/api/v1/events/evt_8m3k6p2q9r4t7w2y5x3n/redeliver', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${process.env.ZGATE_API_KEY}`
  }
});
const data = await res.json();
Response
JSON202 Accepted
{
  "object": "event",
  "id": "evt_8m3k6p2q9r4t7w2y5x3n",
  "type": "invoice.paid",
  "deliveries_queued": 1
}
Errors
  • 404 not_found
  • 429 rate_limited

zCheck APITest keys only

Identity verification (KYC): create a verification, send your user to the hosted page (or upload documents server to server), then read the checks and the decision and receive signed webhooks.

zCheck accepts test keys only while it is in development: live verification is switched off. With the default policy no verification is approved automatically; every case ends in manual review. Results in test mode are simulated (simulated: true). OCR, face comparison and liveness need providers that zPayLink connects per organization, and there is no government database check.

Base URLs
https://check.zpaylink.com/api/v1Test mode (test keys)
Authentication
Authorization: Bearer <key> zck_test_…
Issuing keys
Organization admins and developers create keys in the zCheck console (Developers, API keys). The key is shown once; rotation keeps the old key valid for a grace period (24 hours by default, up to 7 days). Scopes: verifications:read, verifications:write (both by default) and verifications:submit for server-to-server uploads.
Idempotency
Create, cancel and resubmission accept an Idempotency-Key header (8 to 100 characters: letters, digits and _ - : .), scoped to your organization and mode and kept for 2 days. The same request replays the stored response; a different body returns 409 idempotency_conflict, and a request still in flight returns 409 idempotency_in_progress.
Rate limits
300 requests per minute per key (429 rate_limited with Retry-After: 60). The edge limits each IP to 20 requests per second on the API and 10 per second on uploads.
Endpoints of this API
MethodPathEndpoint
POST/verificationsCreate a verification
GET/verificationsList verifications
GET/verifications/{id}Retrieve a verification
GET/verifications/{id}/statusVerification status
GET/verifications/{id}/resultVerification result
GET/verifications/{id}/eventsVerification timeline
POST/verifications/{id}/cancelCancel a verification
POST/verifications/{id}/resubmissionRequest resubmission
POST/verifications/{id}/sessionIssue a new link
POST/verifications/{id}/consentServer-to-server: record consent
PUT/verifications/{id}/customerServer-to-server: customer details
POST/verifications/{id}/files/{kind}Server-to-server: upload an image
POST/verifications/{id}/submitServer-to-server: submit
GET/eventsList webhook events

POST/verificationsCreate a verification

Creates a verification and returns a one-time link to the hosted page. Every field is optional; unknown fields are rejected.

Scope
verifications:write
Idempotency-Key
optional header
Response
201 Created
Body
ParameterTypeRequiredDescription
external_customer_idstringYour user id, up to 64 characters
external_referencestringYour reference, up to 100 characters
document_typesstring[]Subset of national_id_card, birth_certificate, passport, driving_license allowed by your policy
redirect_urlstringHTTPS URL for the return button, up to 500 characters
localestring"fa" (default) or "en"
expires_in_minutesinteger10 to 10080, capped by the policy (default 1440)
customerobjectfirst_name, last_name (1 to 60) and national_id (valid 10-digit Iranian ID); prefilled values cannot be changed by the user
metadataobjectUp to 4 KB; values string (200), number or boolean
sandbox.scenariostringTest keys only: approve, name_mismatch, nid_mismatch, fuzzy_name, ocr_unreadable, face_mismatch, face_borderline, liveness_spoof, document_expired, suspicious_document, provider_error, provider_timeout
Request
cURL
curl -X POST https://check.zpaylink.com/api/v1/verifications \
  -H "Authorization: Bearer $ZCHECK_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"external_customer_id":"user-2041","external_reference":"onboarding-2041","document_types":["national_id_card","passport"],"redirect_url":"https://app.example.com/kyc/done","locale":"fa","metadata":{"plan":"standard"},"sandbox":{"scenario":"approve"}}'
Node.js
const res = await fetch('https://check.zpaylink.com/api/v1/verifications', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${process.env.ZCHECK_API_KEY}`,
    'Idempotency-Key': crypto.randomUUID(),
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "external_customer_id": "user-2041",
    "external_reference": "onboarding-2041",
    "document_types": [
      "national_id_card",
      "passport"
    ],
    "redirect_url": "https://app.example.com/kyc/done",
    "locale": "fa",
    "metadata": {
      "plan": "standard"
    },
    "sandbox": {
      "scenario": "approve"
    }
  })
});
const data = await res.json();
Response
JSON201 Created
{
  "id": "6f1c2a9e-3b47-4d1a-9c55-2e8b7a0d4f13",
  "reference": "ZC-7K2M9QX4",
  "external_customer_id": "user-2041",
  "external_reference": "onboarding-2041",
  "mode": "test",
  "status": "CREATED",
  "attempt": 1,
  "document_type": null,
  "simulated": true,
  "decision": null,
  "created_at": "2026-10-15T09:00:00.000Z",
  "updated_at": "2026-10-15T09:00:00.000Z",
  "completed_at": null,
  "submitted_at": null,
  "decided_at": null,
  "allowed_document_types": ["national_id_card", "passport"],
  "liveness_mode": "selfie",
  "session_expires_at": "2026-10-16T09:00:00.000Z",
  "max_attempts": 3,
  "policy_version": 1,
  "customer": null,
  "metadata": { "plan": "standard" },
  "verification_url": "https://check.zpaylink.com/v/HOSTED_TOKEN"
}
Errors
  • 422 validation_error
  • 403 live_processing_disabled
  • 409 idempotency_conflict
  • 409 idempotency_in_progress
  • verification_url is returned on creation only (null on an idempotent replay); POST /verifications/{id}/session issues a new link.

GET/verificationsList verifications

Newest first with cursor pagination (next_cursor).

Scope
verifications:read
Response
200 OK
Query parameters
ParameterTypeRequiredDescription
statusstringComma-separated statuses, e.g. MANUAL_REVIEW,APPROVED
external_customer_idstringExact match
external_referencestringExact match
created_from / created_toISO dateCreation time range
limitinteger1 to 100, default 25
cursorstringnext_cursor of the previous page
Request
cURL
curl https://check.zpaylink.com/api/v1/verifications \
  -H "Authorization: Bearer $ZCHECK_API_KEY"
Node.js
const res = await fetch('https://check.zpaylink.com/api/v1/verifications', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${process.env.ZCHECK_API_KEY}`
  }
});
const data = await res.json();
Response
JSON200 OK
{
  "data": [
    { "id": "6f1c2a9e-3b47-4d1a-9c55-2e8b7a0d4f13", "reference": "ZC-7K2M9QX4", "status": "MANUAL_REVIEW", "mode": "test" }
  ],
  "has_more": false,
  "next_cursor": null
}
Errors
  • 422 validation_error
  • List items are full verification objects; the example is shortened.

GET/verifications/{id}Retrieve a verification

Status, decision summary, configuration and the masked customer. Never contains images or the full national ID.

Scope
verifications:read
Response
200 OK
Path parameters
ParameterTypeRequiredDescription
iduuidyesVerification id
Request
cURL
curl https://check.zpaylink.com/api/v1/verifications/6f1c2a9e-3b47-4d1a-9c55-2e8b7a0d4f13 \
  -H "Authorization: Bearer $ZCHECK_API_KEY"
Node.js
const res = await fetch('https://check.zpaylink.com/api/v1/verifications/6f1c2a9e-3b47-4d1a-9c55-2e8b7a0d4f13', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${process.env.ZCHECK_API_KEY}`
  }
});
const data = await res.json();
Response
JSON200 OK
{
  "id": "6f1c2a9e-3b47-4d1a-9c55-2e8b7a0d4f13",
  "reference": "ZC-7K2M9QX4",
  "external_customer_id": "user-2041",
  "external_reference": "onboarding-2041",
  "mode": "test",
  "status": "CREATED",
  "attempt": 1,
  "document_type": null,
  "simulated": true,
  "decision": null,
  "created_at": "2026-10-15T09:00:00.000Z",
  "updated_at": "2026-10-15T09:00:00.000Z",
  "completed_at": null,
  "submitted_at": null,
  "decided_at": null,
  "allowed_document_types": ["national_id_card", "passport"],
  "liveness_mode": "selfie",
  "session_expires_at": "2026-10-16T09:00:00.000Z",
  "max_attempts": 3,
  "policy_version": 1,
  "customer": null,
  "metadata": { "plan": "standard" }
}
Errors
  • 404 not_found

GET/verifications/{id}/statusVerification status

A light status read for polling.

Scope
verifications:read
Response
200 OK
Path parameters
ParameterTypeRequiredDescription
iduuidyesVerification id
Request
cURL
curl https://check.zpaylink.com/api/v1/verifications/6f1c2a9e-3b47-4d1a-9c55-2e8b7a0d4f13/status \
  -H "Authorization: Bearer $ZCHECK_API_KEY"
Node.js
const res = await fetch('https://check.zpaylink.com/api/v1/verifications/6f1c2a9e-3b47-4d1a-9c55-2e8b7a0d4f13/status', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${process.env.ZCHECK_API_KEY}`
  }
});
const data = await res.json();
Response
JSON200 OK
{
  "id": "6f1c2a9e-3b47-4d1a-9c55-2e8b7a0d4f13",
  "reference": "ZC-7K2M9QX4",
  "status": "PROCESSING",
  "attempt": 1,
  "updated_at": "2026-10-15T09:12:40.000Z"
}
Errors
  • 404 not_found

GET/verifications/{id}/resultVerification result

The decision and every check: document_quality, ocr_extraction, first_name_match, last_name_match, national_id_match, face_match, liveness, presentation_attack and document_authenticity. A check is pass, fail, suspicious, inconclusive, unavailable, not_required or error.

Scope
verifications:read
Response
200 OK
Path parameters
ParameterTypeRequiredDescription
iduuidyesVerification id
Request
cURL
curl https://check.zpaylink.com/api/v1/verifications/6f1c2a9e-3b47-4d1a-9c55-2e8b7a0d4f13/result \
  -H "Authorization: Bearer $ZCHECK_API_KEY"
Node.js
const res = await fetch('https://check.zpaylink.com/api/v1/verifications/6f1c2a9e-3b47-4d1a-9c55-2e8b7a0d4f13/result', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${process.env.ZCHECK_API_KEY}`
  }
});
const data = await res.json();
Response
JSON200 OK
{
  "id": "6f1c2a9e-3b47-4d1a-9c55-2e8b7a0d4f13",
  "reference": "ZC-7K2M9QX4",
  "status": "MANUAL_REVIEW",
  "final": false,
  "simulated": true,
  "attempt": 1,
  "policy_version": 1,
  "decision": {
    "outcome": "MANUAL_REVIEW",
    "automatic": true,
    "reasons": [{ "code": "auto_approve_disabled", "message": "All checks passed. Automatic approval is off in this policy: a reviewer decides." }],
    "manual_reason": null,
    "engine_version": "zcheck-decision-1",
    "decided_at": "2026-10-15T09:13:05.000Z"
  },
  "checks": {
    "national_id_match": { "status": "pass", "score": null, "threshold": null, "raw_score": null, "calibrated": false, "provider": "Simulated (sandbox)", "simulated": true, "reasons": [], "entered_last4": "1234", "extracted_last4": "1234", "match_type": "exact" }
  },
  "providers": ["Simulated (sandbox)"]
}
Errors
  • 404 not_found
  • checks contains one entry per check; the example shows one.

GET/verifications/{id}/eventsVerification timeline

Every step of the verification in order; reviewer names and internal notes are not included.

Scope
verifications:read
Response
200 OK
Path parameters
ParameterTypeRequiredDescription
iduuidyesVerification id
Request
cURL
curl https://check.zpaylink.com/api/v1/verifications/6f1c2a9e-3b47-4d1a-9c55-2e8b7a0d4f13/events \
  -H "Authorization: Bearer $ZCHECK_API_KEY"
Node.js
const res = await fetch('https://check.zpaylink.com/api/v1/verifications/6f1c2a9e-3b47-4d1a-9c55-2e8b7a0d4f13/events', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${process.env.ZCHECK_API_KEY}`
  }
});
const data = await res.json();
Response
JSON200 OK
{
  "data": [
    { "type": "created", "at": "2026-10-15T09:00:00.000Z", "actor": "api" },
    { "type": "submitted", "at": "2026-10-15T09:12:40.000Z", "actor": "customer" },
    { "type": "review_required", "at": "2026-10-15T09:13:05.000Z", "actor": "system" }
  ]
}
Errors
  • 404 not_found

POST/verifications/{id}/cancelCancel a verification

Cancels any verification that is not yet final (APPROVED, REJECTED, EXPIRED or CANCELLED).

Scope
verifications:write
Idempotency-Key
optional header
Response
200 OK
Path parameters
ParameterTypeRequiredDescription
iduuidyesVerification id
Body
ParameterTypeRequiredDescription
reasonstringOptional, up to 300 characters
Request
cURL
curl -X POST https://check.zpaylink.com/api/v1/verifications/6f1c2a9e-3b47-4d1a-9c55-2e8b7a0d4f13/cancel \
  -H "Authorization: Bearer $ZCHECK_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"reason":"User closed the account"}'
Node.js
const res = await fetch('https://check.zpaylink.com/api/v1/verifications/6f1c2a9e-3b47-4d1a-9c55-2e8b7a0d4f13/cancel', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${process.env.ZCHECK_API_KEY}`,
    'Idempotency-Key': crypto.randomUUID(),
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "reason": "User closed the account"
  })
});
const data = await res.json();
Response
JSON200 OK
{ "id": "6f1c2a9e-3b47-4d1a-9c55-2e8b7a0d4f13", "reference": "ZC-7K2M9QX4", "status": "CANCELLED" }
Errors
  • 409 invalid_state
  • 404 not_found
  • Returns the full verification object; the example is shortened.

POST/verifications/{id}/resubmissionRequest resubmission

Asks the user to try again (from MANUAL_REVIEW, REJECTED, ERROR or PROCESSING): a new attempt and a new link. The reason is shown to the user.

Scope
verifications:write
Idempotency-Key
optional header
Response
200 OK
Path parameters
ParameterTypeRequiredDescription
iduuidyesVerification id
Body
ParameterTypeRequiredDescription
reasonstringyesAt least 3 characters
Request
cURL
curl -X POST https://check.zpaylink.com/api/v1/verifications/6f1c2a9e-3b47-4d1a-9c55-2e8b7a0d4f13/resubmission \
  -H "Authorization: Bearer $ZCHECK_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"reason":"The document photo is blurred."}'
Node.js
const res = await fetch('https://check.zpaylink.com/api/v1/verifications/6f1c2a9e-3b47-4d1a-9c55-2e8b7a0d4f13/resubmission', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${process.env.ZCHECK_API_KEY}`,
    'Idempotency-Key': crypto.randomUUID(),
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "reason": "The document photo is blurred."
  })
});
const data = await res.json();
Response
JSON200 OK
{ "id": "6f1c2a9e-3b47-4d1a-9c55-2e8b7a0d4f13", "status": "PENDING_UPLOAD", "attempt": 2, "verification_url": "https://check.zpaylink.com/v/HOSTED_TOKEN" }
Errors
  • 409 invalid_state
  • 409 retry_limit
  • 422 validation_error

POST/verifications/{id}/sessionIssue a new link

A new hosted-page link (the previous one stops working), for CREATED, PENDING_UPLOAD, PENDING_LIVENESS or EXPIRED verifications.

Scope
verifications:write
Response
200 OK
Path parameters
ParameterTypeRequiredDescription
iduuidyesVerification id
Request
cURL
curl -X POST https://check.zpaylink.com/api/v1/verifications/6f1c2a9e-3b47-4d1a-9c55-2e8b7a0d4f13/session \
  -H "Authorization: Bearer $ZCHECK_API_KEY"
Node.js
const res = await fetch('https://check.zpaylink.com/api/v1/verifications/6f1c2a9e-3b47-4d1a-9c55-2e8b7a0d4f13/session', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${process.env.ZCHECK_API_KEY}`
  }
});
const data = await res.json();
Response
JSON200 OK
{
  "verification_url": "https://check.zpaylink.com/v/HOSTED_TOKEN",
  "session_expires_at": "2026-10-16T10:00:00.000Z"
}
Errors
  • 409 invalid_state

PUT/verifications/{id}/customerServer-to-server: customer details

Name, national ID and document type, after consent.

Scope
verifications:submit
Response
200 OK
Path parameters
ParameterTypeRequiredDescription
iduuidyesVerification id
Body
ParameterTypeRequiredDescription
first_namestringyes1 to 60 characters
last_namestringyes1 to 60 characters
national_idstringyesValid 10-digit Iranian national ID
document_typestringOne of the allowed document types
Request
cURL
curl -X PUT https://check.zpaylink.com/api/v1/verifications/6f1c2a9e-3b47-4d1a-9c55-2e8b7a0d4f13/customer \
  -H "Authorization: Bearer $ZCHECK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"first_name":"سارا","last_name":"رضایی","national_id":"0012345679","document_type":"national_id_card"}'
Node.js
const res = await fetch('https://check.zpaylink.com/api/v1/verifications/6f1c2a9e-3b47-4d1a-9c55-2e8b7a0d4f13/customer', {
  method: 'PUT',
  headers: {
    'Authorization': `Bearer ${process.env.ZCHECK_API_KEY}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "first_name": "سارا",
    "last_name": "رضایی",
    "national_id": "0012345679",
    "document_type": "national_id_card"
  })
});
const data = await res.json();
Response
JSON200 OK
{ "ok": true }
Errors
  • 409 consent_required
  • 422 validation_error
  • 409 invalid_state

POST/verifications/{id}/files/{kind}Server-to-server: upload an image

Uploads one image. National ID cards and driving licences need front and back; passports and birth certificates need the front.

Scope
verifications:submit
Response
201 Created
Path parameters
ParameterTypeRequiredDescription
iduuidyesVerification id
kindstringyesfront, back, selfie or liveness
Query parameters
ParameterTypeRequiredDescription
seq / challengestringFor live-capture frames only
Body (binary)

The raw image bytes (the type is detected from the content). Up to 8 MB by default; documents at least 800 px on the short side, selfies 480 px; no animated images.

Request
cURL
curl -X POST https://check.zpaylink.com/api/v1/verifications/6f1c2a9e-3b47-4d1a-9c55-2e8b7a0d4f13/files/front \
  -H "Authorization: Bearer $ZCHECK_API_KEY" \
  -H "Content-Type: application/octet-stream" \
  --data-binary @document-front.jpg
Node.js
import fs from 'node:fs/promises';

const res = await fetch('https://check.zpaylink.com/api/v1/verifications/6f1c2a9e-3b47-4d1a-9c55-2e8b7a0d4f13/files/front', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${process.env.ZCHECK_API_KEY}`,
    'Content-Type': 'application/octet-stream'
  },
  body: await fs.readFile('document-front.jpg')
});
const data = await res.json();
Response
JSON201 Created
{ "ok": true, "kind": "front", "seq": 0, "width": 1600, "height": 1010, "issues": [] }
Errors
  • 409 steps_incomplete
  • 413 file_too_large
  • 415 unsupported_media_type
  • 422 resolution_too_low
  • 422 not_required

POST/verifications/{id}/submitServer-to-server: submit

Starts processing once every required image is uploaded.

Scope
verifications:submit
Response
200 OK
Path parameters
ParameterTypeRequiredDescription
iduuidyesVerification id
Request
cURL
curl -X POST https://check.zpaylink.com/api/v1/verifications/6f1c2a9e-3b47-4d1a-9c55-2e8b7a0d4f13/submit \
  -H "Authorization: Bearer $ZCHECK_API_KEY"
Node.js
const res = await fetch('https://check.zpaylink.com/api/v1/verifications/6f1c2a9e-3b47-4d1a-9c55-2e8b7a0d4f13/submit', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${process.env.ZCHECK_API_KEY}`
  }
});
const data = await res.json();
Response
JSON200 OK
{ "ok": true, "status": "PROCESSING" }
Errors
  • 409 steps_incomplete
  • 422 uploads_incomplete

GET/eventsList webhook events

The events sent to your webhooks, for reconciliation.

Scope
verifications:read
Response
200 OK
Query parameters
ParameterTypeRequiredDescription
typestringOne event type
verification_iduuidOnly events of this verification
starting_afterstringAn event id (evt_…)
limitinteger1 to 100, default 25
Request
cURL
curl https://check.zpaylink.com/api/v1/events \
  -H "Authorization: Bearer $ZCHECK_API_KEY"
Node.js
const res = await fetch('https://check.zpaylink.com/api/v1/events', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${process.env.ZCHECK_API_KEY}`
  }
});
const data = await res.json();
Response
JSON200 OK
{
  "data": [
    { "id": "evt_9f2c4a7e1b3d5f8a0c2e4b6d", "type": "verification.pending_review", "created_at": "2026-10-15T09:13:05.000Z", "data": { "verification": { "id": "6f1c2a9e-3b47-4d1a-9c55-2e8b7a0d4f13", "status": "MANUAL_REVIEW" } } }
  ],
  "has_more": false
}

zPay APIFor merchants onboarded by zPayLink

Rial payments by card-to-card and SHEBA transfer: create a payment request with the card or SHEBA your user pays from, show them the destination account, and zPay matches the incoming deposit to the request, values it in USDT at a locked rate and reports it with a signed deposit.matched webhook. One environment: every new key is a standard key.

The zPay API v1 is open to merchants that zPayLink onboards: zPayLink adds your server's public IP address to the zPay access list, and requests from other addresses are refused with HTTP 401 before they reach the API. Live deposit matching and webhook delivery are switched off in production for now: payment requests made with a standard key stay pending, and webhooks are recorded and held, until zPayLink switches them on. Existing ZPay 1.0 integrations keep working unchanged.

Base URLs
https://pay.zpaylink.com/api/v1One environment; your server IP must be on the zPay access list
Authentication
Authorization: Bearer <key> zpm_live_… (legacy zpm_test_…)
Issuing keys
An organization admin creates keys in the zPay dashboard on the merchant's page (Merchants, the merchant, API keys, Create key). Every new key is a standard key (zpm_live_), shown once and stored only as a SHA-256 hash. Optional IP allowlist (up to 20 addresses or CIDR ranges) and expiry. Rotation issues a new key and keeps the old one valid for a grace period (24 hours by default, 0 to 168). A key works only while its merchant is active. Scopes: payment_requests:write, payment_requests:read, rates:read.
Idempotency
POST /payment-requests accepts an optional Idempotency-Key header (8 to 100 characters: letters, digits and _ - : .), scoped to the merchant and the key's mode. The same key with the same source, client_id and amount_rial returns the original request with 200 and Idempotent-Replayed: true; a different request returns 409 idempotency_conflict. Without the header every call creates a new request.
Rate limits
300 requests per minute per key, in a fixed one-minute window (429 rate_limited with Retry-After: 60). Every response carries an X-Request-Id header; errors repeat it as request_id.

Getting started

  1. Ask zPayLink to onboard you. zPayLink sets up your organization and its bank account and adds your server's public IP address to the zPay access list.

  2. An organization admin creates and activates the merchant in the zPay dashboard and sets its HTTPS callback URL. The 64-character signing secret is shown once: store it on your server.

  3. Create a standard key (zpm_live_) on the merchant's page, ideally with an IP allowlist, and keep it in a secret store.

  4. For each payment, call POST /payment-requests with the payer's card or SHEBA and an Idempotency-Key, and show the returned destination account for payer_window_seconds.

  5. Wait for deposit.matched (verify X-ZPay-Signature-V2, deduplicate on event_id) or poll GET /payment-requests/{ref}; confirm with the API, then credit your user once.

Test and live keys

KeyIssuedRequestsMatching
zpm_live_Every new key (standard key)mode: "live"; a standard key sees only live requestsAgainst real deposits on your organization's bank account, once zPayLink switches live matching on (off today: requests stay pending)
zpm_test_No longer issued; keys created earlier keep workingmode: "test"; a test key sees only test requestsNever against real deposits; POST /sandbox/deposits simulates one (deprecated)

Lifecycle and statuses

StatusMeaning
pendingWaiting for a deposit from the declared source. Show the destination for payer_window_seconds (1 hour by default); the request stays open until expires_at (7 days by default, set by the organization). A live request does not expire while the bank collector is catching up, for at most 7 more days.
matched finalA deposit from the declared source was credited: received amount, USDT values, the locked rate and the sender are set and never change. deposit.matched is sent.
manual_reviewA person decides: a deposit of exactly the suggested amount came from another source, the amount or bank time is unknown, the deposit is dated before the request, it may be a duplicate, or no usable settlement rate exists. It ends as matched or rejected, or goes back to pending.
expired finalNo matching deposit arrived before expires_at.
rejected finalClosed by a reviewer without a credit.
cancelled finalReserved status (accepted by the status filter); no API call or dashboard action sets it today.

Allowed transitions, enforced by the database: pending to matched, manual_review, expired or cancelled; manual_review to matched, rejected or pending. A request is credited at most once.

Endpoints of this API
MethodPathEndpoint
POST/payment-requestsCreate a payment request
GET/payment-requestsList payment requests
GET/payment-requests/{ref}Retrieve a payment request
GET/rateUSDT settlement rate
POST/sandbox/depositsLegacy test keys: simulate a deposit

POST/payment-requestsCreate a payment request

Registers the card, SHEBA or account your user will pay from and returns the destination account to show them. A replay with the same Idempotency-Key returns 200.

Scope
payment_requests:write
Idempotency-Key
optional header
Response
201 Created
Body
ParameterTypeRequiredDescription
sourcestringyesThe payer's card number, SHEBA or account number, 1 to 64 characters. Text containing IR or 22 or more digits is a SHEBA (last 24 digits), 16 or more digits a card (first 16), anything else an account number
client_idstringYour user or order reference, up to 128 characters (returned as client_id and merchant_reference)
amount_rialintegerExpected amount in rial, a positive integer (optional; the received amount is what counts)
Request
cURL
curl -X POST https://pay.zpaylink.com/api/v1/payment-requests \
  -H "Authorization: Bearer $ZPAY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"source":"6037990000000000","client_id":"user-2041","amount_rial":25000000}'
Node.js
const res = await fetch('https://pay.zpaylink.com/api/v1/payment-requests', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${process.env.ZPAY_API_KEY}`,
    'Idempotency-Key': crypto.randomUUID(),
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "source": "6037990000000000",
    "client_id": "user-2041",
    "amount_rial": 25000000
  })
});
const data = await res.json();
Response
JSON201 Created
{
  "id": "ZX-R-8F3A2C91",
  "object": "payment_request",
  "mode": "live",
  "status": "pending",
  "client_id": "user-2041",
  "source": { "type": "card", "masked": "•••• 0000" },
  "suggested_amount_rial": 25000000,
  "received_amount_rial": null,
  "usdt_amount": null,
  "rate": null,
  "sender": null,
  "created_at": "2026-10-16T09:00:00.000Z",
  "expires_at": "2026-10-23T09:00:00.000Z",
  "matched_at": null,
  "merchant_reference": "user-2041",
  "currency": "IRR",
  "requested_amount_irr": 25000000,
  "paid_amount_irr": null,
  "difference_irr": null,
  "equivalent_usdt": null,
  "credited_usdt": null,
  "exchange_rate": null,
  "bank_transaction_id": null,
  "destination": { "holder": "Example Co", "card": "6219860000000000", "sheba": "IR000000000000000000000000", "account": "0000000000", "bank": "Blu" },
  "payer_window_seconds": 3600
}
Errors
  • 401 unauthorized
  • 403 merchant_inactive
  • 403 ip_not_allowed
  • 409 idempotency_conflict
  • 422 validation_error
  • 429 rate_limited
  • Unknown body fields are rejected with 422. A source that contains no digits, or more than 40, is refused with 422 ("Could not read the source card/SHEBA.").
  • A request is matched only to a deposit from the declared source that arrives after the request (with a 10 minute clock tolerance by default); the received amount is credited even if it differs from amount_rial. A deposit of exactly the suggested amount from another source goes to manual review.
  • The destination is returned only by this call: keep it with the request on your side.

GET/payment-requestsList payment requests

The merchant's requests in the key's mode, newest first by default, with cursor pagination (next_cursor).

Scope
payment_requests:read
Response
200 OK
Query parameters
ParameterTypeRequiredDescription
statusstringpending, matched, manual_review, expired, rejected or cancelled
created_from / created_toISO date-timeRange on created_at; created_to is exclusive
orderstringdesc (default) or asc
limitinteger1 to 100, default 20
cursorintegernext_cursor of the previous page
Request
cURL
curl https://pay.zpaylink.com/api/v1/payment-requests \
  -H "Authorization: Bearer $ZPAY_API_KEY"
Node.js
const res = await fetch('https://pay.zpaylink.com/api/v1/payment-requests', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${process.env.ZPAY_API_KEY}`
  }
});
const data = await res.json();
Response
JSON200 OK
{
  "object": "list",
  "data": [
    { "id": "ZX-R-8F3A2C91", "object": "payment_request", "mode": "live", "status": "pending" }
  ],
  "has_more": true,
  "next_cursor": 57
}
Errors
  • 401 unauthorized
  • 422 validation_error
  • Each item is a full payment request object (shortened here). Unknown query parameters are rejected with 422.

GET/payment-requests/{ref}Retrieve a payment request

The current status of one request. Once matched it carries the received amount, the USDT values at the locked rate and the sender name with the last 4 card digits.

Scope
payment_requests:read
Response
200 OK
Path parameters
ParameterTypeRequiredDescription
refstringyesRequest id (ZX-R-…)
Request
cURL
curl https://pay.zpaylink.com/api/v1/payment-requests/ZX-R-8F3A2C91 \
  -H "Authorization: Bearer $ZPAY_API_KEY"
Node.js
const res = await fetch('https://pay.zpaylink.com/api/v1/payment-requests/ZX-R-8F3A2C91', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${process.env.ZPAY_API_KEY}`
  }
});
const data = await res.json();
Response
JSON200 OK
{
  "id": "ZX-R-8F3A2C91",
  "object": "payment_request",
  "mode": "live",
  "status": "matched",
  "client_id": "user-2041",
  "source": { "type": "card", "masked": "•••• 0000" },
  "suggested_amount_rial": 25000000,
  "received_amount_rial": 25000000,
  "usdt_amount": "23.75",
  "rate": { "toman_per_usdt": "105250.00000000", "source": "manual" },
  "sender": { "name": "Sara Rezaei", "card_last4": "0000" },
  "created_at": "2026-10-16T09:00:00.000Z",
  "expires_at": "2026-10-23T09:00:00.000Z",
  "matched_at": "2026-10-16T09:20:00.000Z",
  "merchant_reference": "user-2041",
  "currency": "IRR",
  "requested_amount_irr": 25000000,
  "paid_amount_irr": 25000000,
  "difference_irr": 0,
  "equivalent_usdt": "23.752969",
  "credited_usdt": "23.75",
  "exchange_rate": { "source": "manual", "usdt_price_toman": "105250", "usdt_price_irr": "1052500", "captured_at": "2026-10-16T09:20:00+00:00" },
  "bank_transaction_id": 1042
}
Errors
  • 401 unauthorized
  • 404 not_found
  • 404 not_found also means a request of another merchant or of the other mode (a test key never sees live requests and the reverse).

GET/rateUSDT settlement rate

The toman per USDT rate zPay would use now to value a matched deposit: the organization's manual rate, or the latest quote. A matched request keeps the rate locked when it was matched.

Scope
rates:read
Response
200 OK
Request
cURL
curl https://pay.zpaylink.com/api/v1/rate \
  -H "Authorization: Bearer $ZPAY_API_KEY"
Node.js
const res = await fetch('https://pay.zpaylink.com/api/v1/rate', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${process.env.ZPAY_API_KEY}`
  }
});
const data = await res.json();
Response
JSON200 OK
{
  "object": "rate",
  "pair": "USDT/IRT",
  "toman_per_usdt": "105250",
  "source": "manual",
  "as_of": "2026-10-16T09:00:00.000Z",
  "stale": false
}
Errors
  • 401 unauthorized
  • When no settlement rate is available, toman_per_usdt is null, source is "bitpin" and stale is true; a live deposit is then never credited automatically (manual review).

POST/sandbox/depositsLegacy test keys: simulate a deposit

Deprecated; works only with a legacy test key (zpm_test_). Records a simulated deposit on test data and runs test matching, so a test request can reach matched. A standard key gets 403 live_key.

Scope
payment_requests:write
Response
201 Created
Body
ParameterTypeRequiredDescription
sourcestringyesThe same source as the test request
amount_rialintegeryesDeposit amount in rial
sender_namestringUp to 120 characters
Request
cURL
curl -X POST https://pay.zpaylink.com/api/v1/sandbox/deposits \
  -H "Authorization: Bearer $ZPAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"source":"6037990000000000","amount_rial":25000000,"sender_name":"Sara Rezaei"}'
Node.js
const res = await fetch('https://pay.zpaylink.com/api/v1/sandbox/deposits', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${process.env.ZPAY_API_KEY}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "source": "6037990000000000",
    "amount_rial": 25000000,
    "sender_name": "Sara Rezaei"
  })
});
const data = await res.json();
Response
JSON201 Created
{
  "object": "sandbox_deposit",
  "bank_transaction_id": 1042,
  "matcher": { "expired": 0, "matched": 1, "review": 0 }
}
Errors
  • 403 live_key
  • 409 no_bank_account
  • 422 validation_error

Payment request object

Returned by every payment request endpoint. Money values are exact: rial as integers, USDT and rates as decimal strings. The create response adds destination and payer_window_seconds.

Fields
ParameterTypeRequiredDescription
idstringRequest id, ZX-R- and 8 hex characters
objectstringAlways payment_request
modestringlive (standard key) or test (legacy test key)
statusstringSee Lifecycle and statuses
client_idstringWhat you sent; an empty string when you sent none
source.type / source.maskedstringcard, sheba or account; masked as •••• and the last 4 digits, or IR… and the last 6 for a SHEBA
suggested_amount_rialinteger | nullamount_rial you sent
received_amount_rialinteger | nullWhat actually arrived (credited even if it differs)
usdt_amountstring | nullCredited USDT, 2 places: received rial / 10 / rate, half up
rateobject | nulltoman_per_usdt (decimal string, up to 8 places) and source (manual or bitpin) of the locked rate
senderobject | nullWhen matched: name and card_last4 of the payer as the bank reported them
created_at / expires_at / matched_atISO date-timeUTC; matched_at is null until matched
merchant_referencestringSame as client_id
currencystringAlways IRR
requested_amount_irr / paid_amount_irrinteger | nullRequested (amount_rial) and paid amount in rial
difference_irrinteger | nullpaid minus requested (negative = underpaid); null without a requested amount
equivalent_usdtstring | nullpaid / 10 / rate with 6 places, half up (informational)
credited_usdtstring | nullThe credited value, 2 places (same number as usdt_amount)
exchange_rateobject | nullsource, usdt_price_toman, usdt_price_irr and captured_at of the rate locked at match time
bank_transaction_idinteger | nullzPay id of the matched bank deposit
destinationobjectCreate response only: holder, card, sheba, account and bank of the account to pay to
payer_window_secondsintegerCreate response only: how long to show the destination (organization setting, 3600 by default)

deposit.matched body

The ZPay 1.0 keys come first, unchanged, followed by the zPay 2.0 keys. The body is built once and every retry sends the same bytes.

Fields
ParameterTypeRequiredDescription
event / statusstringdeposit.matched / matched
request_refstringThe payment request id (ZX-R-…)
client_idstring | nullYour reference
source_cardstringThe full declared source digits (card, SHEBA or account)
sender_name / sender_cardstring | nullPayer name and full card number as the bank reported them
amount_rial / amount_tomanintegerReceived amount (toman = rial / 10, rounded down)
amount_usdtnumber | nullLegacy JSON number of the credited USDT; read credited_usdt instead
rate_usedinteger | nullLegacy rounded toman per USDT
matched_atstringUTC, for example 2026-10-16T09:20:00+00:00
event_id / idempotency_keystringThe event id (evt_…), same as X-ZPay-Event-Id and stable across retries: deduplicate on it
merchant_reference … bank_transaction_idmixedThe same dual-currency fields as the payment request object
bank_referencestring | nullThe bank's reference number when it was captured

Security notes

  • Give each key an IP allowlist with your servers' addresses; a call from another address is refused with 403 ip_not_allowed even with a valid key.

  • Credit a user only once per event_id and once per request_ref, inside one database transaction, and answer 2xx only after it is committed.

  • The webhook body contains the full payer card and source digits: store and display them as card data.

ZPay 1.0 compatible endpoints

Frozen routes for integrations built on ZPay 1.0, with the X-ZPay-Key header and the ZPay 1.0 request and response shapes. They are opened per integration on request; build new integrations on /api/v1.

MethodPathEndpoint
POST/wp-json/zpay/v1/gateway/requestsCreate a payment request (ZPay 1.0 body)
GET/wp-json/zpay/v1/gateway/requestsThe merchant's 20 latest requests
GET/wp-json/zpay/v1/gateway/requests/{ref}One request
GET/wp-json/zpay/v1/gateway/rateReference rate

zVoice APIFor organizations set up by zPayLink

Call requests, comments, agents, call recording metadata and quality reviews for account management and support teams, server to server.

The zVoice API works for organizations that zPayLink sets up; there is no self-service sign-up. Outgoing webhooks are not delivered yet (deliveries are simulated), customer assignment and inbound events work for demo organizations only, and commission rates are sample values.

Base URLs
https://voice.zpaylink.com/api/v1Production
Authentication
Authorization: Bearer <key> zvk_live_… / zvk_test_…
Issuing keys
Organization owners and admins create keys in the zVoice console (Developers, API keys) with scopes: call_requests:read, call_requests:write, comments:write, agents:read, recordings:read, qc:read, commissions:read. Shown once, up to 20 active keys per organization.
Idempotency
Create call request and add comment accept an idempotency_key field in the body (8 to 100 characters); a replay returns the original result. There is no Idempotency-Key header on this API.
Rate limits
120 requests per minute per key (429 rate_limited). Lists are paginated with page and size (default 25, maximum 100).

Developer downloads

Kit statusFor organizations set up by zPayLink

Everything to integrate offline: give the kit to your team or AI coding assistant. Technical documents are in English.

Endpoints of this API
MethodPathEndpoint
GET/organizationYour organization
GET/call-requestsList call requests
GET/call-requests/{id}Retrieve a call request
POST/call-requestsCreate a call request
PATCH/call-requests/{id}Update a call request
POST/call-requests/{id}/commentsAdd a comment
GET/agentsList agents
GET/call-recordingsList call recordings
GET/call-qcList quality reviews
GET/commissionsList commissions

GET/organizationYour organization

The organization of the key and its permissions.

Scope
Any valid key
Response
200 OK
Request
cURL
curl https://voice.zpaylink.com/api/v1/organization \
  -H "Authorization: Bearer $ZVOICE_API_KEY"
Node.js
const res = await fetch('https://voice.zpaylink.com/api/v1/organization', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${process.env.ZVOICE_API_KEY}`
  }
});
const data = await res.json();
Response
JSON200 OK
{ "data": { "id": "b2c4e6f8-1a3c-4e5a-8c7e-9f1b3d5f7a9c", "name": "Example Co", "slug": "example-co", "kind": "customer", "permissions": ["call_requests:read"] } }

GET/call-requestsList call requests

Filter by status (open, closed or a status key), priority, reason, tag, source_crm, team, agent, squad, customer, overdue, from and to (YYYY-MM-DD) or q; sort with sort and dir.

Scope
call_requests:read
Response
200 OK
Query parameters
ParameterTypeRequiredDescription
page / sizeintegerPage (default 1) and size (default 25, maximum 100)
Request
cURL
curl https://voice.zpaylink.com/api/v1/call-requests \
  -H "Authorization: Bearer $ZVOICE_API_KEY"
Node.js
const res = await fetch('https://voice.zpaylink.com/api/v1/call-requests', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${process.env.ZVOICE_API_KEY}`
  }
});
const data = await res.json();
Response
JSON200 OK
{
  "data": [
    { "id": 123, "ref": "CR-000123", "priority": "high", "reason_key": "deposit_issue" }
  ],
  "pagination": { "page": 1, "size": 25, "total": 1 }
}

GET/call-requests/{id}Retrieve a call request

The request with its calls and callbacks.

Scope
call_requests:read
Response
200 OK
Path parameters
ParameterTypeRequiredDescription
idstringyesNumeric id or reference such as CR-000123
Request
cURL
curl https://voice.zpaylink.com/api/v1/call-requests/CR-000124 \
  -H "Authorization: Bearer $ZVOICE_API_KEY"
Node.js
const res = await fetch('https://voice.zpaylink.com/api/v1/call-requests/CR-000124', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${process.env.ZVOICE_API_KEY}`
  }
});
const data = await res.json();
Response
JSON200 OK
{ "data": { "id": 123, "ref": "CR-000123", "priority": "high", "calls": [], "callbacks": [] } }
Errors
  • 404 not_found

POST/call-requestsCreate a call request

Either customer_id or a customer object is required, with source_department, reason_key and priority.

Scope
call_requests:write
Response
201 Created
Body
ParameterTypeRequiredDescription
customer_id | customeruuid | objectyesAn existing customer, or { name, customer_ref, phone, email, type (prop or broker), source_system, country }
source_departmentstringyes1 to 32 characters
reason_keystringyes1 to 64 characters
prioritystringyescritical, high, medium or low
summary, tags, product, due_at, agent_id, crm_record_refOptional details
idempotency_keystring8 to 100 characters
Request
cURL
curl -X POST https://voice.zpaylink.com/api/v1/call-requests \
  -H "Authorization: Bearer $ZVOICE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"customer":{"name":"Sara Rezaei","customer_ref":"C-77","type":"broker","source_system":"manual"},"source_department":"finance","reason_key":"deposit_issue","priority":"high","summary":"Deposit not visible in the account","idempotency_key":"cr-c77-20261015"}'
Node.js
const res = await fetch('https://voice.zpaylink.com/api/v1/call-requests', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${process.env.ZVOICE_API_KEY}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "customer": {
      "name": "Sara Rezaei",
      "customer_ref": "C-77",
      "type": "broker",
      "source_system": "manual"
    },
    "source_department": "finance",
    "reason_key": "deposit_issue",
    "priority": "high",
    "summary": "Deposit not visible in the account",
    "idempotency_key": "cr-c77-20261015"
  })
});
const data = await res.json();
Response
JSON201 Created
{ "data": { "id": 124, "ref": "CR-000124", "priority": "high" } }
Errors
  • 400 Bad Request
  • 403 insufficient_scope

PATCH/call-requests/{id}Update a call request

Change priority, due_at, status, summary, reason_key, source_department, product, crm_record_ref or tags; cancelling needs a note of at least 3 characters.

Scope
call_requests:write
Response
200 OK
Path parameters
ParameterTypeRequiredDescription
idstringyesNumeric id or CR-…
Body
ParameterTypeRequiredDescription
prioritystringcritical, high, medium or low
statusstringNew status key; cancelling needs a note
notestringNote for the change; at least 3 characters when cancelling
due_at, summary, reason_key, source_department, product, crm_record_ref, tagsOptional fields to change
Request
cURL
curl -X PATCH https://voice.zpaylink.com/api/v1/call-requests/CR-000124 \
  -H "Authorization: Bearer $ZVOICE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"priority":"medium","note":"Customer called back"}'
Node.js
const res = await fetch('https://voice.zpaylink.com/api/v1/call-requests/CR-000124', {
  method: 'PATCH',
  headers: {
    'Authorization': `Bearer ${process.env.ZVOICE_API_KEY}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "priority": "medium",
    "note": "Customer called back"
  })
});
const data = await res.json();
Response
JSON200 OK
{ "data": { "id": 124, "ref": "CR-000124", "priority": "medium" } }
Errors
  • 400 Bad Request
  • 404 not_found

POST/call-requests/{id}/commentsAdd a comment

A comment of 1 to 4000 characters, optionally internal.

Scope
comments:write
Response
201 Created
Path parameters
ParameterTypeRequiredDescription
idstringyesNumeric id or CR-…
Body
ParameterTypeRequiredDescription
bodystringyes1 to 4000 characters
internalbooleanInternal comment
idempotency_keystring8 to 100 characters
Request
cURL
curl -X POST https://voice.zpaylink.com/api/v1/call-requests/CR-000124/comments \
  -H "Authorization: Bearer $ZVOICE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"body":"Deposit confirmed by finance.","internal":false,"idempotency_key":"cm-124-0001"}'
Node.js
const res = await fetch('https://voice.zpaylink.com/api/v1/call-requests/CR-000124/comments', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${process.env.ZVOICE_API_KEY}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "body": "Deposit confirmed by finance.",
    "internal": false,
    "idempotency_key": "cm-124-0001"
  })
});
const data = await res.json();
Response
JSON201 Created
{ "data": { "id": 501, "body": "Deposit confirmed by finance.", "internal": false } }

GET/agentsList agents

Agents with their role, squad, availability and number of assigned customers.

Scope
agents:read
Response
200 OK
Request
cURL
curl https://voice.zpaylink.com/api/v1/agents \
  -H "Authorization: Bearer $ZVOICE_API_KEY"
Node.js
const res = await fetch('https://voice.zpaylink.com/api/v1/agents', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${process.env.ZVOICE_API_KEY}`
  }
});
const data = await res.json();
Response
JSON200 OK
{ "data": [ { "id": "c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f", "full_name": "Agent One", "role": "agent", "squad": "A", "status": "active", "available": true, "assigned_customers": 42, "crm_agent_id": null } ] }

GET/call-recordingsList call recordings

Recording metadata only; audio is never returned.

Scope
recordings:read
Response
200 OK
Request
cURL
curl https://voice.zpaylink.com/api/v1/call-recordings \
  -H "Authorization: Bearer $ZVOICE_API_KEY"
Node.js
const res = await fetch('https://voice.zpaylink.com/api/v1/call-recordings', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${process.env.ZVOICE_API_KEY}`
  }
});
const data = await res.json();
Response
JSON200 OK
{
  "data": [ { "id": 77, "ref": "REC-000077", "duration_s": 312, "source": "upload", "is_real": true, "call_at": "2026-10-15T08:40:00.000Z", "qc_status": "reviewed", "qc_label": "good" } ],
  "pagination": { "page": 1, "size": 25, "total": 1 }
}

GET/call-qcList quality reviews

Quality reviews of recordings with scores and review status.

Scope
qc:read
Response
200 OK
Request
cURL
curl https://voice.zpaylink.com/api/v1/call-qc \
  -H "Authorization: Bearer $ZVOICE_API_KEY"
Node.js
const res = await fetch('https://voice.zpaylink.com/api/v1/call-qc', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${process.env.ZVOICE_API_KEY}`
  }
});
const data = await res.json();
Response
JSON200 OK
{
  "data": [ { "id": 31, "label": "good", "kind": "manual", "title": "Deposit call", "scores": { "greeting": 5 }, "overall": 4.6, "review_status": "approved" } ],
  "pagination": { "page": 1, "size": 25, "total": 1 }
}

GET/commissionsList commissions

Commission records; rate_is_demo marks sample rates.

Scope
commissions:read
Response
200 OK
Request
cURL
curl https://voice.zpaylink.com/api/v1/commissions \
  -H "Authorization: Bearer $ZVOICE_API_KEY"
Node.js
const res = await fetch('https://voice.zpaylink.com/api/v1/commissions', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${process.env.ZVOICE_API_KEY}`
  }
});
const data = await res.json();
Response
JSON200 OK
{
  "data": [ { "id": 9, "status": "pending", "base_amount": "250.00", "rate_pct": "5", "amount": "12.50", "rate_is_demo": true } ],
  "pagination": { "page": 1, "size": 25, "total": 1 }
}

Webhooks

Signed events to your server

zGate, zCheck, zVoice and zPay sign webhooks the same way: a header t=<unix seconds>,v1=<hex HMAC-SHA256> computed with your endpoint secret over the string "<t>.<raw body>". The signature is recomputed on every attempt.

  1. Read the raw request body before any JSON parsing; re-serialised JSON will not match.

  2. Verify the signature header with your secret and reject timestamps older than 5 minutes.

  3. Deduplicate on the event id header: retries and redeliveries reuse it.

  4. Answer 2xx quickly and do the work afterwards; redirects and slow answers count as failures.

  5. Reconcile with the API (for example GET /invoices/{id}) before you fulfil an order.

Signature header by product
ProductSignature headerEvents
zGateZGate-Signature8
zCheckZCheck-Signature9
zPayX-ZPay-Signature-V21
zVoiceZVoice-Signature7

Verify a signature

Node.js
import crypto from 'node:crypto';

// header: the signature header value, rawBody: the request body as received (Buffer or string)
export function verifySignature(header, rawBody, secret, toleranceSeconds = 300) {
  const parts = {};
  for (const item of header.split(',')) {
    const i = item.indexOf('=');
    const k = item.slice(0, i).trim(), v = item.slice(i + 1).trim();
    (parts[k] ||= []).push(v);
  }
  const t = Number(parts.t?.[0]);
  if (!Number.isFinite(t) || Math.abs(Date.now() / 1000 - t) > toleranceSeconds) return false;
  const expected = crypto.createHmac('sha256', secret).update(`${t}.`).update(rawBody).digest();
  return (parts.v1 || []).some((sig) => {
    const got = Buffer.from(sig, 'hex');
    return got.length === expected.length && crypto.timingSafeEqual(got, expected);
  });
}
Python
import hashlib, hmac, time

def verify_signature(header: str, raw_body: bytes, secret: str, tolerance: int = 300) -> bool:
    t, sigs = None, []
    for item in header.split(','):
        k, _, v = item.strip().partition('=')
        if k == 't':
            t = v
        elif k == 'v1':
            sigs.append(v)
    if t is None or not t.isdigit() or abs(time.time() - int(t)) > tolerance:
        return False
    expected = hmac.new(secret.encode(), t.encode() + b'.' + raw_body, hashlib.sha256).hexdigest()
    return any(hmac.compare_digest(expected, s) for s in sigs)
zGate8 Events

A status can move on after an event: an underpaid invoice can be topped up, and a late transfer to an expired invoice (within 30 days) sets late: true and moves it to paid. Each change sends a new event with a new id.

EventWhen
invoice.createdAn invoice was created
payment.detectedA transfer to the deposit address was seen on chain
payment.confirmingThe transfer has started collecting confirmations
invoice.paidThe full amount is confirmed (fulfil the order here)
invoice.underpaidLess than the amount arrived; a top-up before expiry can still complete it
invoice.overpaidMore than the amount arrived
invoice.expiredThe invoice expired without full payment
webhook.testSent by POST /webhooks/test
Signature header
ZGate-Signature: t=…,v1=…
Other headers
ZGate-Event-IdZGate-Event-TypeZGate-Delivery-IdZGate-Delivery-Attempt
Expected response
Return any 2xx within 10 seconds. Redirects are not followed and count as failures.
Retries
Up to 12 attempts. After a failure the next attempt waits about 1, 2, 4, 8, 16, 32 and 64 minutes, then about 2, 4 and 6 hours (with 10% jitter), for about 20 hours in total. Delivery order is not guaranteed.
Endpoints and secret
zPayLink registers your HTTPS endpoint (port 443 or 8443, public address) and gives you its whsec_ secret once; every endpoint receives all event types. Up to 5 endpoints per merchant.
Example payload
{
  "id": "evt_8m3k6p2q9r4t7w2y5x3n",
  "object": "event",
  "type": "invoice.paid",
  "created_at": "2026-10-15T09:05:01.000Z",
  "network": "bsc-testnet",
  "livemode": false,
  "data": {
    "invoice": { "id": "inv_7k2m9qx4r8t3w6y5p2n4", "status": "paid", "amount": "25.00", "amount_received": "25.00", "final": true },
    "transactions": [
      { "tx_hash": "0xTRANSACTION_HASH", "log_index": 4, "block_number": 51234567, "from": "0xPAYER_ADDRESS", "amount": "25.00", "status": "confirmed", "confirmations": 15, "required_confirmations": 15, "after_expiry": false, "explorer_url": "https://testnet.bscscan.com/tx/0xTRANSACTION_HASH" }
    ]
  }
}
zCheck9 Events

Webhooks carry no names, national IDs or images; read details with the API.

EventWhen
verification.createdA verification was created
verification.processingThe user or your server submitted it
verification.pending_reviewIt needs a manual decision
verification.approvedApproved (automatically or by a reviewer)
verification.rejectedRejected (automatically or by a reviewer)
verification.expiredThe session expired before submission
verification.failedProcessing failed (status ERROR)
verification.cancelledCancelled
verification.resubmission_requestedA new attempt was requested
Signature header
ZCheck-Signature: t=…,v1=…
Other headers
ZCheck-Event-IdZCheck-Event-TypeZCheck-Delivery-IdZCheck-Attempt
Expected response
Return any 2xx within 10 seconds. Redirects are not followed.
Retries
First attempt at once; after a failure the next waits 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours, 12 hours and 24 hours. After 8 failed attempts the delivery stops.
Endpoints and secret
Add HTTPS endpoints in the zCheck console per mode and choose their events; the whsec_ secret is shown once. The console can also create a built-in test receiver and send a test.ping.
Example payload
{
  "id": "evt_9f2c4a7e1b3d5f8a0c2e4b6d",
  "type": "verification.pending_review",
  "created_at": "2026-10-15T09:13:05.000Z",
  "mode": "test",
  "api_version": "2026-10-11",
  "data": {
    "verification": {
      "id": "6f1c2a9e-3b47-4d1a-9c55-2e8b7a0d4f13",
      "reference": "ZC-7K2M9QX4",
      "external_customer_id": "user-2041",
      "external_reference": "onboarding-2041",
      "mode": "test",
      "status": "MANUAL_REVIEW",
      "attempt": 1,
      "document_type": "national_id_card",
      "simulated": true,
      "decision": { "outcome": "MANUAL_REVIEW", "automatic": true, "reason_codes": ["auto_approve_disabled"] },
      "created_at": "2026-10-15T09:00:00.000Z",
      "updated_at": "2026-10-15T09:13:05.000Z",
      "completed_at": null
    }
  }
}
zPay1 Events

Webhook delivery is switched off in production for now: events are recorded and held, and zPayLink releases them explicitly once sending is switched on. Verify X-ZPay-Signature-V2, which includes the timestamp; X-ZPay-Signature (HMAC of the raw body only) remains for ZPay 1.0 receivers. The body is PHP-compatible JSON ("/" is sent as "\/", non-ASCII as \uXXXX): verify the raw bytes, never a re-serialised object.

EventWhen
deposit.matchedA deposit was matched to a payment request (automatically or after manual review)
Signature header
X-ZPay-Signature-V2: t=…,v1=…
Other headers
X-ZPay-SignatureX-ZPay-EventX-ZPay-Event-IdX-ZPay-DeliveryX-ZPay-Attempt
Expected response
Return any 2xx within 12 seconds. Redirects are not followed and count as failures; the response body is ignored.
Retries
Up to 11 attempts: after a failure the next waits 1, 2, 5, 10 and 30 minutes, then 1, 2, 6, 12 and 24 hours (about 46 hours in total), then the delivery stops (dead letter). Delivery is at least once: after a crash the same event can arrive again.
Endpoints and secret
Set the merchant's callback URL in the zPay dashboard: HTTPS, a public address, no credentials in the URL, up to 500 characters. The 64-character hex signing secret is shown once when the merchant is created and when it is rotated; pending deliveries are signed with the new secret. A merchant without a callback URL receives no webhooks.
Example payload
{
  "event": "deposit.matched",
  "request_ref": "ZX-R-8F3A2C91",
  "status": "matched",
  "client_id": "user-2041",
  "source_card": "6037990000000000",
  "sender_name": "Sara Rezaei",
  "sender_card": "6037990000000000",
  "amount_rial": 25000000,
  "amount_toman": 2500000,
  "amount_usdt": 23.75,
  "rate_used": 105250,
  "matched_at": "2026-10-16T09:20:00+00:00",
  "event_id": "evt_000000000000000000000001",
  "idempotency_key": "evt_000000000000000000000001",
  "merchant_reference": "user-2041",
  "currency": "IRR",
  "requested_amount_irr": 25000000,
  "paid_amount_irr": 25000000,
  "difference_irr": 0,
  "equivalent_usdt": "23.752969",
  "credited_usdt": "23.75",
  "exchange_rate": { "source": "manual", "usdt_price_toman": "105250", "usdt_price_irr": "1052500", "captured_at": "2026-10-16T09:20:00+00:00" },
  "bank_transaction_id": 1042,
  "bank_reference": null
}
zVoice7 Events

Not delivered yet: deliveries are simulated and no request leaves zVoice. The signature scheme and payload are final.

EventWhen
call.request.assignedA call request was assigned
call.request.completedA call request was completed
call.comment.createdA comment was added
call.qc.completedA quality review was completed
customer.assignedA customer was assigned to an agent
conversion.attributedA conversion was attributed
commission.createdA commission was created
Signature header
ZVoice-Signature: t=…,v1=…
Expected response
Return a 2xx.
Retries
Defined: 6 attempts with exponential backoff from 30 seconds. data depends on the event type.
Endpoints and secret
HTTPS endpoints are added in the zVoice console (up to 10); the whsec_ secret is shown once and rotation keeps the old secret valid for 24 hours.
Example payload
{
  "id": "evt_3c5e7a9b1d2f4a6c8e0b2d4f6a8c0e1b",
  "type": "call.request.completed",
  "created_at": "2026-10-15T09:30:00.000Z",
  "organization_id": "b2c4e6f8-1a3c-4e5a-8c7e-9f1b3d5f7a9c",
  "data": {}
}

Integration guides

Step by step

1Your first zGate test payment
  1. Check the network: GET /network on the test URL returns the test token contract and the confirmations required.

  2. Create an invoice with an Idempotency-Key derived from your order id, so a retried request never creates a second invoice.

  3. Send the customer to hosted_url, or show deposit_address with the exact amount or payment_uri as a QR code.

  4. Pay it on BNB Smart Chain Testnet with the test token from GET /network. You receive payment.detected, payment.confirming and then invoice.paid once the confirmations are reached.

  5. On invoice.paid, verify the signature, confirm with GET /invoices/{id} and fulfil the order once.

Shell
curl https://gate.zpaylink.com/staging/api/v1/invoices \
  -H "Authorization: Bearer $ZGATE_API_KEY" \
  -H "Idempotency-Key: order-1001" \
  -H "Content-Type: application/json" \
  -d '{"merchant_order_id":"ORDER-1001","amount":"25.00","asset":"USDT","network":"bsc-testnet"}'
2Receive and verify webhooks
  1. Expose an HTTPS endpoint on a public address and register it (zGate: through zPayLink; zCheck and zVoice: in the console; zPay: the merchant's callback URL in the dashboard). Keep the webhook secret on your server.

  2. Verify the signature over the raw body with the function in the Webhooks section, using the product's signature header.

  3. Store the event id and skip events you have already processed.

  4. Return 2xx within the timeout and process in the background. Use POST /webhooks/test (zGate) or the console test (zCheck) to try it.

  5. After downtime, list missed events with GET /events and redeliver them if needed (zGate: POST /events/{id}/redeliver).

3Retries, idempotency and failed requests
  1. Send an Idempotency-Key on create requests (zGate invoices, zCheck verifications, zPay payment requests); zVoice takes idempotency_key in the body.

  2. Retry network errors, 5xx and 429 with the same key and growing pauses; on 429 wait at least Retry-After seconds.

  3. Do not retry 4xx validation errors unchanged: fix the request (422 lists the fields in details).

  4. 409 idempotency_conflict means the key was used with a different request: use a new key for a new operation.

  5. Log the X-Request-Id response header (zCheck, zPay) when you contact support.

4zCheck: the hosted verification flow
  1. Create a verification with your user id in external_customer_id and a redirect_url, and send the user to verification_url (it cannot be embedded in an iframe).

  2. The user gives consent, enters name and national ID, photographs the document and takes a selfie, then submits.

  3. The return button sends the user to redirect_url with status=submitted; the outcome is never in the URL.

  4. Wait for verification.approved, verification.rejected or verification.pending_review, or poll GET /verifications/{id}/status.

  5. Read the checks with GET /verifications/{id}/result. In test mode, choose an outcome with sandbox.scenario; with the default policy every case still ends in manual review.

5zPay: payment request to credited deposit
  1. Keep ZPAY_API_KEY (a standard zpm_live_ key) and the merchant's webhook signing secret on your server; your server's public IP must be on the zPay access list.

  2. Create a payment request per payment with an Idempotency-Key from your order id. Save id and show destination for payer_window_seconds; the user must pay from the card or SHEBA you declared as source.

  3. On deposit.matched, verify X-ZPay-Signature-V2 over the raw body (5 minute window), then confirm with GET /payment-requests/{ref}.

  4. Credit once: a unique constraint on event_id and on the request id, the amount you trust (paid_amount_irr or credited_usdt), and 2xx only after the commit.

  5. While live matching and webhook delivery are switched off, requests stay pending: keep the handler ready and follow requests with GET /payment-requests/{ref}.

Node.js
import express from 'express';
import { verifySignature } from './verify-signature.js';   // the function in the Webhooks section

const API = 'https://pay.zpaylink.com/api/v1';
const auth = { Authorization: `Bearer ${process.env.ZPAY_API_KEY}` };

// 1. one payment request per order; a retry with the same Idempotency-Key returns the same request
export async function createPayment(order) {
  const res = await fetch(`${API}/payment-requests`, {
    method: 'POST',
    headers: { ...auth, 'Content-Type': 'application/json', 'Idempotency-Key': `order-${order.id}` },
    body: JSON.stringify({ source: order.payerCard, client_id: String(order.userId), amount_rial: order.amountRial }),
  });
  const pr = await res.json();
  if (!res.ok) throw new Error(`${pr.error.code}: ${pr.error.message} (${pr.request_id})`);
  return pr;   // save pr.id, show pr.destination for pr.payer_window_seconds
}

// 2. deposit.matched: verify the raw body, confirm with the API, credit once
const app = express();
app.post('/zpay/webhook', express.raw({ type: 'application/json' }), async (req, res) => {
  if (!verifySignature(req.get('X-ZPay-Signature-V2') || '', req.body, process.env.ZPAY_WEBHOOK_SECRET)) return res.sendStatus(401);
  const event = JSON.parse(req.body);
  const pr = await (await fetch(`${API}/payment-requests/${encodeURIComponent(event.request_ref)}`, { headers: auth })).json();
  if (pr.status === 'matched') await creditOnce(event.event_id, pr.id, pr.paid_amount_irr, pr.credited_usdt);   // your code: unique event_id and request id
  res.sendStatus(200);
});
6Moving from test to live
  1. zGate: live keys (zgk_live_) work on https://gate.zpaylink.com/api/v1 with network "bsc" within the limits zPayLink sets during the limited launch.

  2. zCheck: live verification is switched off; live keys are refused with 403 live_processing_disabled until it opens.

  3. zPay: one environment; every new key is a standard key (zpm_live_). Live deposit matching and webhook delivery are switched on by zPayLink separately; until then requests stay pending. Move an integration that still uses a legacy test key (zpm_test_) to a standard key, then revoke the test key.

  4. Before switching: separate secrets per environment, verify webhooks in production, set alerts on failed deliveries and keep reconciliation with GET requests.

Errors

Status codes and error codes

Errors use a JSON envelope with a machine-readable code; use the code, not the message, in your logic. zVoice uses the framework format { statusCode, error, message }.

zGate
{
  "error": {
    "code": "invalid_request",
    "message": "Invalid invoice request.",
    "details": { "amount": "must be a decimal string, e.g. \"25.50\"" }
  }
}
zCheck
{
  "error": {
    "code": "validation_error",
    "message": "customer.national_id is not a valid Iranian national ID.",
    "details": [{ "field": "customer.national_id", "message": "The check digit does not match: the number contains a typing or reading error." }]
  },
  "request_id": "req_4f9a1c7e2b8d3a6f0e5c"
}
zPay
{
  "error": {
    "code": "validation_error",
    "message": "source: Required",
    "details": [{ "field": "source", "message": "Required" }]
  },
  "request_id": "req_a3f1c9e25b7d4e8a9c1f"
}
zVoice
{
  "statusCode": 403,
  "error": "insufficient_scope",
  "message": "This API key does not have the scope required for this endpoint."
}
CodeHTTPProductsMeaning
unauthorized401zGate, zCheck, zPay, zVoiceMissing, malformed or unknown API key
key_revoked, key_expired401zCheck, zPayThe key was revoked, or its rotation grace period or expiry has passed
insufficient_scope403zGate, zCheck, zPay, zVoiceThe key lacks the scope this endpoint needs
merchant_inactive403zGateThe merchant is not active; writes are refused
merchant_inactive403zPayThe merchant is not active (draft, awaiting activation, suspended, rejected or archived); every call with its keys is refused
ip_not_allowed403zPayThe key has an IP allowlist that does not include your server's address
live_key403zPayPOST /sandbox/deposits needs a legacy test key (zpm_test_)
organization_disabled403zCheck, zPayThe organization is suspended or not active
live_processing_disabled403zCheckLive verification is switched off; use a test key
not_found404zGate, zCheck, zPay, zVoiceUnknown id, or an object of another account or mode
idempotency_conflict409zGate, zCheck, zPayThe Idempotency-Key was used with a different request
no_bank_account409zPayThe organization has no default bank account (sandbox deposits)
invalid_json, payload_too_large400 / 413zPayThe body is not valid JSON, or larger than 256 kB
idempotency_in_progress409zCheckThe first request with this key is still running
invalid_state, retry_limit409zCheckThe action is not allowed in the current status, or no attempts are left
invalid_request, validation_error422zGate / zCheck, zPayThe request is invalid; details lists the fields
merchant_limit422zGateAbove the per-invoice or daily limit of the merchant
rate_limited, too_many_auth_failures429zGate, zCheck, zPay, zVoiceToo many requests; wait Retry-After seconds
payments_not_activated, wallet_unavailable503zGateInvoices cannot be created right now in this environment
internal_error500zGate, zCheck, zPayUnexpected error; retry with the same Idempotency-Key

Security

Keep keys and webhooks safe

  • Keep API keys and webhook secrets on your server, in a secret store or environment variables; never in front-end code, mobile apps or source control.

  • Use separate keys per environment and per system, with the narrowest scopes you need (zGate read-only keys, zCheck verifications:submit only where you upload server to server).

  • Rotate keys when people or systems change: zCheck and zPay keep the old key valid for a grace period during rotation; revoke at once if a key may be exposed.

  • Verify every webhook signature with a constant-time comparison and a 5 minute timestamp window, and deduplicate on the event id.

  • Webhook endpoints must be HTTPS on a public address; zPayLink refuses private and internal addresses and does not follow redirects.

  • Treat webhooks as notifications: confirm amounts and statuses with the API before you credit a user or ship an order.

  • zCheck never returns images or full national IDs through the API or webhooks; keep the personal data you collect to the minimum.

FAQ

Frequently asked questions

Is there a sandbox?

zGate: yes, a full test environment on BNB Smart Chain Testnet (real testnet transfers, no simulated payments). zCheck: test keys with simulated results and selectable scenarios. zPay has one environment: test keys are no longer issued; existing ones keep working and their requests are never matched against real deposits. zVoice has no separate test environment.

How do I get API keys?

Call us. zGate keys are issued by zPayLink with your merchant account; for zCheck, zVoice and zPay, zPayLink creates your organization and your admins create keys in the console.

Can I call the APIs from a browser or mobile app?

No. They are server-to-server APIs: cross-origin browser calls are not allowed and a key in an app would be exposed. Call them from your backend.

Which networks and assets does zGate support?

USDT (BEP-20) on BNB Smart Chain only: "bsc" in production and "bsc-testnet" in the test environment. There is no fiat pricing and there are no refunds through the API.

Do webhooks arrive in order?

Not necessarily. Use the status and timestamps in the payload, confirm with the API, and handle every event idempotently.

Are there OpenAPI documents?

Yes: every developer kit includes openapi.yaml. zCheck and zVoice also serve theirs (linked in their reference sections); zPay serves /api/v1/openapi.json to servers on its access list.

What about zRate, zTrader, zPulse and zWatch?

They have no API for third-party software today; see the Products section.

Changelog

API changes

  1. zPay API v1 documentation re-audited: one environment (standard zpm_live_ keys; legacy test keys keep working), access list for server IPs, dual-currency fields and event_id in responses and deposit.matched, payment lifecycle, error codes and a new developer kit.

  2. Developer portal published: full API reference for zGate, zCheck, zPay and zVoice, webhooks, guides and error codes.

  3. zPay 2.0 merchant API v1 implemented (payment requests, rate, test deposits, deposit.matched webhook); not open to merchants yet.

  4. zGate: events feed (GET /events), redelivery (POST /events/{id}/redeliver) and on-chain transactions in invoice webhooks.

  5. zVoice API v1: call requests, comments, agents, recordings, quality reviews and commissions with scoped keys.

  6. zCheck API v1 in test mode: verifications, hosted page, server-to-server uploads, results and signed webhooks.

Ready to connect?

Call us for API access, test keys or a technical walkthrough.

Request API access