Skip to main content

A transaction represents a completed or attempted payment through a payment page. Includes payment details, customer information, and custom field responses.

id
string

Unique identifier for the transaction

Example:

"pt_9N2a38DJQWPL8K4X"

payment_page_id
string

ID of the payment page used for this transaction

Example:

"pp_EVT9283NAKSD8234SKJD"

status
enum<string>

Status of a payment transaction

Available options:
succeeded,
failed
Example:

"succeeded"

amount
integer

The amount to be charged in the smallest currency unit. For example, 20.00 ZAR is represented as 2000 cents. Learn more about minor units.

Example:

1000

currency
string

The ISO 4217 currency code for the payment.

Example:

"ZAR"

customer
object

Customer information collected on the Payment Page. This is omitted if requires_customer_details is set to false.

custom_fields
object

Customer responses to custom fields if provided.

Example:
{
"session_choice": "Morning (8AM–12PM)",
"dietary_restrictions": "Vegan",
"referral_code": "FITWELL100"
}
payment_id
string

Internal payment object linked to the transaction

Example:

"p_xyz789abc123def456"

products
object[]

List of purchased products in this transaction

Example:
[
{
"product_id": "product_123123",
"product_name": "sample product",
"qty": 123,
"price": 1123,
"currency": "ZAR",
"description": "testing product desc"
}
]
checkout_session_id
string

ID of the checkout session that processed this transaction

Example:

"chk_456789abc123def"

delivery_address
object

Delivery/shipping address provided by the customer Customer delivery/shipping address

Example:
{
"line1": "123 Main Street",
"line2": "Apt 4B",
"city": "Cape Town",
"state": "Western Cape",
"country": "ZA",
"pin": "8001"
}
metadata
object

Custom key-value metadata for reconciliation

Example:
{ "event_id": "wellness_nairobi_2025" }
created_at
string<date-time>

ISO timestamp of when the transaction was initiated

Example:

"2025-06-18T08:45:00Z"

updated_at
string<date-time>

ISO timestamp of the last status update

Example:

"2025-06-18T08:45:10Z"