You can use this API to get the status of the transaction that corresponds to a particular intent. This API also returns the masked card info of the payer (if it’s a card transaction) and the transaction lifecycle, which includes multiple attempts, failures, and other checkpoints during a transaction.
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Unique identifier of the intent
"in_fooBOwYsaK50AEfK"
List of fields to expand in the response. Available options:
charge_attempts : includes all charge attemptssucceeded_charge : includes the successful charge detailscharge_attempts, succeeded_charge Successful response with transaction status and related details
The amount in lowest count unit (e.g., cents for USD)
100
Three-letter currency code
"USD"
The currency that the customer paid in
"USD"
Your identifier for the order
"order123"
Your unique identifier for the customer. This can be used to associate the payment with a specific customer in your system.
"cus_Tfd3Jq1tZxPjYVhRQW2r3"
Description of the order, if any
"Order for 2 items"
Callback URL to notify order status
"https://example.com/callback"
The URL to redirect the customer to when they cancel the payment.
"https://example.com/cancel"
Timestamp of when the intent was created
"2024-09-26T10:41:50.472+00:00"
Current status of the intent.
"CREATED"
Unique identifier of the intent
"in_fooBOwYsaK50AEfK"
Epoch timestamp in milliseconds of when the payment was successfully completed
1727340330123
A collection of key-value pairs that were provided when the object was created. These metadata values are echoed back in the response, allowing you to store and retrieve custom information such as context-specific attributes, references, or tags. This can be useful for correlating records in your system or attaching meaningful context to transactions.
{
"orderId": "12345",
"customerNote": "Deliver after 5 PM"
}List of all charge attempts for this intent. Only included when charge_attempts is specified in the expand parameter.
[
{
"status": "FAILED",
"paymentMetadata": {
"paymentMethod": "CARD",
"cardMetadata": {
"brand": "Visa",
"country": "US",
"lastFourDigit": "4242",
"expiryMonth": 12,
"expiryYear": 2025
}
},
"chargeTime": 1727340330123,
"errorCode": "card_declined"
},
{
"status": "SUCCESS",
"paymentMetadata": {
"paymentMethod": "CARD",
"cardMetadata": {
"brand": "Visa",
"country": "US",
"lastFourDigit": "4242",
"expiryMonth": 12,
"expiryYear": 2025
}
},
"chargeTime": 1727340331123,
"errorCode": null
}
]Details of the successful charge attempt. Only included when succeeded_charge is specified in the expand parameter and the payment was successful.
{
"status": "SUCCESS",
"paymentMetadata": {
"paymentMethod": "CARD",
"cardMetadata": {
"brand": "Visa",
"country": "US",
"lastFourDigit": "4242",
"expiryMonth": 12,
"expiryYear": 2025
}
},
"chargeTime": 1727340331123,
"errorCode": null
}