Skip to Content
API reference · Transactions

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.

GET/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 onSuccess callback. Altruon.js passes transactionId and message to 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 the trx_id query parameter.
  • After a webhook. Webhook payloads are thin. Use the event as a trigger and read the current state here.
Confirm a payment
BrowserYour serverAltruon01 transactionId from onSuccess02 GET transaction details03 Transaction and billing records04 Confirmation

Check the result on your server before you grant access:

  • transaction.status is success.
  • transaction.amount and transaction.currency match what you expected to charge.
  • subscription.idAtBillingPlatform is present.

Path parameters

transactionIdstringrequired

The Altruon transaction ID: transactionId from the onSuccess callback, or trx_id from the redirect.

The request has no body.

Response

transactionobject

The payment attempt.

idstring

Altruon transaction ID.

idAtGatewaystring

ID of the transaction at the acquirer.

urlAtGatewaystring

Direct link to the transaction in the acquirer dashboard.

typestring

Kind of transaction, for example initialPayment or recurringPayment.

amountstring

Amount 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.

amountInMajorUnitstring

The same amount in major units, for example "5.00". Computed from amount with the decimals of the currency. Use it for display.

currencystring

ISO 4217 currency code, for example USD, EUR or BRL.

statusstring

success, failed or pending.

gatewaystring

Name of the acquirer, for example checkoutcom or stripe.

errorMessagestring | null

Error message if the transaction failed. null if it succeeded.

customerobject

The customer on the billing platform.

idAtBillingPlatformstring

Customer ID on the billing platform, for example a Stripe Billing customer ID.

urlAtBillingstring

Direct link to the customer in the billing platform dashboard.

billingPlatformstring

Name of the billing platform, for example stripe, chargebee or recurly.

invoiceobject

The invoice this transaction pays.

idAtBillingPlatformstring

Invoice ID on the billing platform.

urlAtBillingstring

Direct link to the invoice in the billing platform dashboard.

amountstring

Invoice amount in minor units, as a string. The number of decimals depends on the currency.

amountInMajorUnitstring

The same amount in major units. Use it for display.

currencystring

ISO 4217 currency code.

billingPlatformstring

Name of the billing platform.

subscriptionobject

The subscription on the billing platform.

idAtBillingPlatformstring

Subscription ID on the billing platform.

urlAtBillingstring

Direct link to the subscription in the billing platform dashboard.

nextBillingDatestring

ISO 8601 timestamp of the next billing date, for example 2025-10-31T15:11:19Z.

billingPlatformstring

Name 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.

FieldUse it to
transaction.id, transaction.idAtGatewayTrack the payment in Altruon and at the acquirer
customer.idAtBillingPlatformLink the payment to the account in your system
subscription.idAtBillingPlatform, subscription.nextBillingDateKnow which subscription is active and when it renews
invoice.idAtBillingPlatformFind the original invoice on the billing platform
urlAtGateway, urlAtBillingOpen the transaction, customer, invoice or subscription in the provider dashboard

Errors

StatusMeaningWhat to do
401The secret key is missing or invalid.Check the x-secret-key header.
404No 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"