Skip to main content
POST
Issue a purchase card

Authorizations

Authorization
string
header
required

Bearer token authentication for agent-scoped endpoints. The token is the accessToken returned when redeeming a device code via POST /agents/device-codes/redeem. Agent credentials are user-scoped: all requests are automatically bound to the agent's associated customer and subject to the agent's policy.

Headers

Idempotency-Key
string
required

Unique identifier used to return the same action for retries. Reusing a key with a different request body is a 400.

Maximum string length: 255
Example:

"550e8400-e29b-41d4-a716-446655440000"

Body

application/json
kind
enum<string>
required

The purchase card kind.

Available options:
SINGLE_USE
Example:

"SINGLE_USE"

currency
enum<string>
required

Card currency. Only USD is supported.

Available options:
USD
Example:

"USD"

amount
integer<int64>
required

The purchase amount in the smallest unit of currency. Grid reserves it plus a tolerance for tips and final amounts, and sets the card's spend limit to the same total.

Required range: x >= 1
Example:

2000

sourceAccountId
string
required

The customer's Embedded Wallet internal account that funds the card.

Example:

"InternalAccount:019542f5-b3e7-1d02-0000-000000000002"

memo
string

A note about the purchase, shown to the customer.

Maximum string length: 255
Example:

"Concert tickets"

Response

Purchase card issued

action
object
required

The ISSUE_PURCHASE_CARD action. PENDING_APPROVAL when the customer must approve the card first; poll it or wait for its webhook.

card
Agent Card · object

The issued card. Present when the action completed immediately.