securepayAPIDocs

Retrieve a transaction

Fetch the current state of one transaction by its id — its status, amount, card details, refund and dispute state. Use it to reconcile an order, build a receipt, or check on a payment without waiting for a webhook. It is the authoritative record: when a webhook and this endpoint disagree, this endpoint wins.

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. A publishable key (sp_client_…) is refused.

Path parameters

ParameterTypeDescription
idstringThe payment platform's transaction reference — transaction_reference on a Payment Intent, the id in a webhook, or the reference shown in the dashboard. Newly issued references are 16 characters starting with LU; any id must match [A-Za-z0-9_-]{1,64}. This is not the Payment Intent id.

One Payment Intent can have several transactions — each payment attempt gets its own reference, and the intent's transaction_reference names the latest one.

Example

bash
curl https://app.securepayapi.com/api/v1/transactions/LUZH24T2E65K3NN4 \
  -H "Authorization: Bearer sp_secret_…"

Response 200

The transaction record, as the payment platform holds it:

json
{
  "id": "LUZH24T2E65K3NN4",
  "payin_method": "card",
  "card_brand": "visa",
  "payment_network": null,
  "payment_provider": "…",
  "payment_provider_config_id": null,
  "created": 1789123456.789,
  "transaction": null,
  "status": 1,
  "statustext": "Paid",
  "paymenttype": 1,
  "paymenttypetext": "ECOM",
  "payment_channel": 1,
  "funding_method": 1,
  "payment_channel_text": "ecommerce",
  "funding_method_text": "card",
  "deliverystatus": 1,
  "deliverystatustext": "Delivery Pending",
  "url": null,
  "cardholder": "Jordan Lee",
  "card": "411111xxxxxx1111",
  "cardbank": "Example Bank",
  "cardcountry": "US",
  "amountpaid": 49.99,
  "currencypaid": "USD",
  "usdpaid": 49.99,
  "usdfee": 1.75,
  "tokenssent": null,
  "product": null,
  "chain": null,
  "token": null,
  "nonce": null,
  "externalReference": "ORDER-42",
  "externalid": "ORDER-42",
  "invoice": null,
  "order": null,
  "merchantid": "7TTR77ZC",
  "chargeback": false,
  "processorid": "…",
  "refund_reason": null,
  "refund_request_source": null,
  "refund_requested_at": null,
  "refunded_presentment_amount": "0",
  "pending_refund_presentment_amount": "0",
  "partial_refund_count": 0,
  "refunds": []
}

For a payment made through the widget, externalid is the externalid you set on the Payment Intent — or the intent id when you set none. Values are illustrative.

FieldDescription
idThe transaction reference — the only identifier
createdWhen the transaction was created, in Unix seconds (may have a fractional part; webhooks carry milliseconds)
statusCurrent status code — see Transaction statuses. Code against this number.
statustextHuman-readable label of the status (Paid, Settled, Payment 3DS Challenge, …). For a FAILED transaction it is the decline reason instead (e.g. Insufficient funds) — code on status, not on this text
amountpaidAmount, as a JSON number in the currency's major units (e.g. 49.99)
currencypaidCurrency of the payment
usdpaidThe payment's reporting amount in USD (not the settlement amount)
usdfeeOur fee for the transaction, in USD
cardMasked card number
cardholderName on the card
cardcountry, cardbankCard's issuing country (ISO 3166-1 alpha-2) and bank; may be null
card_brand, payin_method, payment_networkCard scheme in lower case, how the shopper paid, and the executed network — see below
payment_provider, payment_provider_config_idThe processor that executed the payment (a lower-case name) and its configuration, or null
processoridThe processor's reference for the payment, or null
paymenttype, paymenttypetextChannel code and key (1 / ECOM, 2 / POS, 3 / WIRE, 4 / ACH) — not the card scheme
payment_channel, payment_channel_text0 unknown, 1 ecommerce, 2 pos, 3 bank, 4 blockchain
funding_method, funding_method_text0 unknown, 1 card, 2 ach, 3 wire, 4 usdc, 5 paypal — Apple Pay and Google Pay are 1 card
deliverystatus, deliverystatustextPayout state of the funds: code (0–7, or null) and label — None, Delivery Pending, Delivering, Failed, Unknown if failed or succeeded, Delivered, Frozen, Refunded, Not Set
tokenssent, token, chain, nonce, transaction, urlPayout amount and currency; for crypto payouts also the chain, nonce, payout reference and its block-explorer link. null when not applicable
externalid, externalReferenceThe identifier you set when creating the payment (same value twice)
productThe SKU recorded on the payment, or null
order, invoice{ id, version } of the platform order, and the invoice id, when the payment was for one; else null
merchantidYour merchant id
chargebacktrue while the status is a chargeback or arbitration status (codes 24–33); false during an information request (21–23)
refund_reason, refund_request_source, refund_requested_atSet once a refund was requested; the source is merchant_api, admin or automatic_fraud
refunded_presentment_amount, pending_refund_presentment_amount, partial_refund_count, refundsPartial-refund state: confirmed and pending totals as decimal strings in the payment currency, their count, and the list of refunds. A full refund shows as status 9 (Refunded) or 34 (Refund Pending), not in these totals
customer_card_surchargePresent only when a card surcharge was applied
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.

Reading it correctly

  • Paid means status is 1 (PAID) or 20 (SETTLED). Before fulfilling, also compare amountpaid and currencypaid with your order.
  • Refunds and disputes come later. 34 (refund pending — never announced by webhook), 9 (refunded) and 21–33 (disputes) can follow a paid transaction; a dispute can even follow a refund. Re-read the transaction for orders with a refund or dispute in progress.
  • In progress (10–16) is neither paid nor failed. 16 means the capture was sent: never charge again while it lasts.
Caution

Google Pay in the widget — known issue. When the bank requires a redirect 3-D Secure for a Google Pay payment, the payment can be captured while the Payment Intent stays requires_payment. For an intent that stays requires_payment after the shopper approved a wallet payment, read this endpoint with the intent's transaction_reference (or check the dashboard) before asking for another payment.

Incoming instrument and executed network

payin_method is card, googlepay, applepay, usdc, wire, ach, paypal or unknown, independently of how the merchant is paid out. card_brand is a normalized scheme (visa, mastercard, amex, discover) or null for non-card/unknown metadata. Wallet prefixes and suffixes are removed. Wallet payments still have funding_method: 1 (card).

payment_network is the confirmed executed network, such as pulse, visa or mastercard. It is null for non-card payments, unsupported providers, missing evidence or conflicting evidence. Never infer it from the brand, supported networks or a requested route. Matching durable capture settlement evidence takes precedence; matching successful authorization can establish it for an in-memory attempt. Conflicting or unknown settlement evidence stays null even if earlier authorization named a network. Older wallet rows without recognizable wallet metadata report card; older rows without network evidence report null. An Apple Pay payment funded by Discover and routed over Pulse reports applepay, discover, pulse; a wire paying out USDC reports wire, null, null. These facts expose no PAN, vault reference, wallet token or provider payload.

Errors

An error returns a non-200 status and a JSON body:

json
{ "error": "Transaction not found" }
StatusBodyMeaning
401Unauthorized — provide a valid secret key as a Bearer tokenThe Authorization header is missing, is not a Bearer token, is not a secret key (sp_secret_…) or is unknown — or your account has not been activated on the payment platform yet. Sent with WWW-Authenticate: Bearer.
403Account is not activeYour account is suspended or not active.
404Transaction not foundNo such transaction, or it doesn't belong to your account, or the id is malformed (not [A-Za-z0-9_-]{1,64}), or the payment platform could not be reached.
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. A 404 is also what you get while the payment platform is unreachable, so retry a 404 for a reference you know exists before concluding it is gone.

© 2026 Lumiria LLC · securepayAPI is operated by Lumiria LLC.