Payment attempts API
What happened on the rail after a decision: authorized, captured, settled and refunded amounts.
Base URL https://api.ndstill.com/v2. Send Authorization: Bearer with a key, Ndstill-Version: 2026-11-01, and an Idempotency-Key on every POST. Conventions, scopes and errors are in the API overview and Errors and decline reasons. Examples come from the mock backend; the shapes are the TypeScript types in packages/api.
List payment attempts#
/v2/payment-attempts- intent_idId
- statusstring
- cursorstring
- limitnumber
1–200, default 50.
- qstring
Free-text search over names, ids and descriptors.
- sortstring
Sort field, prefix "-" for descending ("-created_at" is the default).
- created_gteTimestamp
created_at >= (ISO).
- created_lteTimestamp
created_at <= (ISO).
Returns a list envelope: object "list", data[], has_more, next_cursor (pass it back as cursor) and total when cheap to count. Items:
- idId
- object"payment_attempt"
- org_idId
- created_atTimestamp
- updated_atTimestampoptional
- test_modebooleanoptional
True for test-mode objects (simulations, sandbox).
- intent_idId
- railRail
"card""network_token""checkout_token""stablecoin""bank""ai""cloud" - connectionRef | null
Small reference used for denormalized names in lists (no N+1 lookups in tables).
Ref: 2 fields
- idId
- namestring
- credential_idId | null
- provider_refstring
- statusstring enum
"pending""submitted""authorized""settled""refunded""failed""pending_submission""captured""returned" - amountsobject
4 fields
- authorizedMoney
An amount: integer minor units + asset.
Money: 2 fields
- amountnumber
- assetAssetCode
"USD""USDC""EUR""GBP"
- capturedMoney
An amount: integer minor units + asset.
Money: 2 fields
- amountnumber
- assetAssetCode
"USD""USDC""EUR""GBP"
- settledMoney
An amount: integer minor units + asset.
Money: 2 fields
- amountnumber
- assetAssetCode
"USD""USDC""EUR""GBP"
- refundedMoney
An amount: integer minor units + asset.
Money: 2 fields
- amountnumber
- assetAssetCode
"USD""USDC""EUR""GBP"
- return_codestring | nulloptional
- 400invalid_request
A query parameter is invalid.
- 401authentication
The key or token is missing, expired or revoked.
- 403permission
The key's scopes or the person's role don't allow this.
- 429rate_limited
Slow down; retry after the Retry-After header.
curl -X GET "https://api.ndstill.com/v2/payment-attempts?limit=2" \
-H "Authorization: Bearer $NDSTILL_API_KEY" \
-H "Ndstill-Version: 2026-11-01"{
"object": "list",
"data": [
{
"id": "pa_01M82WARJPDKXFWYSB5FC84TXX",
"object": "payment_attempt",
"org_id": "org_A99F918124609C9DAAACB209D8",
"created_at": "2026-11-23T00:19:11.574Z",
"intent_id": "pi_01M82WARCEDTKCJ2CT2YM49A8M",
"rail": "cloud",
"connection": {
"id": "con_01KZMHZ7MEQ9KST6799SP0GF4G",
"name": "AWS billing"
},
"credential_id": null,
"provider_ref": "ch_92cf5d0652ad8aa990da",
"status": "authorized",
"amounts": {
"authorized": {
"amount": 8947,
"asset": "USD"
},
"captured": {
"amount": 0,
"asset": "USD"
},
"settled": {
"amount": 0,
"asset": "USD"
},
"refunded": {
"amount": 0,
"asset": "USD"
}
},
"return_code": null
},
{
"id": "pa_01M82VJYVPDN2SY7S4760M59NW",
"object": "payment_attempt",
"org_id": "org_A99F918124609C9DAAACB209D8",
"created_at": "2026-11-23T00:06:11.574Z",
"intent_id": "pi_01M82VJYNEJFCMY9VHY5PS5W12",
"rail": "card",
"connection": {
"id": "con_01KMRYA6ME05ZXF7TQQQSF14VK",
"name": "ndStill card program"
},
"credential_id": "cred_01KR2GKNMEF61XSZ58E8NZ7X4Q",
"provider_ref": "ch_4d72f9ce0b262d392a41",
"status": "settled",
"amounts": {
"authorized": {
"amount": 166617,
"asset": "USD"
},
"captured": {
"amount": 166617,
"asset": "USD"
},
"settled": {
"amount": 166617,
"asset": "USD"
},
"refunded": {
"amount": 0,
"asset": "USD"
}
},
"return_code": null
}
],
"has_more": true,
"next_cursor": "Mg==",
"total": 1856
}Runs against the in-browser mock with a test key. Nothing leaves your browser.
Retrieve a payment attempt#
/v2/payment-attempts/{id}- idIdrequired
A prefixed ID from this org.
The same PaymentAttempt object as List payment attempts.
- 401authentication
The key or token is missing, expired or revoked.
- 403permission
The key's scopes or the person's role don't allow this.
- 404not_found
No object with that id in this org.
- 429rate_limited
Slow down; retry after the Retry-After header.
curl -X GET "https://api.ndstill.com/v2/payment-attempts/pa_01M82WARJPDKXFWYSB5FC84TXX" \
-H "Authorization: Bearer $NDSTILL_API_KEY" \
-H "Ndstill-Version: 2026-11-01"{
"id": "pa_01M82WARJPDKXFWYSB5FC84TXX",
"object": "payment_attempt",
"org_id": "org_A99F918124609C9DAAACB209D8",
"created_at": "2026-11-23T00:19:11.574Z",
"intent_id": "pi_01M82WARCEDTKCJ2CT2YM49A8M",
"rail": "cloud",
"connection": {
"id": "con_01KZMHZ7MEQ9KST6799SP0GF4G",
"name": "AWS billing"
},
"credential_id": null,
"provider_ref": "ch_92cf5d0652ad8aa990da",
"status": "authorized",
"amounts": {
"authorized": {
"amount": 8947,
"asset": "USD"
},
"captured": {
"amount": 0,
"asset": "USD"
},
"settled": {
"amount": 0,
"asset": "USD"
},
"refunded": {
"amount": 0,
"asset": "USD"
}
},
"return_code": null
}Runs against the in-browser mock with a test key. Nothing leaves your browser.