Create on-ramp session (fiat → USDC)
create_onramp_sessionBuy USDC with the owner's OWN fiat and deliver it to the agent's wallet (address locked). Returns checkoutUrl + partnerOrderId. Paid endpoint ($0.01 USDC via x402) — without payment this returns the 402 challenge; use the fiatdock-mcp npm package with AGENT_PRIVATE_KEY for automatic payment. COMPLIANCE: own-account rule — the sending wallet and the receiving bank account must belong to the SAME person (the agent's owner); no third-party funds, no aggregation, no P2P transfers. 18+; served worldwide via our licensed provider across ~160 countries — EUR bank transfer in the SEPA zone (incl. Portugal), card/Apple Pay/Google Pay elsewhere — excluding US persons, sanctioned countries and the UK (NOT the UK). Crypto is volatile; not investment advice.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Optional referral code (1-64 chars: letters, digits, _ or -) | |
| No | Owner's account email. If provided, the checkout link is ALSO emailed to this address automatically (you still receive it in checkoutUrl); the response echoes emailedTo to confirm | ||
| network | No | USDC network, default base | |
| payment | No | Base64 of a single x402 v2 PaymentPayload (EIP-3009 transferWithAuthorization on Base USDC). OMIT it on the first call: the 402 you get back carries `howToPay.payloadTemplate` — the exact envelope to fill in — plus the price and the EIP-712 domain. Send it on the second call to complete the purchase; it is forwarded as the PAYMENT-SIGNATURE header, never as body data. Nothing is charged for the 402 itself, and a call that fails after payment settles nothing. | |
| provider | No | Licensed fiat provider. `mtpelerin` is the only provider on this server and the default — omit this field. It settles by SEPA bank transfer across the SEPA zone (incl. Portugal); its order status is not push-updated. Any other value returns 400 (no other provider is configured on this server). | |
| customerId | No | Stable agent/customer id | |
| fiatAmount | Yes | Fiat amount to spend | |
| walletCode | No | Optional Mt Pelerin address lock, part 1: 4-digit code (1000-9999). Requires walletHash | |
| walletHash | No | Optional Mt Pelerin address lock, part 2: base64 signature of 'MtPelerin-<code>' by the agent's OWN wallet key (never shared with us). Locks the widget to walletAddress. Requires walletCode | |
| callbackUrl | No | Optional public https URL stored for a future provider with status webhooks — the current provider sends none, so no push will arrive and no callback secret is issued. Poll get_order_status instead | |
| fiatCurrency | No | e.g. EUR, default EUR | |
| walletAddress | Yes | Agent wallet that receives USDC (0x…, EIP-55 checked) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | Next-step instructions | |
| provider | No | Licensed fiat provider handling this session (e.g. mtpelerin) | |
| emailedTo | No | Present when an `email` was supplied and email is configured: the checkout link was also emailed to this address (best-effort) | |
| checkoutUrl | Yes | Branded checkout URL (valid ~2 hours) — forward to the human owner | |
| customerKey | No | Returned ONCE on the first session with a new customerId — store securely | |
| partnerOrderId | Yes | Order id — track it with get_order_status | |
| customerKeyNote | No | How to use customerKey |