Skip to main content
POST
Create a hosted top-up checkout session

Authorizations

Authorization
string
header
required

Monid API key (Authorization: Bearer mk_...) or Clerk-issued JWT. Each operation lists the ONE scope an API key needs. {resource}:* grants every action on that resource; * grants everything; Clerk sessions hold *. Operations with an empty list need no scope. Scope catalog: GET /v1/api-keys/scopes.

Headers

X-Monid-Agent-Model
string

Model driving the calling agent. Optional; a value that is empty, longer than 256 characters or not printable ASCII is ignored (never an error).

Maximum string length: 256
X-Monid-Agent-Harness
string

Agent harness or client making the call (e.g. a coding agent, an agent framework). Optional; a value that is empty, longer than 256 characters or not printable ASCII is ignored (never an error).

Maximum string length: 256
X-Monid-Agent-Session-Id
string

Caller-side session identifier, so the calls of one agent session (discover → inspect → run → polling) can be correlated. Optional; a value that is empty, longer than 256 characters or not printable ASCII is ignored (never an error).

Maximum string length: 256

Body

application/json
amount
number
required

Top-up amount in dollars (float).

Example:

25

currency
enum<string>
required

Top-up currency (currently only USD).

Available options:
USD
success_redirect
string

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.

Example:

"https://app.monid.ai/wallet?topup=success"

cancel_redirect
string

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

Example:

"https://app.monid.ai/wallet?topup=cancelled"

autoReload
boolean

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.

analytics
object

Analytics attribution hand-off (web app only). Stored as Checkout metadata and forwarded on the server-side GA4 purchase event once the session is paid. Never affects the top-up itself; agents can omit it.

Response

Checkout session created

paymentProcessor
string
required

Payment processor type (e.g. STRIPE).

Example:

"STRIPE"

sessionId
string
required

Hosted checkout session id.

Example:

"cs_test_..."

url
string
required

Hosted checkout redirect URL.

Example:

"https://checkout.stripe.com/c/pay/..."