Retrieve a transaction
Fetch the current state of one transaction by its id — its status, amount, card details and more. Use it to reconcile an order, build a receipt, or check on a payment without waiting for a webhook.
GET https://app.securepayapi.com/api/v1/transactions/{id}
Authentication
Authenticate with your secret key as a Bearer token. The key identifies your account, and a request can only return transactions that belong to it.
Authorization: Bearer sp_secret_…
Find your key in the Developer section of your dashboard — see API keys. Keep it on your server; never call this endpoint from a browser.
Path parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The transaction id, e.g. from a webhook or the dashboard. |
Example
curl https://app.securepayapi.com/api/v1/transactions/abcdef0123456789abcdef01 \ -H "Authorization: Bearer sp_secret_…"
Response 200
The transaction record:
{
"id": "abcdef0123456789abcdef01",
"uuid": "a1b2c3d4-…",
"created": 1717000000.0,
"status": 20,
"statustext": "Settled",
"amountpaid": 20,
"currencypaid": "USD",
"usdpaid": 20,
"usdfee": 0.8,
"card": "411111xxxxxx1111",
"cardholder": "Jordan Lee",
"cardcountry": "US",
"cardbank": "Example Bank",
"paymenttypetext": "Visa",
"externalid": "order_123",
"product": "prod_123",
"chargeback": false
}
| Field | Description |
|---|---|
id / uuid | Transaction identifiers |
created | When the transaction was created, in Unix seconds |
status | Current status code — see Transaction statuses |
statustext | Human-readable name of the current status |
amountpaid | Amount paid, in the currency's major units (e.g. 20 = $20.00) |
currencypaid | Currency of the payment |
usdpaid | Amount settled, in USD |
usdfee | Our fee for the transaction, in USD |
card | Masked card number |
cardholder | Name on the card |
cardcountry | Card's issuing country (ISO 3166-1 alpha-2) |
cardbank | Card's issuing bank |
paymenttypetext | Card scheme, e.g. Visa or Mastercard |
externalid | The identifier you set when creating the payment |
product | Catalog product id, when the payment was for one |
chargeback | Whether the transaction has a chargeback |
The response includes every field the payment platform holds for the transaction; the fields above are the ones you'll typically use. Treat unknown fields as informational and code only against the ones you need.
Errors
An error returns a non-200 status and a JSON body:
{ "error": "Transaction not found" }
| Status | Meaning |
|---|---|
401 | The secret key is missing or invalid. |
403 | Your account isn't active. |
404 | No such transaction, or it doesn't belong to your account. |
A transaction that belongs to another account returns 404 — the same as one that doesn't exist — so ids can't be probed across accounts.