Docs

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

ParameterTypeDescription
idstringThe 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
}
FieldDescription
id / uuidTransaction identifiers
createdWhen the transaction was created, in Unix seconds
statusCurrent status code — see Transaction statuses
statustextHuman-readable name of the current status
amountpaidAmount paid, in the currency's major units (e.g. 20 = $20.00)
currencypaidCurrency of the payment
usdpaidAmount settled, in USD
usdfeeOur fee for the transaction, in USD
cardMasked card number
cardholderName on the card
cardcountryCard's issuing country (ISO 3166-1 alpha-2)
cardbankCard's issuing bank
paymenttypetextCard scheme, e.g. Visa or Mastercard
externalidThe identifier you set when creating the payment
productCatalog product id, when the payment was for one
chargebackWhether the transaction has a chargeback
Note

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" }
StatusMeaning
401The secret key is missing or invalid.
403Your account isn't active.
404No such transaction, or it doesn't belong to your account.
Note

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.

© securepayAPI · Built with Markdoc