Documentation menu
x402 payments
POST/v1/x402/topup
Access and price
| Auth | An API key, as Authorization: Bearer snk_… or ?api_key=snk_…. Not metered: it draws no quota and no credit. Needs a full key; a browser (maps) key is refused. |
|---|---|
| Price | Not metered: no quota, no credit. |
What it does
POST /v1/x402/topup?usd={bundle}.
Call it
bash
curl -fsS -X POST "https://api.mapmap.ai/v1/x402/topup?usd=…" \
-H "Authorization: Bearer $MAPMAP_KEY"Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| usd | query | string | yes | Bundle from the configured allowlist (USD), e.g. 5 or 0.10 |
Responses
200Settled and credited:
{status, creditedMillipence, balanceMillipence, tx, network, fxMicroUsdPerPence}; status: "replay" reports an already-processed authorization without settling twice| Field | Type | Required | Description |
|---|---|---|---|
| balanceMillipence | integer | no | Balance after the credit, millipence. |
| creditedMillipence | integer | no | Credit added, millipence. |
| fxMicroUsdPerPence | integer | no | Exchange rate used: micro-dollars per penny. |
| network | string | no | Settlement network. |
| note | string | no | Present on a replay, or when the key is provisional and the credit is banked until the email is verified. |
| status | string | no | credited, already-credited, or replay for an
authorisation already processed. |
| tx | string | no | Settlement transaction hash. |
Example: A response assembled from this schema's own field examples, enums, defaults and types; not a recorded call
json
{
"balanceMillipence": 0,
"creditedMillipence": 0,
"fxMicroUsdPerPence": 0,
"network": "string",
"note": "string",
"status": "string",
"tx": "string"
}400Unknown bundle (body lists the allowlist) or operator key without an identity ledger
application/problem+json · Problem
401No key, or a missing, malformed, unknown, revoked or expired one (
unauthorized)application/problem+json · Problem
402x402 payment required:
accepts[0].maxAmountRequired is the bundle's exact atomic amount; extra carries bundleUsd, creditMillipenceEstimate and fxMicroUsdPerPence. Retry with X-PAYMENT signing exactly that amountapplication/json
403A browser (
maps-scoped) key on a route that needs a full-scope key (scope-insufficient)application/problem+json · Problem
404Top-up not enabled on this deployment (needs bundles + the FX knob)
application/problem+json · Problem
504The request did not finish within the gateway's request deadline (
request-timeout)application/problem+json · Problem
Error bodies follow the shared problem model documented on API conventions.
Generated from https://api.mapmap.ai/openapi.json on 2026-11-12 · operationId post_topup