{
  "info": {
    "name": "zPay API (zPayLink)",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "description": "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.\n\nStatus (2026-10-16): For merchants onboarded by zPayLink. 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.\n\nSet the collection variables baseUrl and apiKey (placeholder only; never commit real keys)."
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{apiKey}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://pay.zpaylink.com/api/v1",
      "description": "One environment; your server IP must be on the zPay access list: https://pay.zpaylink.com/api/v1"
    },
    {
      "key": "apiKey",
      "value": "<your zpm_live_… key>",
      "description": "Placeholder"
    }
  ],
  "item": [
    {
      "name": "payment-requests",
      "item": [
        {
          "name": "POST /payment-requests | Create a payment request",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Optional; reuse it when you retry"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/payment-requests",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "payment-requests"
              ]
            },
            "description": "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.\n\nScope: payment_requests:write\n\nUnknown 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.\").\n\nA 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.\n\nThe destination is returned only by this call: keep it with the request on your side.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"source\": \"6037990000000000\",\n  \"client_id\": \"user-2041\",\n  \"amount_rial\": 25000000\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "Example 201 Created",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Idempotency-Key",
                    "value": "{{$guid}}",
                    "description": "Optional; reuse it when you retry"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/payment-requests",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "payment-requests"
                  ]
                },
                "description": "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.\n\nScope: payment_requests:write\n\nUnknown 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.\").\n\nA 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.\n\nThe destination is returned only by this call: keep it with the request on your side.",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"source\": \"6037990000000000\",\n  \"client_id\": \"user-2041\",\n  \"amount_rial\": 25000000\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Created",
              "code": 201,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"id\": \"ZX-R-8F3A2C91\",\n  \"object\": \"payment_request\",\n  \"mode\": \"live\",\n  \"status\": \"pending\",\n  \"client_id\": \"user-2041\",\n  \"source\": {\n    \"type\": \"card\",\n    \"masked\": \"•••• 0000\"\n  },\n  \"suggested_amount_rial\": 25000000,\n  \"received_amount_rial\": null,\n  \"usdt_amount\": null,\n  \"rate\": null,\n  \"sender\": null,\n  \"created_at\": \"2026-10-16T09:00:00.000Z\",\n  \"expires_at\": \"2026-10-23T09:00:00.000Z\",\n  \"matched_at\": null,\n  \"merchant_reference\": \"user-2041\",\n  \"currency\": \"IRR\",\n  \"requested_amount_irr\": 25000000,\n  \"paid_amount_irr\": null,\n  \"difference_irr\": null,\n  \"equivalent_usdt\": null,\n  \"credited_usdt\": null,\n  \"exchange_rate\": null,\n  \"bank_transaction_id\": null,\n  \"destination\": {\n    \"holder\": \"Example Co\",\n    \"card\": \"6219860000000000\",\n    \"sheba\": \"IR000000000000000000000000\",\n    \"account\": \"0000000000\",\n    \"bank\": \"Blu\"\n  },\n  \"payer_window_seconds\": 3600\n}",
              "_postman_previewlanguage": "json"
            }
          ]
        },
        {
          "name": "GET /payment-requests | List payment requests",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/payment-requests",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "payment-requests"
              ],
              "query": [
                {
                  "key": "status",
                  "value": "",
                  "description": "pending, matched, manual_review, expired, rejected or cancelled",
                  "disabled": true
                },
                {
                  "key": "created_from",
                  "value": "",
                  "description": "Range on created_at; created_to is exclusive",
                  "disabled": true
                },
                {
                  "key": "created_to",
                  "value": "",
                  "description": "Range on created_at; created_to is exclusive",
                  "disabled": true
                },
                {
                  "key": "order",
                  "value": "",
                  "description": "desc (default) or asc",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "",
                  "description": "1 to 100, default 20",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "next_cursor of the previous page",
                  "disabled": true
                }
              ]
            },
            "description": "The merchant's requests in the key's mode, newest first by default, with cursor pagination (next_cursor).\n\nScope: payment_requests:read\n\nEach item is a full payment request object (shortened here). Unknown query parameters are rejected with 422."
          },
          "response": [
            {
              "name": "Example 200 OK",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/payment-requests",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "payment-requests"
                  ],
                  "query": [
                    {
                      "key": "status",
                      "value": "",
                      "description": "pending, matched, manual_review, expired, rejected or cancelled",
                      "disabled": true
                    },
                    {
                      "key": "created_from",
                      "value": "",
                      "description": "Range on created_at; created_to is exclusive",
                      "disabled": true
                    },
                    {
                      "key": "created_to",
                      "value": "",
                      "description": "Range on created_at; created_to is exclusive",
                      "disabled": true
                    },
                    {
                      "key": "order",
                      "value": "",
                      "description": "desc (default) or asc",
                      "disabled": true
                    },
                    {
                      "key": "limit",
                      "value": "",
                      "description": "1 to 100, default 20",
                      "disabled": true
                    },
                    {
                      "key": "cursor",
                      "value": "",
                      "description": "next_cursor of the previous page",
                      "disabled": true
                    }
                  ]
                },
                "description": "The merchant's requests in the key's mode, newest first by default, with cursor pagination (next_cursor).\n\nScope: payment_requests:read\n\nEach item is a full payment request object (shortened here). Unknown query parameters are rejected with 422."
              },
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"object\": \"list\",\n  \"data\": [\n    {\n      \"id\": \"ZX-R-8F3A2C91\",\n      \"object\": \"payment_request\",\n      \"mode\": \"live\",\n      \"status\": \"pending\"\n    }\n  ],\n  \"has_more\": true,\n  \"next_cursor\": 57\n}",
              "_postman_previewlanguage": "json"
            }
          ]
        },
        {
          "name": "GET /payment-requests/{ref} | Retrieve a payment request",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/payment-requests/:ref",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "payment-requests",
                ":ref"
              ],
              "variable": [
                {
                  "key": "ref",
                  "value": "",
                  "description": "Request id (ZX-R-…)"
                }
              ]
            },
            "description": "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.\n\nScope: payment_requests:read\n\n404 not_found also means a request of another merchant or of the other mode (a test key never sees live requests and the reverse)."
          },
          "response": [
            {
              "name": "Example 200 OK",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/payment-requests/:ref",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "payment-requests",
                    ":ref"
                  ],
                  "variable": [
                    {
                      "key": "ref",
                      "value": "",
                      "description": "Request id (ZX-R-…)"
                    }
                  ]
                },
                "description": "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.\n\nScope: payment_requests:read\n\n404 not_found also means a request of another merchant or of the other mode (a test key never sees live requests and the reverse)."
              },
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"id\": \"ZX-R-8F3A2C91\",\n  \"object\": \"payment_request\",\n  \"mode\": \"live\",\n  \"status\": \"matched\",\n  \"client_id\": \"user-2041\",\n  \"source\": {\n    \"type\": \"card\",\n    \"masked\": \"•••• 0000\"\n  },\n  \"suggested_amount_rial\": 25000000,\n  \"received_amount_rial\": 25000000,\n  \"usdt_amount\": \"23.75\",\n  \"rate\": {\n    \"toman_per_usdt\": \"105250.00000000\",\n    \"source\": \"manual\"\n  },\n  \"sender\": {\n    \"name\": \"Sara Rezaei\",\n    \"card_last4\": \"0000\"\n  },\n  \"created_at\": \"2026-10-16T09:00:00.000Z\",\n  \"expires_at\": \"2026-10-23T09:00:00.000Z\",\n  \"matched_at\": \"2026-10-16T09:20:00.000Z\",\n  \"merchant_reference\": \"user-2041\",\n  \"currency\": \"IRR\",\n  \"requested_amount_irr\": 25000000,\n  \"paid_amount_irr\": 25000000,\n  \"difference_irr\": 0,\n  \"equivalent_usdt\": \"23.752969\",\n  \"credited_usdt\": \"23.75\",\n  \"exchange_rate\": {\n    \"source\": \"manual\",\n    \"usdt_price_toman\": \"105250\",\n    \"usdt_price_irr\": \"1052500\",\n    \"captured_at\": \"2026-10-16T09:20:00+00:00\"\n  },\n  \"bank_transaction_id\": 1042\n}",
              "_postman_previewlanguage": "json"
            }
          ]
        }
      ]
    },
    {
      "name": "rate",
      "item": [
        {
          "name": "GET /rate | USDT settlement rate",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/rate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "rate"
              ]
            },
            "description": "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.\n\nScope: rates:read\n\nWhen 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)."
          },
          "response": [
            {
              "name": "Example 200 OK",
              "originalRequest": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/rate",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "rate"
                  ]
                },
                "description": "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.\n\nScope: rates:read\n\nWhen 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)."
              },
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"object\": \"rate\",\n  \"pair\": \"USDT/IRT\",\n  \"toman_per_usdt\": \"105250\",\n  \"source\": \"manual\",\n  \"as_of\": \"2026-10-16T09:00:00.000Z\",\n  \"stale\": false\n}",
              "_postman_previewlanguage": "json"
            }
          ]
        }
      ]
    },
    {
      "name": "sandbox",
      "item": [
        {
          "name": "POST /sandbox/deposits | Legacy test keys: simulate a deposit",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/sandbox/deposits",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "sandbox",
                "deposits"
              ]
            },
            "description": "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.\n\nScope: payment_requests:write",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"source\": \"6037990000000000\",\n  \"amount_rial\": 25000000,\n  \"sender_name\": \"Sara Rezaei\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "name": "Example 201 Created",
              "originalRequest": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/sandbox/deposits",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "sandbox",
                    "deposits"
                  ]
                },
                "description": "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.\n\nScope: payment_requests:write",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"source\": \"6037990000000000\",\n  \"amount_rial\": 25000000,\n  \"sender_name\": \"Sara Rezaei\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Created",
              "code": 201,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"object\": \"sandbox_deposit\",\n  \"bank_transaction_id\": 1042,\n  \"matcher\": {\n    \"expired\": 0,\n    \"matched\": 1,\n    \"review\": 0\n  }\n}",
              "_postman_previewlanguage": "json"
            }
          ]
        }
      ]
    }
  ]
}
