Skip to main content

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

FieldTypeDescription
id
REQUIRED
stringUnique identifier for the transaction
intentId
REQUIRED
stringAssociated payment intent ID
merchantId
REQUIRED
stringMerchant ID that received the payment
customerId
OPTIONAL
stringCustomer ID if the customer was registered
customerName
OPTIONAL
stringName of the customer
customerEmail
OPTIONAL
stringEmail of the customer
amount
REQUIRED
numberTransaction amount in the smallest currency unit
currency
REQUIRED
stringThree-letter ISO currency code
status
REQUIRED
PaymentStatusCurrent status of the transaction PaymentStatus
paymentMethod
OPTIONAL
PaymentMethodTypePayment method used for this transaction PaymentMethodType
tspProvider
OPTIONAL
stringThird-party service provider that processed the payment
externalTransactionId
OPTIONAL
stringExternal transaction ID from the payment provider
processingFee
OPTIONAL
numberProcessing fee charged for this transaction
netAmount
OPTIONAL
numberNet amount after fees
failureReason
OPTIONAL
stringReason for failure if the transaction failed
metadata
OPTIONAL
Record<string, unknown>Custom key-value data attached to the transaction
createdAt
REQUIRED
stringISO 8601 timestamp when the transaction was created
updatedAt
REQUIRED
stringISO 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"
}