Cards and issuing
Single-use, merchant-locked and subscription cards, real-time authorization, and connected card programs.
Cards are the rail most merchants already take, and the one where ndStill can be strictest. On a card program ndStill controls, every authorization comes back to the decision service before the merchant gets an answer, so the same pipeline that decided the agent's pay() call also decides the swipe. This guide covers the card types, how authorization matching works, what happens on timeouts, and how connected card programs differ from ndStill-issued ones.
Where cards come from#
There are two sources, and they share one API.
| Source | What it is | Control level |
|---|---|---|
| ndStill-issued cards | Virtual Visa or Mastercard cards from ndStill's own program, funded from an ndStill account. | Authorize |
| Your own card program | Stripe Issuing, Lithic or Increase, with the program's authorization webhook pointed at ndStill. | Authorize |
| Spend platforms | Ramp, Brex, Mercury and similar. ndStill creates cards and sets limits through their APIs, then watches the feed. | Issue, plus Observe & stop |
The control level matters. With Authorize, ndStill approves or declines each authorization before money moves. With Issue, ndStill writes the limits onto the card and the provider enforces them; ndStill sees spend afterwards and can lock the card. See Control levels and stop time for the full comparison.
Card types#
Every card is minted for a purpose and bound to the decision that created it. The use field says how it can be used:
| Use | Good for | Lifetime |
|---|---|---|
single | One purchase: a flight, a dataset, a one-off order. | Closes after the first capture or at expiry. |
merchant_locked | A repeat vendor. Only that merchant can charge it. | Stays open until revoked; each charge is still decided. |
subscription | A recurring charge with renewal rules. | Renews on the cadence; charges outside it are declined. |
multi | A short task with several small purchases. | Open until its limit or expiry. |
Agents rarely ask for a card directly. They call pay(), the router picks the card rail when the seller only takes cards, and the credential comes back with the approved payment. When you do want a standing card, for a subscription for example, create it with POST/cards:
curl https://api.ndstill.com/v2/cards \
-H "Authorization: Bearer $NDSTILL_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Ndstill-Version: 2026-11-01" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "agt_01JD8X4N2Q",
"use": "merchant_locked",
"merchant": "Figma",
"amount_limit": { "amount": 9000, "asset": "USD" },
"name": "Design seats"
}'The response never contains a card number. It carries a display hint (brand, last4, exp), the spending_controls written to the processor, and credential_id, the scoped credential the card belongs to.
Card numbers never reach the model#
An agent never holds a raw card number. Depending on where it pays, it gets one of these instead:
- A network agent token, where the merchant accepts one. See Agent tokens and checkout tokens.
- Secure fill, for browser agents. The processor's hosted reveal, or ndStill's vault service, types the number into the checkout form inside a sandboxed browser context. The model only sees that the form was filled.
- A single-use reveal, for server-side agents that genuinely need card data. It comes from the vault zone, is bound to the decision ID, and expires quickly.
People can reveal a card from the console with POST/cards/{id}/reveal. That call needs a fresh passkey check, returns a short-lived key for the processor's own frame (frame.mode: "processor"), and is written to the audit log. Card numbers are never rendered in ndStill's own pages.
How an authorization is decided#
When the card is used, the processor sends the authorization to ndStill. The ingress endpoint only verifies the signature, removes duplicates on (provider, event_id), maps the card to its org and hands the event to the decision service in-process. The decision service then:
Finds the credential and its reservation
The card belongs to a credential, and the credential to the decision that minted it. That decision placed a budget reservation when it approved the payment.
Matches the authorization to the reservation
The merchant must resolve to the counterparty in the credential's scope, the amount must be no more than the reserved amount plus the policy's tolerance for that merchant category, the agent must not be frozen, and no risk rule may fire.
Answers inside the processor's window
An approved authorization adjusts the reservation; a declined one releases it. Either way the outcome is signed and written to evidence.
An authorization with no open reservation, such as a subscription renewal, is decided directly against policy as a fresh decision. It runs the whole pipeline:
- Passed
- Held here
- Declined here
- Not on this rail
- Not reached
Tolerance for tips, fuel and hotels#
Some merchant categories authorize an amount that changes at capture. Restaurants add tips, fuel pumps pre-authorize, hotels add incidentals. The policy's tolerance list sets how far above the reserved amount an authorization may go, per merchant category code:
tolerance:
- { mcc: "5812", percent: 20 } # restaurants: tips
- { mcc: "7011", percent: 15 } # hotels: incidentalsTimeouts are designed per processor#
Card networks give the issuer a short window to answer. ndStill's design target for the whole decision is about 80 ms typical and 300 ms at p99, but the backstop matters as much as the target, and it differs by processor:
| Processor | On timeout | ndStill's backstop |
|---|---|---|
| Stripe Issuing | Falls back to the card's own spending controls after about 2 s, and approves if they allow it. | Every card is minted with controls equal to its scope (amount, category, expiry), so a timeout can't exceed the mandate. |
| Lithic, Increase | Declines. | The decline rate caused by timeouts is measured and alerts at 0.1%. |
| ndStill's own program | Configured to decline. | Same measurement and alert. |
This is why card spending controls are always written to the processor, even when ndStill decides every authorization: they are the floor if ndStill can't answer in time. The validator shows which policy rules each card program can hold natively and which are "enforced by ndStill only".
After the authorization#
The card lifecycle continues after the first answer, and each step updates the budget ledger:
- Incremental authorizations and reversals adjust the reservation up or down.
- Partial and multiple captures post the reservation at the captured amount and release the rest.
- Refunds credit the budget windows back.
- Force captures (allowed by the networks without an authorization) are recorded. On ndStill accounts the money ledger absorbs them from the account's reserve.
- Currency conversion is recorded on the decision with the rate snapshot used.
Settlement arrives through processor webhooks and clearing files. It is matched to the authorization in reconciliation, journaled, and the signed receipt goes back to the agent.
Freezing a card#
Freezing is per card or wider. POST/cards/{id}/freeze stops one card; freezing the agent (kill switch) freezes every card it holds, on ndStill's program and on connected programs, and revokes its tokens. Closing a card with POST/cards/{id}/close can't be undone.
Each connected program reports a measured stop time: the gap between the freeze call and the provider confirming it. The console shows it as, for example, "Stops in 0.8 s (p90, measured)", or "Not measured yet" until there are real samples.
Connected card programs#
If you already run a card program on Stripe Issuing, Lithic or Increase, connect it under Connections and point the program's authorization webhook at ndStill. Your cards keep working; ndStill decides each authorization with your policy, and writes your policy's limits onto each card as a backstop. Spend platforms such as Ramp and Brex don't let ndStill approve each authorization, so there ndStill works at the Issue level: it creates cards and limits through their APIs, observes the feed, and locks cards on a freeze.