Talk to usGet started
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}.

POST/v1/cards
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.
Bodyapplication/json
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, mastercard
card_namestring
A label for the card in the console, up to 60 characters. Defaults to API - {merchant}.
Response200application/json
idstring
The card id. Use it to reveal or close the card.
brandstring
The network the card was minted on.
Available options: visa, mastercard
last4string
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
StatusCodeWhen
400invalid_amountamount is missing, not a number, or not above zero.
402insufficient_fundsThe cap exceeds the wallet's available. Fund the wallet, then retry.
502card_issue_failedThe issuer refused or failed. The message says why.