Wallet

Create a hosted top-up checkout session

Creates a hosted Stripe checkout session and returns the session id and redirect URL. This is the funding path advertised by the WALLET_INSUFFICIENT_FUNDS 402 and by GET /v1/wallet/balance (topup.stripe): an agent creates the session and hands url to its human owner to pay.

post/v1/wallet/topup/sessions

Request body

amountnumber required

Top-up amount in dollars (float).

currency'USD' required

Top-up currency (currently only USD).

success_redirectstring

Where to send the payer after a successful checkout. Must be on the Monid web-app origin. Defaults to the web-app wallet page, so an agent without a UI can omit it and hand the returned url to its owner.

cancel_redirectstring

Where to send the user if checkout is cancelled. Must be on the Monid web-app origin.

autoReloadboolean

Opt in to auto-reload (with the service defaults) when this checkout completes. Opt-in ONLY: the system never enables auto-reload on the caller's behalf, so false and an omitted field are equivalent and record nothing. Ignored when auto-reload is already enabled on the wallet.

Example request

{
  "amount": 25,
  "success_redirect": "https://app.monid.ai/wallet?topup=success",
  "cancel_redirect": "https://app.monid.ai/wallet?topup=cancelled"
}

Response

Checkout session created

paymentProcessorstring required

Payment processor type (e.g. STRIPE).

sessionIdstring required

Hosted checkout session id.

urlstring required

Hosted checkout redirect URL.

Example response

{
  "paymentProcessor": "STRIPE",
  "sessionId": "cs_test_...",
  "url": "https://checkout.stripe.com/c/pay/..."
}

Changes

Changed in 1 of the 22 revisions of this API.1