Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.zafapay.com/llms.txt

Use this file to discover all available pages before exploring further.

OpenAPI Specification

Download our OpenAPI specification to generate client libraries or import into API tools like Postman.Download OpenAPI (JSON)

Full Documentation

Download the complete documentation as a text file for offline reading or AI tool integration.Download Docs (TXT)

API Endpoints

EnvironmentBase URL
Sandboxhttps://api.sandbox.zafapay.com
Productionhttps://api.zafapay.com

Authentication

All API requests require Bearer token authentication.
Authorization: Bearer YOUR_ACCESS_TOKEN
For instructions on obtaining an access token, see Authentication.

Request Format

  • Content-Type: application/json
  • Character encoding: UTF-8

Response Format

All responses are returned in JSON format. Success (Create Payment):
{
  "success": true,
  "status": "pending",
  "transaction_id": "tx_abc123",
  "gateway_transaction_id": "pi_xxxxx",
  ...
}
Success (Get Payment):
{
  "id": "tx_abc123",
  "status": "completed",
  "amount": 100,
  ...
}
Error:
{
  "error": {
    "type": "invalid_request_error",
    "code": "validation_error",
    "message": "Error message",
    "request_id": "req_abc123xyz789"
  }
}
For error code details, see Error Codes.

Transaction Status

StatusDescription
pendingPayment created, awaiting customer action (redirect flow)
requires_actionAwaiting frontend action (card payment)
authorizedAuthorization complete (awaiting manual capture)
completedPayment completed
failedPayment failed
canceledPayment canceled
partially_refundedPartially refunded
refundedFully refunded