Cards
Create a card
Mint a virtual card capped at amount, dedicated to one merchant. The response is a real card; reveal the number with GET /v1/cards/{id}.
Live API. A POST to /v1/cards issues a real card.
Authorizations
Authorizationstringrequired
Bearer token:
Authorization: Bearer mk_live_.... Create a key in the AgentPay console under Developer, API keys.Body
amountnumberrequired
The spend cap in US dollars, above zero. The per-card ceiling is 5,000.
merchantstring
The merchant the card is for, e.g.
namecheap. Shown in the console. Defaults to agent.single_usebooleandefault: true
A single-use card freezes itself after its first charge.
false mints a multi-use card that takes charges until the cap is reached or you close it.networkstringdefault: auto
Which network to mint on.
Available options:
auto, visa, mastercardcard_namestring
A label for the card in the console, up to 60 characters. Defaults to
API - {merchant}.Response
idstring
The card id. Use it to reveal or close the card.
brandstring
The network the card was minted on.
Available options:
visa, mastercardlast4string
The last four digits.
exp_monthinteger
Expiry month, 1 to 12.
exp_yearinteger
Expiry year, four digits.
spend_limitnumber
The cap in dollars, as requested.
single_useboolean
Whether the card freezes after its first charge.
statusstring
The card status,
ACTIVE on creation.spend_request_idstring
Pass it to
GET /v1/spend/{spend_request_id} to learn whether the card was charged.request_idstring
The request id, also in the
X-Mooj-Request-Id header.Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_amount | amount is missing, not a number, or not above zero. |
| 402 | insufficient_funds | The cap exceeds the wallet's available. Fund the wallet, then retry. |
| 502 | card_issue_failed | The issuer refused or failed. The message says why. |