Cards API
Virtual cards issued for agents: single-use, merchant-locked, subscription or multi-use.
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.
Create a card#
/v2/cardsIssue a virtual card for an agent: single-use, merchant-locked, subscription or multi-use, with spending controls equal to its scope.
- agent_idIdrequired
- useCardUserequired
"single""merchant_locked""subscription""multi" - amount_limitMoneyrequired
An amount: integer minor units + asset.
Money: 2 fields
- amountnumberrequired
- assetAssetCoderequired
"USD""USDC""EUR""GBP"
- merchantstring
- namestring
- idId
- object"card"
- org_idId
- created_atTimestamp
- updated_atTimestampoptional
- test_modebooleanoptional
True for test-mode objects (simulations, sandbox).
- agentRef
Small reference used for denormalized names in lists (no N+1 lookups in tables).
Ref: 2 fields
- idId
- namestring
- namestring
- brandstring enum
"visa""mastercard" - last4string
- expstring
- useCardUse
"single""merchant_locked""subscription""multi" - processorstring
- credential_idId | null
- spending_controlsobject
4 fields
- amount_limitMoney
An amount: integer minor units + asset.
Money: 2 fields
- amountnumber
- assetAssetCode
"USD""USDC""EUR""GBP"
- intervalstring enum
"day""month""per_authorization""all_time" - merchantstring | nulloptional
- mccstring[]optional
- statusstring enum
"active""expired""frozen""closed" - spentMoney
An amount: integer minor units + asset.
Money: 2 fields
- amountnumber
- assetAssetCode
"USD""USDC""EUR""GBP"
- last_used_atTimestamp | null
- recent_authorizationsobject[]
7 fields
- idId
- atTimestamp
- merchantstring
- amountMoney
An amount: integer minor units + asset.
Money: 2 fields
- amountnumber
- assetAssetCode
"USD""USDC""EUR""GBP"
- approvedboolean
- intent_idId | null
- reasonstring | nulloptional
- 400invalid_request
A field is missing or invalid; fields names each one.
- 401authentication
The key or token is missing, expired or revoked.
- 403permission
The key's scopes or the person's role don't allow this.
- 409conflict
The object changed or already exists, or the Idempotency-Key was reused with a different body.
- 429rate_limited
Slow down; retry after the Retry-After header.
curl -X POST "https://api.ndstill.com/v2/cards" \
-H "Authorization: Bearer $NDSTILL_API_KEY" \
-H "Ndstill-Version: 2026-11-01" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "agt_01M0BGNZCE0WXNVXXAV8BF3DEZ",
"use": "single",
"amount_limit": {
"amount": 5000,
"asset": "USD"
},
"merchant": "Delta Air Lines"
}'{
"id": "crd_01M82XPRP1G05W5FBCEVENGQH2",
"object": "card",
"org_id": "org_A99F918124609C9DAAACB209D8",
"created_at": "2026-11-23T00:43:13.473Z",
"agent": {
"id": "agt_01M0BGNZCE0WXNVXXAV8BF3DEZ",
"name": "Code reviewer"
},
"name": "Code reviewer · single",
"brand": "visa",
"last4": "4721",
"exp": "11/28",
"use": "single",
"processor": "ndStill card program (demo processor)",
"credential_id": null,
"spending_controls": {
"amount_limit": {
"amount": 5000,
"asset": "USD"
},
"interval": "per_authorization",
"merchant": "Delta Air Lines"
},
"status": "active",
"spent": {
"amount": 0,
"asset": "USD"
},
"last_used_at": null,
"recent_authorizations": []
}Runs against the in-browser mock with a test key. Nothing leaves your browser.
List cards#
/v2/cards- agent_idId
- statusstring enum
"active""expired""frozen""closed" - usestring enum
"single""merchant_locked""subscription""multi" - 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:
The same Card object as Create a card.
- 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/cards?limit=2" \
-H "Authorization: Bearer $NDSTILL_API_KEY" \
-H "Ndstill-Version: 2026-11-01"{
"object": "list",
"data": [
{
"id": "crd_3E98F27567F1D07531DAA2858D",
"object": "card",
"org_id": "org_A99F918124609C9DAAACB209D8",
"created_at": "2026-11-18T00:43:12.531Z",
"agent": {
"id": "agt_01M0BGNZCE0WXNVXXAV8BF3DEZ",
"name": "Code reviewer"
},
"name": "Code reviewer · GitHub only",
"brand": "mastercard",
"last4": "7289",
"exp": "05/28",
"use": "merchant_locked",
"processor": "ndStill card program (demo processor)",
"credential_id": null,
"spending_controls": {
"amount_limit": {
"amount": 50000,
"asset": "USD"
},
"interval": "month",
"merchant": "GitHub",
"mcc": [
"5734"
]
},
"status": "active",
"spent": {
"amount": 21000,
"asset": "USD"
},
"last_used_at": "2026-11-20T15:43:12.531Z",
"recent_authorizations": [
{
"id": "auth_9342fd1d6400",
"at": "2026-11-20T15:43:12.531Z",
"merchant": "GITHUB, INC.",
"amount": {
"amount": 21000,
"asset": "USD"
},
"approved": true,
"intent_id": null,
"reason": null
}
]
},
{
"id": "crd_01M795QGMEHKNK51C6SQFAEW6P",
"object": "card",
"org_id": "org_A99F918124609C9DAAACB209D8",
"created_at": "2026-11-13T00:43:11.374Z",
"agent": {
"id": "agt_01KWY9N54EWVW2B9R5VCDZ7753",
"name": "Social scheduler"
},
"name": "Social scheduler · general",
"brand": "visa",
"last4": "7638",
"exp": "11/27",
"use": "multi",
"processor": "ndStill card program (demo processor)",
"credential_id": "cred_01M795QGME4A84JK3DN5G1HZRC",
"spending_controls": {
"amount_limit": {
"amount": 183800,
"asset": "USD"
},
"interval": "month",
"merchant": null
},
"status": "frozen",
"spent": {
"amount": 1033119,
"asset": "USD"
},
"last_used_at": "2026-11-22T22:22:59.441Z",
"recent_authorizations": [
{
"id": "auth_01M82NNZVHK7",
"at": "2026-11-22T22:22:59.441Z",
"merchant": "FACEBK *ADS",
"amount": {
"amount": 9494,
"asset": "USD"
},
"approved": false,
"intent_id": "pi_01M82NNZVHK7ZP8E1T4M5GAC15",
"reason": "Social scheduler is frozen."
},
{
"id": "auth_01M8275V2NNM",
"at": "2026-11-22T18:09:30.197Z",
"merchant": "FACEBK *ADS",
"amount": {
"amount": 107819,
"asset": "USD"
},
"approved": false,
"intent_id": "pi_01M8275V2NNMGE453H6MCW5R4N",
"reason": "Social scheduler is frozen."
},
{
"id": "auth_01M7ZJK0T1G5",
"at": "2026-11-21T17:31:13.089Z",
"merchant": "FACEBK *ADS",
"amount": {
"amount": 43400,
"asset": "USD"
},
"approved": false,
"intent_id": "pi_01M7ZJK0T1G57VTA83C230109Z",
"reason": "Social scheduler is frozen."
}
]
}
],
"has_more": true,
"next_cursor": "Mg==",
"total": 22
}Runs against the in-browser mock with a test key. Nothing leaves your browser.
Retrieve a card#
/v2/cards/{id}- idIdrequired
A prefixed ID from this org.
The same Card object as Create a card.
- 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/cards/crd_3E98F27567F1D07531DAA2858D" \
-H "Authorization: Bearer $NDSTILL_API_KEY" \
-H "Ndstill-Version: 2026-11-01"{
"id": "crd_3E98F27567F1D07531DAA2858D",
"object": "card",
"org_id": "org_A99F918124609C9DAAACB209D8",
"created_at": "2026-11-18T00:43:12.531Z",
"agent": {
"id": "agt_01M0BGNZCE0WXNVXXAV8BF3DEZ",
"name": "Code reviewer"
},
"name": "Code reviewer · GitHub only",
"brand": "mastercard",
"last4": "7289",
"exp": "05/28",
"use": "merchant_locked",
"processor": "ndStill card program (demo processor)",
"credential_id": null,
"spending_controls": {
"amount_limit": {
"amount": 50000,
"asset": "USD"
},
"interval": "month",
"merchant": "GitHub",
"mcc": [
"5734"
]
},
"status": "active",
"spent": {
"amount": 21000,
"asset": "USD"
},
"last_used_at": "2026-11-20T15:43:12.531Z",
"recent_authorizations": [
{
"id": "auth_9342fd1d6400",
"at": "2026-11-20T15:43:12.531Z",
"merchant": "GITHUB, INC.",
"amount": {
"amount": 21000,
"asset": "USD"
},
"approved": true,
"intent_id": null,
"reason": null
}
]
}Runs against the in-browser mock with a test key. Nothing leaves your browser.
Close a card#
/v2/cards/{id}/close- idIdrequired
A prefixed ID from this org.
The same Card object as Create a card.
- 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.
- 409conflict
The object changed or already exists, or the Idempotency-Key was reused with a different body.
- 429rate_limited
Slow down; retry after the Retry-After header.
curl -X POST "https://api.ndstill.com/v2/cards/crd_01M82XPRP1G05W5FBCEVENGQH2/close" \
-H "Authorization: Bearer $NDSTILL_API_KEY" \
-H "Ndstill-Version: 2026-11-01" \
-H "Idempotency-Key: $(uuidgen)"{
"id": "crd_01M82XPRP1G05W5FBCEVENGQH2",
"object": "card",
"org_id": "org_A99F918124609C9DAAACB209D8",
"created_at": "2026-11-23T00:43:13.473Z",
"agent": {
"id": "agt_01M0BGNZCE0WXNVXXAV8BF3DEZ",
"name": "Code reviewer"
},
"name": "Code reviewer · single",
"brand": "visa",
"last4": "4721",
"exp": "11/28",
"use": "single",
"processor": "ndStill card program (demo processor)",
"credential_id": null,
"spending_controls": {
"amount_limit": {
"amount": 5000,
"asset": "USD"
},
"interval": "per_authorization",
"merchant": "Delta Air Lines"
},
"status": "closed",
"spent": {
"amount": 0,
"asset": "USD"
},
"last_used_at": null,
"recent_authorizations": [],
"updated_at": "2026-11-23T00:43:13.565Z"
}Runs against the in-browser mock with a test key. Nothing leaves your browser.
Freeze a card#
/v2/cards/{id}/freeze- idIdrequired
A prefixed ID from this org.
The same Card object as Create a card.
- 400step_up_required
A person must confirm with a passkey first, when the org requires it.
- 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.
- 409conflict
The object changed or already exists, or the Idempotency-Key was reused with a different body.
- 429rate_limited
Slow down; retry after the Retry-After header.
curl -X POST "https://api.ndstill.com/v2/cards/crd_01M82XPRP1G05W5FBCEVENGQH2/freeze" \
-H "Authorization: Bearer $NDSTILL_API_KEY" \
-H "Ndstill-Version: 2026-11-01" \
-H "Idempotency-Key: $(uuidgen)"{
"id": "crd_01M82XPRP1G05W5FBCEVENGQH2",
"object": "card",
"org_id": "org_A99F918124609C9DAAACB209D8",
"created_at": "2026-11-23T00:43:13.473Z",
"agent": {
"id": "agt_01M0BGNZCE0WXNVXXAV8BF3DEZ",
"name": "Code reviewer"
},
"name": "Code reviewer · single",
"brand": "visa",
"last4": "4721",
"exp": "11/28",
"use": "single",
"processor": "ndStill card program (demo processor)",
"credential_id": null,
"spending_controls": {
"amount_limit": {
"amount": 5000,
"asset": "USD"
},
"interval": "per_authorization",
"merchant": "Delta Air Lines"
},
"status": "frozen",
"spent": {
"amount": 0,
"asset": "USD"
},
"last_used_at": null,
"recent_authorizations": [],
"updated_at": "2026-11-23T00:43:13.561Z"
}Runs against the in-browser mock with a test key. Nothing leaves your browser.
Reveal a card#
/v2/cards/{id}/revealShow card details through the processor's hosted frame after a step-up. The reveal is logged.
- idIdrequired
A prefixed ID from this org.
- step_upstringrequired
- object"card_reveal"
- card_idId
- processorstring
- ephemeral_keystring
Single-use key for the processor frame (identifier).
- expires_atTimestamp
- frameobject | object
One of 2 shapes
- mode"processor"
- urlstring
- mode"demo"
- panstring
- cvcstring
- expstring
- namestring
- 400invalid_request
A field is missing or invalid; fields names each one.
- 400step_up_required
A person must confirm with a passkey first, when the org requires it.
- 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.
- 409conflict
The object changed or already exists, or the Idempotency-Key was reused with a different body.
- 429rate_limited
Slow down; retry after the Retry-After header.
curl -X POST "https://api.ndstill.com/v2/cards/crd_3E98F27567F1D07531DAA2858D/reveal" \
-H "Authorization: Bearer $NDSTILL_API_KEY" \
-H "Ndstill-Version: 2026-11-01" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"step_up": "passkey_assertion_from_webauthn"
}'{
"object": "card_reveal",
"card_id": "crd_3E98F27567F1D07531DAA2858D",
"processor": "ndStill card program (demo processor)",
"ephemeral_key": "ek_22761968ab182c95fe5bf5d8",
"expires_at": "2026-11-23T00:44:13.576Z",
"frame": {
"mode": "demo",
"pan": "5200 0033 4510 7289",
"cvc": "336",
"exp": "05/28",
"name": "Code reviewer"
}
}Runs against the in-browser mock with a test key. Nothing leaves your browser.
Unfreeze a card#
/v2/cards/{id}/unfreeze- idIdrequired
A prefixed ID from this org.
The same Card object as Create a card.
- 400step_up_required
A person must confirm with a passkey first, when the org requires it.
- 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.
- 409conflict
The object changed or already exists, or the Idempotency-Key was reused with a different body.
- 429rate_limited
Slow down; retry after the Retry-After header.
curl -X POST "https://api.ndstill.com/v2/cards/crd_01M82XPRP1G05W5FBCEVENGQH2/unfreeze" \
-H "Authorization: Bearer $NDSTILL_API_KEY" \
-H "Ndstill-Version: 2026-11-01" \
-H "Idempotency-Key: $(uuidgen)"{
"id": "crd_01M82XPRP1G05W5FBCEVENGQH2",
"object": "card",
"org_id": "org_A99F918124609C9DAAACB209D8",
"created_at": "2026-11-23T00:43:13.473Z",
"agent": {
"id": "agt_01M0BGNZCE0WXNVXXAV8BF3DEZ",
"name": "Code reviewer"
},
"name": "Code reviewer · single",
"brand": "visa",
"last4": "4721",
"exp": "11/28",
"use": "single",
"processor": "ndStill card program (demo processor)",
"credential_id": null,
"spending_controls": {
"amount_limit": {
"amount": 5000,
"asset": "USD"
},
"interval": "per_authorization",
"merchant": "Delta Air Lines"
},
"status": "active",
"spent": {
"amount": 0,
"asset": "USD"
},
"last_used_at": null,
"recent_authorizations": [],
"updated_at": "2026-11-23T00:43:13.563Z"
}Runs against the in-browser mock with a test key. Nothing leaves your browser.