Skip to main content
A purchase (apu_*) reserves part of an agent mandate’s budget for one checkout, then issues the card details your agent pays with.
Agent tokens are in early access and subject to change. To request Agent tokens access, contact hi@natural.com.

Example

GET /agentic-payments/purchases/{purchaseId}
The object is everything inside data. The field names below are relative to it: attributes.provider is data.attributes.provider in the response.

Fields

string
required
Purchase ID (apu_*).
string
required
Resource type. Always purchase.
object
required
The purchase’s details.
object
required
Resources the purchase links to.

Statuses

Pay with a purchase

  1. Find the agent mandate. See find the requested card’s agent mandate.
  2. Create a purchase. POST /agentic-payments/purchases with the agentMandateId, the amount, the merchant (name, https URL and country code) and an expiresInSeconds of 60 to 600. This reserves the amount from the agent mandate. Send an Idempotency-Key, and retry with the same key.
  3. Claim. POST /agentic-payments/purchases/{purchaseId}/claim returns the purchase with card filled in: the card number, CVC and expiry to pay with. It succeeds once, and every other response returns card as null, so the card details can’t be fetched again. Don’t log or store them.
  4. Check out. Enter the card details in the merchant’s checkout before expiresAt.
If the agent won’t check out, cancel the purchase before claiming it to release the reserved amount. A claimed purchase still counts against the agent 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 agent mandate’s perPurchaseLimit or its available budget. Amounts are in USD minor units.
  • The credential stops working at expiresAt, or when the agent mandate expires or is revoked, whichever comes first.

Permissions

Create, get, cancel and claim need savedCards.use, from an agent. An agent sees only the purchases it created. See agent mandate permissions.

Events

This resource sends no webhook events.

Errors

See the error codes these endpoints return.

Sandbox simulations

None.