The Transaction object
Represents a completed or in-progress transaction. Transactions are created when a payment intent is confirmed and track the actual movement of funds.
Fields
| Field | Type | Description |
|---|---|---|
id REQUIRED | string | Unique identifier for the transaction |
intentId REQUIRED | string | Associated payment intent ID |
merchantId REQUIRED | string | Merchant ID that received the payment |
customerId OPTIONAL | string | Customer ID if the customer was registered |
customerName OPTIONAL | string | Name of the customer |
customerEmail OPTIONAL | string | Email of the customer |
amount REQUIRED | number | Transaction amount in the smallest currency unit |
currency REQUIRED | string | Three-letter ISO currency code |
status REQUIRED | PaymentStatus | Current status of the transaction PaymentStatus |
paymentMethod OPTIONAL | PaymentMethodType | Payment method used for this transaction PaymentMethodType |
tspProvider OPTIONAL | string | Third-party service provider that processed the payment |
externalTransactionId OPTIONAL | string | External transaction ID from the payment provider |
processingFee OPTIONAL | number | Processing fee charged for this transaction |
netAmount OPTIONAL | number | Net amount after fees |
failureReason OPTIONAL | string | Reason for failure if the transaction failed |
metadata OPTIONAL | Record<string, unknown> | Custom key-value data attached to the transaction |
createdAt REQUIRED | string | ISO 8601 timestamp when the transaction was created |
updatedAt REQUIRED | string | ISO 8601 timestamp when the transaction was last updated |
Example
{
"id": "obj_1a2b3c",
"intentId": "intent_1a2b3c",
"merchantId": "merchant_1a2b3c",
"customerId": "customer_1a2b3c",
"customerName": "string",
"customerEmail": "customer@example.com",
"amount": 5000,
"currency": "USD",
"status": "pending",
"createdAt": "2026-01-15T09:30:00Z",
"updatedAt": "2026-01-15T09:30:00Z"
}