Get transaction details
Fetch a transaction with its customer, invoice and subscription on the billing platform, plus links to the acquirer and billing dashboards.
Returns one transaction together with the customer, invoice and subscription it belongs to on your billing platform, and a direct link to each record in the acquirer and billing dashboards.
/api/v1/transaction/{transactionId}/details- Sandbox
https://{your-domain}.api.sandbox.altruon.io- Production
https://{your-domain}.api.altruon.io
Authentication: your secret key in the x-secret-key header. Call this endpoint from your server only. See Authentication.
When to call it
The browser only ever learns the transaction ID. Everything else comes from this endpoint.
- After the
onSuccesscallback. Altruon.js passestransactionIdandmessageto the callback, nothing more. Send the ID to your server and fetch the details there. See Payment results. - After a redirect. When a redirect flow such as 3D Secure returns the shopper to your
redirectUrl, the transaction ID is in thetrx_idquery parameter. - After a webhook. Webhook payloads are thin. Use the event as a trigger and read the current state here.
Check the result on your server before you grant access:
transaction.statusissuccess.transaction.amountandtransaction.currencymatch what you expected to charge.subscription.idAtBillingPlatformis present.
Path parameters
transactionIdstringrequiredThe Altruon transaction ID: transactionId from the onSuccess callback, or trx_id from the redirect.
The request has no body.
Response
transactionobjectThe payment attempt.
idstringAltruon transaction ID.
idAtGatewaystringID of the transaction at the acquirer.
urlAtGatewaystringDirect link to the transaction in the acquirer dashboard.
typestringKind of transaction, for example initialPayment or recurringPayment.
amountstringAmount in minor units, as a string. "500" is 5.00 in USD. The number of decimals depends on the currency: 0 for JPY, 2 for USD and EUR, 3 for KWD.
amountInMajorUnitstringThe same amount in major units, for example "5.00". Computed from amount with the decimals of the currency. Use it for display.
currencystringISO 4217 currency code, for example USD, EUR or BRL.
statusstringsuccess, failed or pending.
gatewaystringName of the acquirer, for example checkoutcom or stripe.
errorMessagestring | nullError message if the transaction failed. null if it succeeded.
customerobjectThe customer on the billing platform.
idAtBillingPlatformstringCustomer ID on the billing platform, for example a Stripe Billing customer ID.
urlAtBillingstringDirect link to the customer in the billing platform dashboard.
billingPlatformstringName of the billing platform, for example stripe, chargebee or recurly.
invoiceobjectThe invoice this transaction pays.
idAtBillingPlatformstringInvoice ID on the billing platform.
urlAtBillingstringDirect link to the invoice in the billing platform dashboard.
amountstringInvoice amount in minor units, as a string. The number of decimals depends on the currency.
amountInMajorUnitstringThe same amount in major units. Use it for display.
currencystringISO 4217 currency code.
billingPlatformstringName of the billing platform.
subscriptionobjectThe subscription on the billing platform.
idAtBillingPlatformstringSubscription ID on the billing platform.
urlAtBillingstringDirect link to the subscription in the billing platform dashboard.
nextBillingDatestringISO 8601 timestamp of the next billing date, for example 2025-10-31T15:11:19Z.
billingPlatformstringName of the billing platform.
Example response
{
"transaction": {
"id": "66a22937-a351-417e-81c1-9ac5164be9ab",
"idAtGateway": "pay_wthwuqodnobedlulbexcjfylma",
"urlAtGateway": "https://dashboard.sandbox.checkout.com/payments/all-payments/payment/pay_wthwuqodnobedlulbexcjfylma",
"type": "initialPayment",
"amount": "12300",
"amountInMajorUnit": "123.00",
"currency": "EUR",
"status": "success",
"gateway": "checkoutcom",
"errorMessage": null
},
"customer": {
"idAtBillingPlatform": "cus_TM8zJeFCKE15oB",
"urlAtBilling": "https://dashboard.stripe.com/customers/cus_TM8zJeFCKE15oB",
"billingPlatform": "stripe"
},
"invoice": {
"idAtBillingPlatform": "in_1SPQhq4hYau76GhIbWx8zT8H",
"urlAtBilling": "https://dashboard.stripe.com/invoices/in_1SPQhq4hYau76GhIbWx8zT8H",
"amount": "12300",
"amountInMajorUnit": "123.00",
"currency": "EUR",
"billingPlatform": "stripe"
},
"subscription": {
"idAtBillingPlatform": "sub_1SPQhq4hYau76GhIFvpT8HSx",
"urlAtBilling": "https://dashboard.stripe.com/subscriptions/sub_1SPQhq4hYau76GhIFvpT8HSx",
"nextBillingDate": "2025-12-03T16:34:10Z",
"billingPlatform": "stripe"
}
}What to store
Keep the IDs and links so support and reconciliation can go from your records to the provider in one click.
| Field | Use it to |
|---|---|
transaction.id, transaction.idAtGateway | Track the payment in Altruon and at the acquirer |
customer.idAtBillingPlatform | Link the payment to the account in your system |
subscription.idAtBillingPlatform, subscription.nextBillingDate | Know which subscription is active and when it renews |
invoice.idAtBillingPlatform | Find the original invoice on the billing platform |
urlAtGateway, urlAtBilling | Open the transaction, customer, invoice or subscription in the provider dashboard |
Errors
| Status | Meaning | What to do |
|---|---|---|
401 | The secret key is missing or invalid. | Check the x-secret-key header. |
404 | No transaction with this ID. | Check the transaction ID. |
A failed payment is not an API error: the transaction is returned with status set to failed and the reason in errorMessage. See Errors for the error response shape.
Code samples
curl "https://{your-domain}.api.sandbox.altruon.io/api/v1/transaction/{transactionId}/details" \
-H "x-secret-key: $ALTRUON_SECRET_KEY"