> ## Documentation Index
> Fetch the complete documentation index at: https://docs.natural.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> When building application code, use `@naturalpay/sdk` for TypeScript or `naturalpay` for Python.
> When operating Natural directly for a user, use the payments MCP at `https://mcp.natural.com`.
> When searching Natural documentation, use the docs MCP at `https://docs.natural.com/mcp`.
> Use the Natural CLI for terminal and CI automation.
> Use REST only for unsupported languages or when the user explicitly requests raw HTTP.
> Start integration development and testing in the sandbox. Do not use production unless the user explicitly requests it.
> For sandbox requests that require `customerPartyId`, list customers first. Reuse only the intended fixture; otherwise create a customer.
> REST and SDK amounts use integer minor units. Payments MCP amounts use decimal strings with a required currency code.

# Overview

> Let agents spend from an approved budget without seeing the real card number

Agent tokens let an [agent](/guides/concepts/agents) pay from a budget the card owner approved once, instead of asking for approval on every purchase.

The owner creates a mandate (`amd_*`) on the dashboard for one of their [saved cards](/guides/concepts/saved-cards). A mandate is a budget for one agent: a total amount, a per-purchase limit and an expiry. For each purchase, the agent claims a tokenized card issued against the mandate. It isn't the saved card's number, so the agent stays out of PCI scope.

Use agent tokens when the user can't approve each purchase, or when the checkout encrypts the card in the browser so [browser tokens](/guides/concepts/browser-tokens) can't pay. See [choose a method](/guides/concepts/agent-checkout#choose-a-method).

Agent tokens are for agents: call them with an [agent key](/guides/concepts/agent-keys) and the `X-Instance-ID` header. Support for Natural-issued cards is coming soon.

## Flow

1. **Get approved.** The owner creates a mandate for the agent on the dashboard and verifies it with their card issuer.
2. **Find a mandate.** [`GET /agentic-payments/mandates`](/api-reference/agent-tokens/list-agentic-mandates) lists the agent's mandates. Use one with `status` `active` and enough `available` budget.
3. **Create a purchase.** [`POST /agentic-payments/purchases`](/api-reference/agent-tokens/create-agentic-purchase) with the `mandateId`, the `amount`, the `merchant` (name, `https` URL and country code) and a `ttlSeconds` of 60 to 600. This reserves the amount from the mandate. Send an `Idempotency-Key`, and retry with the same key.
4. **Claim.** [`POST /agentic-payments/purchases/{purchaseId}/claim`](/api-reference/agent-tokens/claim-purchase-credential) returns the card number, expiry and CVC for this purchase. It succeeds once; the credential can't be fetched again. Don't log or store it.
5. **Check out.** Enter the card details in the merchant's checkout before `expiresAt`.

If the agent won't check out, [cancel the purchase](/api-reference/agent-tokens/cancel-agentic-purchase) before claiming it to release the reserved budget. A claimed purchase still counts against the mandate, even if no order was placed.

## Limits

* A purchase covers one checkout. For another checkout, create a new purchase.
* `amount` can't exceed the mandate's `perPurchaseLimit` or its `available` budget. Amounts are in USD minor units.
* The credential stops working at `expiresAt`, or when the mandate expires or is revoked, whichever comes first.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.