Skip to main content
GET
/
v1
/
payments
/
{id}
Get Payment
curl --request GET \
  --url https://api.sandbox.zafapay.com/v1/payments/{id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "tx_abc123",
  "request_id": "req_xyz789",
  "status": "completed",
  "amount": "17.62",
  "currency": "usd",
  "capture_method": "automatic",
  "external_id": "order_12345",
  "payment_method": "card",
  "amount_refunded": "0",
  "original_amount": null,
  "original_currency": null,
  "applied_rate": null,
  "card_brand": "visa",
  "card_last4": "4242",
  "cardholder_name": "John Doe",
  "card_exp_month": 12,
  "card_exp_year": 2028,
  "card_country": "US",
  "card_funding": "credit",
  "payment_method_id": null,
  "is_recurring": false,
  "customer_id": null,
  "email": "customer@example.com",
  "tel": null,
  "product_name": null,
  "error_code": null,
  "refunds": [
    {
      "id": "orf_xyz789",
      "amount": "5.50",
      "status": "succeeded",
      "reason": "Customer request",
      "created_at": "2024-01-15T10:35:00Z"
    }
  ],
  "metadata": {},
  "created_at": "2024-01-15T10:30:00.000Z",
  "updated_at": "2024-01-15T10:31:00.000Z"
}

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.

Authorizations

Authorization
string
header
required

Bearer authentication using access token

Path Parameters

id
string
required

Transaction ID

Example:

"tx_abc123"

Response

Success

id
string

Transaction ID

Example:

"tx_abc123"

request_id
string

Payment request ID

Example:

"req_xyz789"

status
enum<string>

Status

Available options:
pending,
requires_action,
authorized,
completed,
failed,
canceled,
partially_refunded,
refunded
Example:

"completed"

amount
string

Payment amount (string format)

Example:

"17.62"

currency
string

Currency code

Example:

"usd"

capture_method
string

Capture method

Example:

"automatic"

external_id
string

Merchant's order ID

Example:

"order_12345"

payment_method
string

Payment method

Example:

"card"

amount_refunded
string

Refunded amount (string format)

Example:

"0"

original_amount
number | null

Original amount before currency exchange

Example:

null

original_currency
string | null

Original currency before exchange

Example:

null

applied_rate
number | null

Exchange rate applied

Example:

null

card_brand
string | null

Card brand

Example:

"visa"

card_last4
string | null

Last 4 digits of card number

Example:

"4242"

cardholder_name
string | null

Cardholder name

Example:

"John Doe"

card_exp_month
integer | null

Card expiration month (1-12)

Example:

12

card_exp_year
integer | null

Card expiration year

Example:

2028

card_country
string | null

Card issuing country (ISO 3166-1 alpha-2)

Example:

"US"

card_funding
string | null

Card funding type (credit, debit, prepaid)

Example:

"credit"

payment_method_id
string | null

Saved card ID (pmi_xxx format)

Example:

null

is_recurring
boolean

True for recurring payments

Example:

false

customer_id
string | null

Customer ID

Example:

null

email
string | null

Customer email address

Example:

"customer@example.com"

tel
string | null

Customer phone number

Example:

null

product_name
string | null

Product name

Example:

null

error_code
string | null

Unified error code for failed payments (e.g., card_declined, insufficient_funds, expired_card)

Example:

null

refunds
object[]

Refund history

metadata
object

Metadata

created_at
string<date-time>

Created at

Example:

"2024-01-15T10:30:00.000Z"

updated_at
string<date-time>

Updated at

Example:

"2024-01-15T10:31:00.000Z"