Wallet
Top up by card or stablecoin
Open a Stripe Checkout page for the amount. Give url to the person; the wallet is credited the moment Stripe confirms. A card number never passes through the API.
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
Dollars to add, above zero.
success_urlstring
Where the person lands after paying. Must be https. Defaults to the AgentPay console.
cancel_urlstring
Where the person lands if they cancel. Must be https. Defaults to the AgentPay console.
Response
funding_session_idstring
The Stripe Checkout session id.
urlstring
The page to open for the person.
amountnumber
amount_displaystring
statusstring
open.pays_withstring
card or stablecoin on the Stripe page.creditedstring
When the wallet is credited, in plain words.
request_idstring
The request id, also in the
X-Mooj-Request-Id header.Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_amount | amount is missing or not above zero, or the amount was refused as malformed. |
| 400 | invalid_request | success_url or cancel_url is not an https address. |
| 402 | wallet_limit | The top-up would take the wallet above its ceiling. |
| 402 | funding_budget_reached | The account's funding budget for the period is reached. |
| 402 | funding_unavailable | Top-ups are paused for the moment. |
| 502 | funding_session_failed | The Stripe page could not be opened. Retry. |