# Build with an AI coding agent Source: https://docs.minisend.xyz/ai-agent-skill Install a skill that teaches Claude Code, Cursor, Codex, and other AI coding agents to integrate every Minisend API offline. If you're building with an AI coding agent, install the Minisend skill instead of pointing your agent at this site. It teaches the agent every API in these docs, and works offline, so it can write correct code without having to look pages up as it goes. If you want your agent to call the API rather than write code against it, add the [MCP server](/mcp-server) as well. The skill teaches; the MCP server acts. They work well together. ## Install ```bash Skills CLI theme={null} npx skills add itschrisoketch/minisend-skills ``` ```bash npm theme={null} npm install @minisend/skill ``` The Skills CLI works across roughly 17 agents, including Claude Code, Cursor, Codex, Cline, and Gemini CLI. Once installed, ask your agent to integrate Minisend and it will load the skill automatically. ## What it covers Everything in these docs: off-ramp, onramp, the Wallet API, checkout, recipients, webhooks, and error handling, plus a FAQ. There's one starting file that points the agent to the right guide for each part. We keep it in one place, so your agent never works from out-of-date instructions. ## Where it lives The skill is maintained in [`itschrisoketch/minisend-skills`](https://github.com/itschrisoketch/minisend-skills), a public repository, and published to npm as [`@minisend/skill`](https://www.npmjs.com/package/@minisend/skill). Star or watch the repository to hear about updates as the API changes. > [card] [View the repository](https://github.com/itschrisoketch/minisend-skills) > > Source, install instructions, and the full reference set. # Authentication Source: https://docs.minisend.xyz/api-reference/authentication Authenticate Minisend API requests with your API key, and learn which endpoints are public and require no authentication at all. Checkout creation and every [off-ramp](/offramp/overview) and [onramp](/onramp/overview) endpoint require an API key. A few read-only endpoints are [public](#public-endpoints). The [Wallet API](/wallet-api/overview) uses separate `wsk_live_` keys, created under **Dashboard → Wallets**. This page covers `ms_live_` keys. ## API key Every key starts with `ms_live_`. > [!WARNING] > > Keep your API key on your server. Never expose it in website code, a mobile app, or a code repository. ### Header ```text theme={null} Authorization: Bearer ms_live_your_key_here ``` ### Example ```bash theme={null} curl -X POST https://merchant.minisend.xyz/api/merchant/checkout \ -H "Authorization: Bearer ms_live_your_key_here" \ -H "Content-Type: application/json" \ -d '{"amount": 25.00, "description": "Order #4821"}' ``` ### Create a key 1. Open [merchant.minisend.xyz/dashboard](https://merchant.minisend.xyz/dashboard). 2. Go to **API Keys** and click **New Key**. 3. Copy the key. It's shown once. > [!NOTE] > > `401` means the key is missing or invalid. `403` means the product isn't enabled for your account. ### Key scopes Access depends on the products enabled for your account. Enabling a product applies to every key. | Product | Endpoints | How to get it | | - | - | - | | Checkout | Creating checkout sessions | Enabled by default | | Off-ramp | `/api/offramp/*` | Email [info@minisend.xyz](mailto:info@minisend.xyz) | | Onramp | `/api/onramp/*` | Email [info@minisend.xyz](mailto:info@minisend.xyz) | Calls to a product that isn't enabled return `403`: ```json theme={null} { "error": "Your account doesn't have off-ramp access yet. Please contact info@minisend.xyz to request access." } ``` ## Rate limits The general limit is **60 requests per minute per IP address**. `X-RateLimit-Remaining` shows what's left. Exceeding a limit returns `429`. These endpoints have additional per-account limits: | Endpoint | Limit | | - | - | | Create checkout session | 30 a minute | | Create off-ramp order | 20 a minute | | Confirm off-ramp transfer | 20 a minute | | Create onramp order | 10 a minute | Payment prompts to a single phone number are also limited. A `429` on onramp order creation can mean that phone received a prompt recently. [Contact support](https://t.me/minisendapp) for higher limits. ## Public endpoints These require no `Authorization` header and can be called from a browser or app: | Endpoint | Use | | - | - | | `GET /api/merchant/checkout/{session_id}` | Get a session's status | | `GET /api/merchant/pay/info?slug={slug}` | Get public business details and an indicative rate | # Create a checkout session Source: https://docs.minisend.xyz/api-reference/create-checkout Create a Minisend checkout session from your backend to get a hosted payment URL. Customers can pay in USDC or USDT on any of six supported chains. Creates a checkout session and gives you a link to a payment page we host, along with the address your customer pays to. The session lasts 30 minutes. > [!WARNING] > > Call this from your server only, never from a browser or app, so your API key stays secret. ## Endpoint ```text theme={null} POST https://merchant.minisend.xyz/api/merchant/checkout ``` ```text theme={null} Authorization: Bearer ms_live_your_key_here ``` See [Authentication](/api-reference/authentication). You can create up to 30 sessions a minute. See [rate limits](/api-reference/authentication#rate-limits). ## Body **amount** `number` *required* The amount in USDC, greater than 0, up to two decimal places. Your customer pays it in USDC or the same amount in USDT. **description** `string` Shown to the customer on the checkout page. **external\_id** `string` Your own reference, such as an order ID. We send it back to you in webhooks. **customer\_email** `string` Saved on the session for the customer's receipt. **settlement\_mode** `string` `fiat` or `usdc`. Uses your account setting if you leave it out. `usdc` skips the conversion and keeps the payment in your wallet as USDC instead of paying it out. **settlement\_chain** `string` Only used when `settlement_mode` is `usdc`. One of `BASE`, `ARB`, `AVAX`, `OP`, `ETH`, `MATIC`. Uses your account setting if you leave it out. Anything else returns a `400`. **redirect\_url** `string` Where to send your customer after they pay, so they land on your own confirmation page. It must be a full `https` URL, up to 2048 characters, with no username or password in it. Plain `http` only works for `localhost`. You can also call this field `return_url` or `success_url`. See [sending the customer back](/payments/checkout-sessions#sending-the-customer-back-to-your-site). ## Examples ```bash cURL theme={null} curl -X POST https://merchant.minisend.xyz/api/merchant/checkout \ -H "Authorization: Bearer ms_live_your_key_here" \ -H "Content-Type: application/json" \ -d '{ "amount": 25.00, "description": "Order #4821 - 2x T-shirts", "external_id": "order-4821", "customer_email": "customer@example.com", "redirect_url": "https://yourstore.com/orders/4821/thanks" }' ``` ```javascript Node.js theme={null} const res = await fetch('https://merchant.minisend.xyz/api/merchant/checkout', { method: 'POST', headers: { 'Authorization': 'Bearer ms_live_your_key_here', 'Content-Type': 'application/json', }, body: JSON.stringify({ amount: 25.00, description: 'Order #4821 - 2x T-shirts', external_id: 'order-4821', customer_email: 'customer@example.com', }), }); if (!res.ok) throw new Error((await res.json()).error); const { checkout_url, session_id } = await res.json(); res.redirect(checkout_url); ``` ```python Python theme={null} import requests res = requests.post( "https://merchant.minisend.xyz/api/merchant/checkout", headers={ "Authorization": "Bearer ms_live_your_key_here", "Content-Type": "application/json", }, json={ "amount": 25.00, "description": "Order #4821 - 2x T-shirts", "external_id": "order-4821", "customer_email": "customer@example.com", }, ) res.raise_for_status() data = res.json() ``` ## Response (201) ```json theme={null} { "session_id": "cs_7f8a9b2c-1234-5678-abcd-ef0123456789", "checkout_url": "https://merchant.minisend.xyz/checkout/cs_7f8a9b2c-1234-5678-abcd-ef0123456789", "deposit_address": "0x1234567890abcdef1234567890abcdef12345678", "amount_usdc": 25.00, "settlement_mode": "fiat", "redirect_url": "https://yourstore.com/orders/4821/thanks", "expires_at": "2026-04-13T14:30:00.000Z", "status": "pending" } ``` **session\_id** `string` *required* The session's ID. Always starts with `cs_`. **checkout\_url** `string` *required* The payment page. Send your customer here. **deposit\_address** `string` *required* Takes USDC or USDT on any of six networks. See [supported networks](/payments/supported-currencies). **amount\_usdc** `number` *required* The amount in USDC. **expires\_at** `string` *required* When the session runs out, 30 minutes after it's created, ISO 8601. After that, `status` becomes `expired`. **status** `string` *required* Always `"pending"` for a new session. Follow it with the [status endpoint](/api-reference/get-checkout) or webhooks. **settlement\_mode** `string` *required* `fiat` or `usdc`, whichever this session is using. **settlement\_chain** `string` Only when `settlement_mode` is `usdc`. The network this payment will end up on. **redirect\_url** `string` Only if you sent one. We read it back from the saved session, so seeing it here confirms we stored it. # Errors Source: https://docs.minisend.xyz/api-reference/errors Understand the Minisend API error response structure, every HTTP status code your integration may receive, and how to handle each one in your code. Error responses contain a human-readable `error` message: ```json theme={null} { "error": "Description of what went wrong" } ``` Some endpoints add fields: [validate a recipient](/api-reference/offramp/validate-account) returns `valid: false`, and access errors return a `code`. ## Status codes | Status | Meaning | | - | - | | `400` | Invalid request: a missing field, an invalid amount, or an amount out of range | | `401` | API key missing or invalid | | `403` | The product isn't enabled for your account | | `404` | The resource doesn't exist or belongs to another account | | `409` | The request conflicts with the resource's current state | | `422` | Valid format, but verification failed, for example a bank account that doesn't exist | | `429` | Rate limit exceeded | | `500` | Internal error. Retry with backoff | | `502` | A dependent service was temporarily unavailable. Retry | ### 400: Bad request * `amount` must be a positive number. * Off-ramp and onramp amounts must be within the [limits](/offramp/overview#limits) for the currency. ### 401: Unauthorized Check the header is `Authorization: Bearer ms_live_...` and the key is active under **API Keys**. Wallet API calls use a `wsk_live_` key. ### 403: Forbidden The product isn't enabled for your account. ```json theme={null} { "error": "Your account doesn't have off-ramp access yet. Please contact info@minisend.xyz to request access." } ``` Email [info@minisend.xyz](mailto:info@minisend.xyz) to request access. See [key scopes](/api-reference/authentication#key-scopes). ### 404: Not found The `session_id`, `order_id`, `wallet_id`, or `slug` doesn't exist on your account. ### 409: Conflict The request conflicts with the resource's state. For example, [submitting a deposit](/api-reference/offramp/submit-deposit) for an automatic or final order, or with a hash already used for another order. ### 422: Unprocessable The request was well-formed but failed verification, for example an unverifiable recipient account, or a transfer with the wrong amount, network, or address. Nothing was processed. Correct the details and retry. ### 429: Rate limit Retry after a delay. See [rate limits](/api-reference/authentication#rate-limits). ### 500 and 502: Server errors Retry with exponential backoff. If errors persist, send the `session_id` or `order_id` to [support](https://t.me/minisendapp). ## Handling errors ```javascript Node.js theme={null} const res = await fetch('https://merchant.minisend.xyz/api/merchant/checkout', { method: 'POST', headers: { 'Authorization': 'Bearer ms_live_your_key_here', 'Content-Type': 'application/json', }, body: JSON.stringify({ amount: 25.00 }), }); if (!res.ok) { const { error } = await res.json(); if (res.status === 429 || res.status >= 500) { await new Promise((r) => setTimeout(r, 2000)); } throw new Error(`${res.status}: ${error}`); } const session = await res.json(); ``` ```python Python theme={null} import requests import time def create_checkout(amount): res = requests.post( "https://merchant.minisend.xyz/api/merchant/checkout", headers={"Authorization": "Bearer ms_live_your_key_here"}, json={"amount": amount}, ) if not res.ok: if res.status_code == 429 or res.status_code >= 500: time.sleep(2) raise RuntimeError(f"{res.status_code}: {res.json().get('error')}") return res.json() ``` > [!TIP] > > Retry `429`, `500`, and `502`. Don't retry `400`, `403`, `409`, or `422` without changing the request. # Get checkout session status Source: https://docs.minisend.xyz/api-reference/get-checkout Poll this public Minisend endpoint to track a checkout session from pending through settlement. Returns status, exchange rate, and receipt. Returns the current state of a checkout session. No API key is required, so you can call it from a browser or app. ## Endpoint ```text theme={null} GET https://merchant.minisend.xyz/api/merchant/checkout/{session_id} ``` ## Path **session\_id** `string` *required* The ID you got back from `POST /api/merchant/checkout`. Starts with `cs_`. ## Examples ```bash cURL theme={null} curl https://merchant.minisend.xyz/api/merchant/checkout/cs_7f8a9b2c-1234-5678-abcd-ef0123456789 ``` ```javascript Node.js theme={null} const res = await fetch( `https://merchant.minisend.xyz/api/merchant/checkout/${sessionId}` ); const session = await res.json(); ``` ```python Python theme={null} import requests res = requests.get( f"https://merchant.minisend.xyz/api/merchant/checkout/{session_id}" ) session = res.json() ``` ## Response ```json theme={null} { "session_id": "cs_7f8a9b2c-1234-5678-abcd-ef0123456789", "status": "completed", "amount_usdc": 25.00, "description": "Order #4821", "deposit_address": "0x1234567890abcdef1234567890abcdef12345678", "expires_at": "2026-04-13T14:30:00.000Z", "created_at": "2026-04-13T14:00:00.000Z", "amount_local": 3225.00, "exchange_rate": 129.00, "settlement_receipt": "SHQ1234ABC", "completed_at": "2026-04-13T14:08:22.000Z", "redirect_url": "https://yourstore.com/orders/4821/thanks?session_id=cs_7f8a9b2c-1234-5678-abcd-ef0123456789&status=completed", "merchant": { "business_name": "My Store", "logo_url": null } } ``` **status** `string` *required* Where the session is now. See [status values](#status-values). **amount\_usdc** `number` *required* The amount in USDC. Your customer can pay it in USDC or USDT. **deposit\_address** `string` *required* Takes USDC or USDT on any of six networks. **amount\_local** `number` What you received in local currency, after the platform fee. Only once `status` is `"completed"`. **exchange\_rate** `number` How much local currency 1 USDC was worth at payout. Only once `status` is `"completed"`. **settlement\_receipt** `string` The payout receipt, such as an M-Pesa code. Only once `status` is `"completed"`. **completed\_at** `string` Date and time it completed, ISO 8601. Only once `status` is `"completed"`. **settlement\_chain** `string` Only on USDC sessions. The network this payment ends up on. **redirect\_url** `string | null` The full return URL, with `session_id` and `status` already added, or `null` if you didn't set one. The `status` inside it always matches the `status` field above. See [sending the customer back](/payments/checkout-sessions#sending-the-customer-back-to-your-site). **forward** `object` Only on USDC sessions going to a network other than Base. Tracks the move of your USDC from Base to the network you chose. **properties** **forward.status** `string` *required* `not_required` on Base. Otherwise `not_started`, `pending`, `completed`, or `failed`. On `failed`, the USDC stays on Base. Contact support. **forward.chain** `string` *required* Same as `settlement_chain`. **forward.tx\_hash** `string` The transaction ID on the destination network. Only once `status` is `completed`. **merchant** `object` *required* Your business details, for showing on a page. **properties** **merchant.business\_name** `string` *required* **merchant.logo\_url** `string | null` *required* ## Status values | Status | What it means | | - | - | | `pending` | Waiting for your customer to pay | | `deposit_received` | The payment was detected and is being processed | | `settling` | The payout is in progress | | `completed` | The payout is complete | | `failed` | The payment arrived but the payout didn't complete. Contact support | | `expired` | No payment was received within 30 minutes | ## Checking repeatedly ```javascript theme={null} async function waitForPayment(sessionId, timeoutMs = 30 * 60 * 1000) { const deadline = Date.now() + timeoutMs; while (Date.now() < deadline) { const res = await fetch( `https://merchant.minisend.xyz/api/merchant/checkout/${sessionId}` ); const session = await res.json(); if (session.status === 'completed') return session; if (session.status === 'failed' || session.status === 'expired') { throw new Error(`Session ended: ${session.status}`); } await new Promise((r) => setTimeout(r, 3000)); } throw new Error('Timed out'); } ``` > [!NOTE] > > Prefer [webhooks](/webhooks/overview) to polling. Add your URL under [Dashboard → Webhooks](/dashboard/webhooks). > [!NOTE] > > On a USDC session settling to a network other than Base, `completed` doesn't mean the USDC has reached that network. Check `forward.status`, or wait for [`checkout.forwarded`](/webhooks/events#checkout-forwarded). # Create an order Source: https://docs.minisend.xyz/api-reference/offramp/create-order Create a USDC payout order to any M-Pesa, mobile money, till, paybill, or bank recipient. Returns the deposit address and exact amount to send on Base. Creates a payout order. Checks the recipient's account and returns the deposit address and the amount to send. > [!WARNING] > > Call this endpoint from your server. Never expose your API key in a browser or app. ## Endpoint ```text theme={null} POST https://merchant.minisend.xyz/api/offramp/orders ``` ```text theme={null} Authorization: Bearer ms_live_your_key_here Idempotency-Key: payout-8412 ``` Requires the `offramp` scope. > [!TIP] > > Send an `Idempotency-Key` unique to this payout, such as your payout ID. A repeated key returns the original order with `200` instead of creating a second one. ## Body **amount** `number` *required* USDC amount, 0.5 – 50,000. The local equivalent must fall inside the [per-transaction range](/offramp/overview#limits). **currency** `string` *required* Payout currency: `KES`, `NGN`, `GHS`, or `UGX`. **refund\_address** `string` A wallet address you control, starting with `0x`. Required unless you set `funding_wallet_ref`. USDC is returned here if the payout fails or the deposit is short. **funding\_wallet\_ref** `string` The reference of one of your [Wallet API](/wallet-api/overview) addresses. The order is paid from that address's USDC on Base. Refunds return to it, and `refund_address` is ignored. Requires `Idempotency-Key`. See [paying from a Wallet API address](#paying-from-a-wallet-api-address). **recipient** `object` *required* Who gets paid. See [recipients](/offramp/recipients) for the fields each method needs. The account is checked before the order is created. For NGN, `recipient.institution` is an institution code from [`GET /api/offramp/institutions`](/api-reference/offramp/institutions). **reference** `string` Your own reference, such as your payout ID. Returned as `external_reference` in responses and webhooks. Not shown to the recipient. ## Example ```bash cURL theme={null} curl -X POST https://merchant.minisend.xyz/api/offramp/orders \ -H "Authorization: Bearer ms_live_your_key_here" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: payout-8412" \ -d '{ "amount": 10, "currency": "KES", "refund_address": "0xYourWalletAddress0000000000000000000000", "reference": "payout-8412", "recipient": { "method": "MOBILE", "account_name": "Jane Wanjiku", "phone": "0712345678", "mobile_network": "Safaricom" } }' ``` ```javascript Node.js theme={null} const res = await fetch('https://merchant.minisend.xyz/api/offramp/orders', { method: 'POST', headers: { 'Authorization': 'Bearer ms_live_your_key_here', 'Content-Type': 'application/json', 'Idempotency-Key': 'payout-8412', }, body: JSON.stringify({ amount: 10, currency: 'KES', refund_address: '0xYourWalletAddress0000000000000000000000', reference: 'payout-8412', recipient: { method: 'MOBILE', account_name: 'Jane Wanjiku', phone: '0712345678', mobile_network: 'Safaricom', }, }), }); if (!res.ok) throw new Error((await res.json()).error); const order = await res.json(); // send exactly order.total_deposit_usdc USDC on Base to order.deposit_address, // then submit the hash only if order.deposit_submission_required is true ``` ```python Python theme={null} import requests res = requests.post( "https://merchant.minisend.xyz/api/offramp/orders", headers={ "Authorization": "Bearer ms_live_your_key_here", "Content-Type": "application/json", "Idempotency-Key": "payout-8412", }, json={ "amount": 10, "currency": "KES", "refund_address": "0xYourWalletAddress0000000000000000000000", "reference": "payout-8412", "recipient": { "method": "MOBILE", "account_name": "Jane Wanjiku", "phone": "0712345678", "mobile_network": "Safaricom", }, }, ) res.raise_for_status() order = res.json() ``` ## Response (201) ```json theme={null} { "order_id": "9b2f6c1e-...", "status": "pending", "amount_usdc": 10, "total_deposit_usdc": 10.12, "sender_fee_usdc": 0.12, "transaction_fee_usdc": 0, "currency": "KES", "rate": 128.57, "amount_local": 1285, "fee": 0, "recipient_amount": 1285, "deposit_address": "0x7a3d1c9e5b2f4a6c8e0d1b3f5a7c9e1d3b5f7a9c", "deposit_chain": "base", "deposit_submission_required": false, "recipient": { "account_name": "Jane Wanjiku", "method": "MOBILE", "phone": "0712345678" }, "refund_address": "0xYourWalletAddress0000000000000000000000", "external_reference": "payout-8412", "expires_at": "2026-07-05T12:05:00.000Z", "created_at": "2026-07-05T12:00:03.000Z", "instructions": "Send exactly 10.12 USDC (Base), shown as total_deposit_usdc (the order amount plus fees), to deposit_address before expires_at. A smaller amount is not credited and is refunded to refund_address. The deposit is detected automatically: do not submit a transaction hash for this order." } ``` This is an automatic order. A send-and-confirm order differs as follows: * `deposit_submission_required` is `true` * `total_deposit_usdc` equals `amount_usdc` * `fee` comes off the payout * there's no `sender_fee_usdc` or `transaction_fee_usdc` * `expires_at` is 30 minutes away **order\_id** `string` *required* Unique order identifier. **total\_deposit\_usdc** `number` *required* **The exact USDC to send.** On send-and-confirm orders it equals `amount_usdc`. On automatic orders it includes fees. A smaller amount isn't credited and is returned to `refund_address`. **deposit\_submission\_required** `boolean` *required* `true`: send to `deposit_address`, then [submit the transaction hash](/api-reference/offramp/submit-deposit). `false`: the deposit is detected automatically. Read it on every order. **sender\_fee\_usdc** `number` Automatic orders only. Included in `total_deposit_usdc`. **transaction\_fee\_usdc** `number` Automatic orders only. Included in `total_deposit_usdc`. **deposit\_address** `string` *required* Where to send USDC on Base. Use it only for this order. **deposit\_chain** `string` *required* Always `base`. USDC sent on any other network isn't credited. **rate** `number` *required* The quoted rate. On send-and-confirm orders, the payout uses the rate when your USDC arrives, and `rate`, `amount_local`, and `fee` update. On automatic orders, the rate is fixed. **expires\_at** `string` *required* The deadline for sending USDC, ISO 8601. 30 minutes on send-and-confirm orders, a few minutes on automatic orders. After it, the order is `expired`. **funding\_wallet\_ref** `string` Only on orders paid from a Wallet API address. The reference you sent in the request. **instructions** `string` *required* Plain-language next steps for this order. ## Paying from a Wallet API address Add `funding_wallet_ref` to pay the order from one of your [Wallet API](/wallet-api/overview) addresses on Base. There's no deposit to send and no hash to submit. ```bash cURL theme={null} curl -X POST https://merchant.minisend.xyz/api/offramp/orders \ -H "Authorization: Bearer ms_live_your_key_here" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: payout-8413" \ -d '{ "amount": 10, "currency": "KES", "funding_wallet_ref": "payouts", "reference": "payout-8413", "recipient": { "method": "MOBILE", "account_name": "Jane Wanjiku", "phone": "0712345678", "mobile_network": "Safaricom" } }' ``` The response includes `funding_wallet_ref`, and `deposit_submission_required` is `false`. `total_deposit_usdc` is sent from the address immediately. Wait for `offramp.completed` or `offramp.failed`. * The address must hold at least `total_deposit_usdc` in USDC on Base, after in-progress payouts and withdrawals. For funds arriving from another network, wait for `wallet.deposit.settled`. * `refund_address` isn't needed. Refunds return to the funding address. * Keep [auto-sweep](/api-reference/wallet-api/sweep-config) off for the address. * `Idempotency-Key` is required. ## Errors | Status | Meaning | | - | - | | `200` | You've used this `Idempotency-Key` before. This is the original order, not a new one | | `400` | Invalid amount, currency, `refund_address`, or recipient, or the local amount is out of range. With `funding_wallet_ref`: insufficient USDC on Base, or `Idempotency-Key` missing | | `403` | Off-ramp, or paying from a wallet, isn't enabled for your account | | `404` | With `funding_wallet_ref`: no address has that reference | | `409` | With `funding_wallet_ref`: the address is frozen, or paying from a wallet is unavailable | | `422` | The recipient's account failed verification. No order was created | | `429` | More than 20 orders in the last minute | | `502` | The order couldn't be created. Retry with a **new** `Idempotency-Key`. If the recipient couldn't be checked, retry shortly | # Get an order Source: https://docs.minisend.xyz/api-reference/offramp/get-order Fetch the current state of an off-ramp order: status, deposit details, executed rate, and the payout receipt once completed. Returns the current state of an off-ramp order. Use [webhooks](/offramp/webhooks) for updates, and this endpoint to confirm a state. ## Endpoint ```text theme={null} GET https://merchant.minisend.xyz/api/offramp/orders/{order_id} ``` ```text theme={null} Authorization: Bearer ms_live_your_key_here ``` Requires the `offramp` scope. Orders you don't own return `404`. ## Example ```bash theme={null} curl https://merchant.minisend.xyz/api/offramp/orders/9b2f6c1e-... \ -H "Authorization: Bearer ms_live_your_key_here" ``` ## Response (200) ```json theme={null} { "order_id": "9b2f6c1e-...", "status": "completed", "amount_usdc": 10, "total_deposit_usdc": 10, "currency": "KES", "rate": 129.52, "amount_local": 1295, "fee": 13, "deposit_address": "0xDepositAddress000000000000000000000000000", "deposit_chain": "base", "deposit_submission_required": true, "deposit_tx_hash": "0x55a572efe1720250e442f38741477a4fc3f7f152e5cd208cc52f8222a1c2a13b", "recipient": { "account_name": "Jane Wanjiku", "method": "MOBILE", "phone": "0712345678" }, "refund_address": "0xYourWalletAddress0000000000000000000000", "external_reference": "payout-8412", "settlement_receipt": "SHQ1234ABC", "expires_at": "2026-07-05T12:30:00.000Z", "completed_at": "2026-07-05T12:07:41.000Z", "created_at": "2026-07-05T12:00:03.000Z" } ``` **status** `string` *required* `pending`, `settling`, `completed`, `failed`, or `expired`. See [order statuses](/offramp/overview#order-statuses). A `pending` order past its `expires_at` returns `expired`. **total\_deposit\_usdc** `number` *required* The exact USDC to send: `amount_usdc`, plus fees on automatic orders. **deposit\_submission\_required** `boolean` *required* `true` if you must [submit the transaction hash](/api-reference/offramp/submit-deposit) after sending USDC. `false` if the deposit is detected automatically. See [the two ways to send](/offramp/overview#two-ways-to-send-your-usdc). **rate** `number` *required* On send-and-confirm orders, this is the quoted rate until the order reaches `settling`, and the **actual** payout rate after that. On automatic orders, it's fixed when the order is created. **deposit\_tx\_hash** `string` The transaction hash of your USDC transfer, once submitted or detected. **settlement\_receipt** `string` The payout reference, once the order is `completed`. Can be empty. **completed\_at** `string` ISO 8601, set on `completed`. ## Errors | Status | Meaning | | - | - | | `403` | Off-ramp isn't enabled for your account | | `404` | The order doesn't exist or belongs to another account | # List institutions Source: https://docs.minisend.xyz/api-reference/offramp/institutions Every bank and neobank an NGN recipient can hold, with the institution code each one is identified by. Returns the institution codes for Nigerian bank payouts. Use it to populate a bank picker. An invalid code prevents the order from being created. Only NGN has an institution list. KES, GHS, and UGX recipients are identified by `method` and a phone number, till, or paybill. See [recipients](/offramp/recipients). ## Endpoint ```text theme={null} GET https://merchant.minisend.xyz/api/offramp/institutions ``` ```text theme={null} Authorization: Bearer ms_live_your_key_here ``` Requires the `offramp` scope. ## Query parameters **currency** `string` (default: NGN) `NGN`, the only supported value and the default. ## Example ```bash cURL theme={null} curl https://merchant.minisend.xyz/api/offramp/institutions?currency=NGN \ -H "Authorization: Bearer ms_live_your_key_here" ``` ```javascript Node.js theme={null} const res = await fetch( 'https://merchant.minisend.xyz/api/offramp/institutions?currency=NGN', { headers: { 'Authorization': 'Bearer ms_live_your_key_here' } } ); const { institutions } = await res.json(); // The `code` is what an order needs. const gtb = institutions.find((i) => i.name === 'Guaranty Trust Bank'); console.log(gtb.code); // GTBINGLA ``` ## Response (200) ```json theme={null} { "currency": "NGN", "count": 2, "institutions": [ { "code": "ABNGNGLA", "name": "Access Bank", "type": "bank" }, { "code": "GTBINGLA", "name": "Guaranty Trust Bank", "type": "bank" } ] } ``` **currency** `string` *required* The currency the list applies to. **count** `integer` *required* Number of institutions returned. **institutions** `array` *required* **institution** **code** `string` *required* Pass as `recipient.institution`. **name** `string` *required* Display name. **type** `string` *required* Institution type. Currently always `bank`. > [!NOTE] > > The list changes rarely. Cache it for up to a day. Don't hard-code codes. ## Errors | Status | Meaning | | - | - | | `400` | Unsupported currency | | `403` | Off-ramp isn't enabled for your account | | `502` | The list is temporarily unavailable. Retry | # List orders Source: https://docs.minisend.xyz/api-reference/offramp/list-orders Paginated list of your off-ramp orders, newest first, filterable by status. Lists your orders, newest first. ## Endpoint ```text theme={null} GET https://merchant.minisend.xyz/api/offramp/orders ``` ```text theme={null} Authorization: Bearer ms_live_your_key_here ``` Requires the `offramp` scope. ## Query parameters **status** `string` Filter by status: `pending`, `settling`, `completed`, `failed`, or `expired`. **limit** `number` (default: 20) Page size, max 100. **offset** `number` (default: 0) How many orders to skip. Use it to get the next page. ## Example ```bash theme={null} curl "https://merchant.minisend.xyz/api/offramp/orders?status=completed&limit=50" \ -H "Authorization: Bearer ms_live_your_key_here" ``` ## Response (200) ```json theme={null} { "orders": [ { "order_id": "9b2f6c1e-...", "status": "completed", "amount_usdc": 10, "currency": "KES", "settlement_receipt": "SHQ1234ABC", "created_at": "2026-07-05T12:00:03.000Z" } ], "total": 132, "limit": 50, "offset": 0 } ``` **orders** `array` *required* Full [order objects](/api-reference/offramp/get-order). **total** `number` *required* How many orders match your filter in total. Use it with `limit` and `offset` to page through them. # Get a quote Source: https://docs.minisend.xyz/api-reference/offramp/quote Price a USDC-to-local-currency payout before creating an order. Returns the rate, local amount, fee, and what the recipient nets, with optional recipient validation. Prices a payout without creating an order. Include `recipient` to also verify the account and return its registered name. ## Endpoint ```text theme={null} POST https://merchant.minisend.xyz/api/offramp/quote ``` ```text theme={null} Authorization: Bearer ms_live_your_key_here ``` Requires the `offramp` scope. See [getting access](/offramp/overview#getting-access). ## Body **amount** `number` *required* USDC amount, 0.5 to 50,000. The local amount must be within the [limits](/offramp/overview#limits). **currency** `string` *required* Payout currency: `KES`, `NGN`, `GHS`, or `UGX`. **recipient** `object` Verifies the account and returns `recipient_name`. See [recipients](/offramp/recipients). An invalid account returns `422`. For KES, include it for an accurate price: the recipient type affects pricing. ## Example ```bash cURL theme={null} curl -X POST https://merchant.minisend.xyz/api/offramp/quote \ -H "Authorization: Bearer ms_live_your_key_here" \ -H "Content-Type: application/json" \ -d '{"amount": 10, "currency": "KES"}' ``` ```javascript Node.js theme={null} const res = await fetch('https://merchant.minisend.xyz/api/offramp/quote', { method: 'POST', headers: { 'Authorization': 'Bearer ms_live_your_key_here', 'Content-Type': 'application/json', }, body: JSON.stringify({ amount: 10, currency: 'KES' }), }); if (!res.ok) throw new Error((await res.json()).error); const quote = await res.json(); ``` ```python Python theme={null} import requests res = requests.post( "https://merchant.minisend.xyz/api/offramp/quote", headers={ "Authorization": "Bearer ms_live_your_key_here", "Content-Type": "application/json", }, json={"amount": 10, "currency": "KES"}, ) res.raise_for_status() quote = res.json() ``` ## Response (200) ```json theme={null} { "amount_usdc": 10, "currency": "KES", "rate": 129.45, "amount_local": 1294, "fee": 13, "recipient_amount": 1281, "expires_at": "2026-07-05T12:05:00.000Z" } ``` **rate** `number` *required* Local currency per 1 USDC. **amount\_local** `number` *required* The local amount before the fee: `amount × rate`, rounded down to a whole number. **fee** `number` *required* Fee in local currency, deducted from the payout on send-and-confirm orders. `0` on automatic orders, where the fee is added to what you send. **recipient\_amount** `number` *required* What the recipient receives: `amount_local − fee`. **deposit\_submission\_required** `boolean` *required* How an order with these details is paid. See [two ways to send](/offramp/overview#two-ways-to-send-your-usdc). `false` means automatic. **estimated\_total\_deposit\_usdc** `number` Automatic orders only. An estimate of what you'll send, including fees. Always send the order's `total_deposit_usdc`. **recipient\_name** `string` The account's registered name, when `recipient` is included and a name is available. **expires\_at** `string` *required* When the quote expires, ISO 8601. ## Errors | Status | Meaning | | - | - | | `400` | Invalid amount, currency, or recipient, or the local amount is out of range | | `403` | Off-ramp isn't enabled for your account | | `422` | The recipient's account failed verification | | `502` | A rate or verification was temporarily unavailable. Retry | See [error handling](/api-reference/errors) for the response shape. # Submit a deposit Source: https://docs.minisend.xyz/api-reference/offramp/submit-deposit Report your USDC transfer by submitting the Base transaction hash, for orders where deposit_submission_required is true. Triggers the fiat payout. Submits the transaction hash of your USDC transfer. The transfer is verified and the payout starts. > [!NOTE] > > **Only for orders where `deposit_submission_required` is `true`.** Calling it for an automatic order returns `409`. ## Endpoint ```text theme={null} POST https://merchant.minisend.xyz/api/offramp/orders/{order_id}/deposit ``` ```text theme={null} Authorization: Bearer ms_live_your_key_here ``` Requires the `offramp` scope. Orders you don't own return `404`. ## Body **transaction\_hash** `string` *required* The Base transaction hash of your transfer to `deposit_address`: `0x` followed by 64 hex characters. A hash can pay for one order only. ## Example ```bash cURL theme={null} curl -X POST https://merchant.minisend.xyz/api/offramp/orders/9b2f6c1e-.../deposit \ -H "Authorization: Bearer ms_live_your_key_here" \ -H "Content-Type: application/json" \ -d '{"transaction_hash": "0x55a572efe1720250e442f38741477a4fc3f7f152e5cd208cc52f8222a1c2a13b"}' ``` ```javascript Node.js theme={null} const res = await fetch( `https://merchant.minisend.xyz/api/offramp/orders/${orderId}/deposit`, { method: 'POST', headers: { 'Authorization': 'Bearer ms_live_your_key_here', 'Content-Type': 'application/json', }, body: JSON.stringify({ transaction_hash: txHash }), } ); if (res.status === 422) { // transfer could not be verified. Check amount/chain/hash and retry } const order = await res.json(); // status: "settling" on success ``` ## Response (200) The full [order object](/api-reference/offramp/get-order) with `status: "settling"`: ```json theme={null} { "order_id": "9b2f6c1e-...", "status": "settling", "amount_usdc": 10, "deposit_tx_hash": "0x55a572efe1720250e442f38741477a4fc3f7f152e5cd208cc52f8222a1c2a13b", "rate": 129.52, "amount_local": 1295, "fee": 13, "...": "..." } ``` `rate`, `amount_local`, and `fee` now reflect the actual payout. Wait for the [`offramp.completed` webhook](/offramp/webhooks), or [get the order](/api-reference/offramp/get-order). Resubmitting an accepted hash returns the order unchanged. ## Errors | Status | Meaning | | - | - | | `400` | `transaction_hash` is malformed | | `404` | The order doesn't exist or belongs to another account | | `409` | The order is automatic, already final, or expired, or the hash was used for another order | | `422` | The transfer couldn't be verified: wrong amount, network, or address. The order stays `pending` | | `429` | More than 20 requests in the last minute | > [!WARNING] > > On `422` the payout did **not** start. Confirm you sent `total_deposit_usdc` in USDC on Base to `deposit_address`, then resubmit. If the order expires first, send the `order_id` and hash to [support](https://t.me/minisendapp). # Validate a recipient Source: https://docs.minisend.xyz/api-reference/offramp/validate-account Check a bank account, mobile number, till, or paybill and resolve the registered account name before creating an order. Checks that a recipient's account exists and finds the name it's registered to, so you can show your user a "Pay Jane Wanjiku?" screen before they send. Bank accounts must exist and have a name. For phone numbers, tills, and paybills, we may not find a name even when the number is fine. ## Endpoint ```text theme={null} POST https://merchant.minisend.xyz/api/offramp/validate-account ``` ```text theme={null} Authorization: Bearer ms_live_your_key_here ``` Requires the `offramp` scope. ## Body **currency** `string` *required* `KES`, `NGN`, `GHS`, or `UGX`. This decides which recipient fields you need. **recipient** `object` *required* Who you want to pay. See [recipients](/offramp/recipients) for the fields. ## Example ```bash cURL theme={null} curl -X POST https://merchant.minisend.xyz/api/offramp/validate-account \ -H "Authorization: Bearer ms_live_your_key_here" \ -H "Content-Type: application/json" \ -d '{ "currency": "NGN", "recipient": { "account_name": "Chidi Okafor", "institution": "GTBINGLA", "account_number": "0123456789" } }' ``` ```javascript Node.js theme={null} const res = await fetch('https://merchant.minisend.xyz/api/offramp/validate-account', { method: 'POST', headers: { 'Authorization': 'Bearer ms_live_your_key_here', 'Content-Type': 'application/json', }, body: JSON.stringify({ currency: 'NGN', recipient: { account_name: 'Chidi Okafor', institution: 'GTBINGLA', account_number: '0123456789', }, }), }); const { valid, recipient_name } = await res.json(); ``` ## Response (200) ```json theme={null} { "valid": true, "recipient_name": "CHIDI OKAFOR" } ``` **valid** `boolean` *required* The account exists and can receive payouts. **recipient\_name** `string | null` *required* The name the account is registered to, or `null` when the account is fine but we couldn't find a name. That's common for phone numbers. Show the name to your user before they confirm. ## Invalid account (422) ```json theme={null} { "valid": false, "error": "Recipient validation failed. Confirm the account details and try again." } ``` ## Errors | Status | Meaning | | - | - | | `400` | We don't support that currency, or the recipient fields aren't right | | `403` | Off-ramp isn't enabled for your account | | `422` | The account didn't pass our check. You get `valid: false` and an `error` message | # Create an order Source: https://docs.minisend.xyz/api-reference/onramp/create-order Create an onramp order in one call: an M-Pesa prompt to the customer's phone for KES, or a bank account to transfer into for NGN. USDC is released to the address you specify. Prices and creates an onramp order. For KES, an M-Pesa payment prompt is sent to the customer's phone. For NGN, the response includes bank transfer instructions for the payer. > [!WARNING] > > Call this endpoint from your server. Never expose your API key in a browser or app. ## Endpoint ```text theme={null} POST https://merchant.minisend.xyz/api/onramp/orders ``` ```text theme={null} Authorization: Bearer ms_live_your_key_here Idempotency-Key: collect-2201 ``` Requires the `onramp` scope. > [!TIP] > > Send an `Idempotency-Key` unique to this collection, such as your order ID. A repeated key returns the original order with `200`, and no second prompt is sent. ## Body **currency** `string` *required* `KES` (M-Pesa) or `NGN` (bank transfer). **amount\_usdc** `number` The USDC amount you want to receive. Provide this or `amount_kes` / `amount_ngn`, not both. **amount\_kes** `number` KES only. The exact KES amount to charge the customer. Provide this or `amount_usdc`, not both. **amount\_ngn** `number` NGN only, at most 2 decimal places. The exact NGN amount the payer will transfer. Provide this or `amount_usdc`, not both. **phone** `string` KES only, required. The customer's Kenyan mobile number, any common format (`0712345678`, `+254712345678`, `254712345678`). **network** `string` KES only. `Safaricom`. Optional: the network is detected from the number. Set it for numbers ported to Safaricom. Only Safaricom M-Pesa is supported. `Airtel` returns `400`. **refund\_account** `object` NGN only, required. The payer's bank account, used for refunds if the order fails after payment. * `institution`: bank code from [`GET /api/onramp/institutions`](/api-reference/onramp/institutions). * `account_number`: the 10-digit NUBAN. * `account_name`: optional. Looked up from the bank. Required only when a `422` asks for it. **address** `string` *required* A wallet address you control, starting with `0x`. USDC is released here on Base after payment. **reference** `string` Your own reference, such as your order ID. Returned as `external_reference` in responses and webhooks. See [limits](/onramp/overview#limits) for amount and rate limits. ## Example, KES ```bash cURL theme={null} curl -X POST https://merchant.minisend.xyz/api/onramp/orders \ -H "Authorization: Bearer ms_live_your_key_here" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: collect-2201" \ -d '{ "currency": "KES", "amount_kes": 1000, "phone": "0712345678", "address": "0xYourWalletAddress0000000000000000000000", "reference": "collect-2201" }' ``` ```javascript Node.js theme={null} const res = await fetch('https://merchant.minisend.xyz/api/onramp/orders', { method: 'POST', headers: { 'Authorization': 'Bearer ms_live_your_key_here', 'Content-Type': 'application/json', 'Idempotency-Key': 'collect-2201', }, body: JSON.stringify({ currency: 'KES', amount_kes: 1000, phone: '0712345678', address: '0xYourWalletAddress0000000000000000000000', reference: 'collect-2201', }), }); if (!res.ok) throw new Error((await res.json()).error); const order = await res.json(); ``` ```python Python theme={null} import requests res = requests.post( "https://merchant.minisend.xyz/api/onramp/orders", headers={ "Authorization": "Bearer ms_live_your_key_here", "Content-Type": "application/json", "Idempotency-Key": "collect-2201", }, json={ "currency": "KES", "amount_kes": 1000, "phone": "0712345678", "address": "0xYourWalletAddress0000000000000000000000", "reference": "collect-2201", }, ) res.raise_for_status() order = res.json() ``` ### Response (201), KES ```json theme={null} { "order_id": "7c1e4f9a-...", "status": "pending", "currency": "KES", "payment_method": "mpesa", "amount_usdc": 7.62, "amount_local": 1000, "fee": 10, "rate": 129.92, "customer_phone": "0712345678", "mobile_network": "Safaricom", "release_address": "0xyourwalletaddress0000000000000000000000", "release_chain": "base", "release_asset": "USDC", "external_reference": "collect-2201", "expires_at": "2026-07-23T12:30:00.000Z", "created_at": "2026-07-23T12:00:03.000Z", "instructions": "The customer's phone (0712345678) will receive an M-Pesa prompt for KSh 1,000. On payment, 7.62 USDC (Base) is released to release_address." } ``` ## Example, NGN ```bash cURL theme={null} curl -X POST https://merchant.minisend.xyz/api/onramp/orders \ -H "Authorization: Bearer ms_live_your_key_here" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: order-8841" \ -d '{ "currency": "NGN", "amount_ngn": 10120, "refund_account": { "institution": "GTBINGLA", "account_number": "0123456789", "account_name": "John Doe" }, "address": "0xYourWalletAddress0000000000000000000000", "reference": "order-8841" }' ``` ```javascript Node.js theme={null} const res = await fetch('https://merchant.minisend.xyz/api/onramp/orders', { method: 'POST', headers: { 'Authorization': 'Bearer ms_live_your_key_here', 'Content-Type': 'application/json', 'Idempotency-Key': 'order-8841', }, body: JSON.stringify({ currency: 'NGN', amount_ngn: 10120, refund_account: { institution: 'GTBINGLA', account_number: '0123456789', account_name: 'John Doe', }, address: '0xYourWalletAddress0000000000000000000000', reference: 'order-8841', }), }); if (!res.ok) throw new Error((await res.json()).error); const order = await res.json(); ``` ### Response (201), NGN ```json theme={null} { "order_id": "...", "status": "pending", "currency": "NGN", "payment_method": "bank_transfer", "amount_usdc": 7.14, "amount_local": 10120, "fee": 120, "rate": 1400, "customer_phone": null, "mobile_network": null, "refund_account": { "institution": "GTBINGLA", "account_number": "0123456789", "account_name": "JOHN DOE" }, "payment_instructions": { "method": "bank_transfer", "bank_name": "Guaranty Trust Bank", "account_number": "9876543210", "account_name": "Provider A / John Doe", "amount": "10120", "currency": "NGN", "expires_at": "2026-09-26T10:30:00Z", "note": "Transfer exactly this amount, kobo included, before expires_at. A different amount or a late transfer will not be credited." }, "release_address": "0x...", "release_chain": "base", "release_asset": "USDC", "external_reference": "order-8841", "expires_at": "2026-09-26T10:30:00Z", "created_at": "...", "instructions": "Ask the payer to transfer exactly NGN 10120 to ... before ..." } ``` **order\_id** `string` *required* Unique order identifier. **payment\_method** `string` *required* `mpesa` or `bank_transfer`. **amount\_usdc** `number` *required* USDC released to `release_address` after payment. **amount\_local** `number` *required* What the customer pays, including the fee. **mobile\_network** `string` KES only. `Safaricom`. `null` for NGN. **refund\_account** `object` NGN only. The refund account, with `account_name` resolved from the bank. **payment\_instructions** `object` NGN only. Present while the order is `pending`. Show `amount` to the payer exactly as returned: it's a string and may include kobo. **release\_address** `string` *required* The address USDC is released to. Always the `address` you sent. **release\_chain** `string` *required* Always `base`. **expires\_at** `string` *required* The payment deadline, ISO 8601. After it, the order is `expired`. Always read it from the response. **instructions** `string` *required* Plain-language next steps for this order. ## Errors | Status | Meaning | | - | - | | `200` | Repeated `Idempotency-Key`. The original order is returned | | `400` | Invalid phone, address, `refund_account`, amount, or `currency` | | `403` | Onramp isn't enabled for your account | | `422` | NGN only. `refund_account` failed verification, or `account_name` is required | | `429` | Rate limit exceeded for your account, the phone number, or the payer's bank account | | `502` | The order couldn't be started and is marked `failed`. Create a new order | # Get an order Source: https://docs.minisend.xyz/api-reference/onramp/get-order Fetch the current state of an onramp order: status, the release address, the receipt, or the bank transfer details while payment is pending. Returns the current state of an onramp order. Use [webhooks](/onramp/webhooks) for updates, and this endpoint to confirm a state. ## Endpoint ```text theme={null} GET https://merchant.minisend.xyz/api/onramp/orders/{order_id} ``` ```text theme={null} Authorization: Bearer ms_live_your_key_here ``` Requires the `onramp` scope. Orders you don't own return `404`. ## Example ```bash theme={null} curl https://merchant.minisend.xyz/api/onramp/orders/7c1e4f9a-... \ -H "Authorization: Bearer ms_live_your_key_here" ``` ## Response (200), KES ```json theme={null} { "order_id": "7c1e4f9a-...", "status": "completed", "currency": "KES", "payment_method": "mpesa", "amount_usdc": 7.62, "amount_local": 1000, "fee": 10, "rate": 129.92, "customer_phone": "0712345678", "mobile_network": "Safaricom", "release_address": "0xyourwalletaddress0000000000000000000000", "release_chain": "base", "release_asset": "USDC", "receipt_number": "SHQ1234ABC", "release_tx_hash": "0x55a572efe1720250e442f38741477a4fc3f7f152e5cd208cc52f8222a1c2a13b", "external_reference": "collect-2201", "expires_at": "2026-07-23T12:30:00.000Z", "completed_at": "2026-07-23T12:04:41.000Z", "created_at": "2026-07-23T12:00:03.000Z" } ``` ## Response (200), NGN pending ```json theme={null} { "order_id": "...", "status": "pending", "currency": "NGN", "payment_method": "bank_transfer", "amount_usdc": 7.14, "amount_local": 10120, "fee": 120, "rate": 1400, "customer_phone": null, "mobile_network": null, "refund_account": { "institution": "GTBINGLA", "account_number": "0123456789", "account_name": "JOHN DOE" }, "payment_instructions": { "method": "bank_transfer", "bank_name": "Guaranty Trust Bank", "account_number": "9876543210", "account_name": "Provider A / John Doe", "amount": "10120", "currency": "NGN", "expires_at": "2026-09-26T10:30:00Z", "note": "Transfer exactly this amount, kobo included, before expires_at. A different amount or a late transfer will not be credited." }, "release_address": "0x...", "release_chain": "base", "release_asset": "USDC", "external_reference": "order-8841", "expires_at": "2026-09-26T10:30:00Z", "created_at": "..." } ``` **status** `string` *required* `pending`, `deposit_received`, `completed`, `failed`, `cancelled`, or `expired`. See [order statuses](/onramp/overview#order-statuses). `deposit_received` occurs only on NGN orders, and `cancelled` only on KES orders. An unpaid order past `expires_at` returns `expired`. **payment\_method** `string` *required* `mpesa` or `bank_transfer`. **refund\_account** `object` NGN only. The payer's verified refund account. **payment\_instructions** `object` NGN only. Present only while the order is `pending`. Don't show it after `expires_at`. **receipt\_number** `string` KES only. The M-Pesa confirmation code, when available. **release\_tx\_hash** `string` The Base transaction hash of the USDC release. Set on or shortly after completion. **failure\_reason** `string` Set on `failed` and `cancelled` orders. See [`onramp.failed`](/onramp/webhooks#onramp-failed) for the values. **completed\_at** `string` ISO 8601. ## Errors | Status | Meaning | | - | - | | `403` | Onramp isn't enabled for your account | | `404` | The order doesn't exist or belongs to another account | # List bank codes Source: https://docs.minisend.xyz/api-reference/onramp/institutions Look up the bank code to use in refund_account.institution before creating an NGN bank transfer order. Returns the bank codes for `refund_account.institution` on NGN orders. The codes are the same as the [off-ramp list](/api-reference/offramp/institutions). ## Endpoint ```text theme={null} theme={null} GET https://merchant.minisend.xyz/api/onramp/institutions ``` ```text theme={null} theme={null} Authorization: Bearer ms_live_your_key_here ``` Requires the `onramp` scope. ## Query parameters **currency** `string` (default: NGN) Only `NGN` is supported. ## Example ```bash theme={null} theme={null} curl "https://merchant.minisend.xyz/api/onramp/institutions?currency=NGN" \ -H "Authorization: Bearer ms_live_your_key_here" ``` ## Response (200) ```json theme={null} theme={null} { "currency": "NGN", "count": 2, "institutions": [ { "code": "GTBINGLA", "name": "Guaranty Trust Bank", "type": "bank" }, { "code": "ABNGNGLA", "name": "Access Bank", "type": "bank" } ] } ``` The list changes rarely. Cache it for up to a day. **count** `number` *required* Number of entries in `institutions`. **institutions** `array` *required* **institution** **code** `string` *required* Pass this as `refund_account.institution` when [creating an NGN order](/api-reference/onramp/create-order). **name** `string` *required* Display name for the bank. **type** `string` *required* Institution type, currently always `bank`. ## Errors | Status | Meaning | | - | - | | `400` | Unsupported currency | | `403` | Onramp isn't enabled for your account | | `502` | The list is temporarily unavailable. Retry | See [error handling](/api-reference/errors) for the response shape. # List orders Source: https://docs.minisend.xyz/api-reference/onramp/list-orders Paginated list of your onramp orders across M-Pesa and bank transfer, newest first, filterable by status. Lists your orders, newest first. ## Endpoint ```text theme={null} GET https://merchant.minisend.xyz/api/onramp/orders ``` ```text theme={null} Authorization: Bearer ms_live_your_key_here ``` Requires the `onramp` scope. ## Query parameters **status** `string` Filter by status: `pending`, `deposit_received`, `completed`, `failed`, `cancelled`, or `expired`. `deposit_received` only ever appears on bank transfer (NGN) orders, and `cancelled` only on M-Pesa (KES) orders. **limit** `number` (default: 20) Page size, max 100. **offset** `number` (default: 0) How many orders to skip. Use it to get the next page. ## Example ```bash theme={null} curl "https://merchant.minisend.xyz/api/onramp/orders?status=completed&limit=50" \ -H "Authorization: Bearer ms_live_your_key_here" ``` ## Response (200) ```json theme={null} { "orders": [ { "order_id": "7c1e4f9a-...", "status": "completed", "currency": "KES", "payment_method": "mpesa", "amount_usdc": 7.62, "receipt_number": "SHQ1234ABC", "created_at": "2026-07-23T12:00:03.000Z" }, { "order_id": "...", "status": "completed", "currency": "NGN", "payment_method": "bank_transfer", "amount_usdc": 7.14, "created_at": "2026-09-26T10:01:00.000Z" } ], "total": 84, "limit": 50, "offset": 0 } ``` **orders** `array` *required* Full [order objects](/api-reference/onramp/get-order), same shape as `GET /api/onramp/orders/{order_id}`. **total** `number` *required* How many orders match your filter in total. Use it with `limit` and `offset` to page through them. # Get a quote Source: https://docs.minisend.xyz/api-reference/onramp/quote Price an M-Pesa or bank transfer collection before creating an order. Specify the local amount or the USDC amount, and get back the rate and fee. Tells you what a collection will cost and what you'll receive, without creating anything or sending a payment prompt. ## Endpoint ```text theme={null} POST https://merchant.minisend.xyz/api/onramp/quote ``` ```text theme={null} Authorization: Bearer ms_live_your_key_here ``` Requires the `onramp` scope. See [getting access](/onramp/overview#getting-access). ## Body **currency** `string` *required* `KES` (M-Pesa) or `NGN` (bank transfer). **amount\_usdc** `number` How much USDC you want to receive. Your customer pays that amount in local currency, plus the platform fee. Send this or `amount_kes` / `amount_ngn`, not both. **amount\_kes** `number` KES only. Exactly how much KES to charge your customer. We take the fee from it and turn the rest into USDC. Send this or `amount_usdc`, not both. **amount\_ngn** `number` NGN only, up to 2 decimal places. Exactly how much NGN to charge the payer. We take the fee from it and turn the rest into USDC. Send this or `amount_usdc`, not both. ## Example ```bash cURL theme={null} curl -X POST https://merchant.minisend.xyz/api/onramp/quote \ -H "Authorization: Bearer ms_live_your_key_here" \ -H "Content-Type: application/json" \ -d '{"currency": "KES", "amount_kes": 1000}' ``` ```javascript Node.js theme={null} const res = await fetch('https://merchant.minisend.xyz/api/onramp/quote', { method: 'POST', headers: { 'Authorization': 'Bearer ms_live_your_key_here', 'Content-Type': 'application/json', }, body: JSON.stringify({ currency: 'KES', amount_kes: 1000 }), }); if (!res.ok) throw new Error((await res.json()).error); const quote = await res.json(); ``` ```python Python theme={null} import requests res = requests.post( "https://merchant.minisend.xyz/api/onramp/quote", headers={ "Authorization": "Bearer ms_live_your_key_here", "Content-Type": "application/json", }, json={"currency": "KES", "amount_kes": 1000}, ) res.raise_for_status() quote = res.json() ``` ## Response (200), KES ```json theme={null} { "currency": "KES", "payment_method": "mpesa", "amount_kes": 1000, "fee_kes": 10, "net_kes": 990, "amount_usdc": 7.62, "rate": 129.92, "expires_at": "2026-07-23T12:05:00.000Z" } ``` ## Response (200), NGN ```json theme={null} { "currency": "NGN", "payment_method": "bank_transfer", "amount_ngn": 10120, "fee_ngn": 120, "net_ngn": 10000, "amount_usdc": 7.14, "rate": 1400, "expires_at": "2026-09-26T10:05:00.000Z" } ``` **payment\_method** `string` *required* `mpesa` or `bank_transfer`. **amount\_kes** `number` KES only. Exactly what your customer will be asked to pay on their phone. **fee\_kes** `number` KES only. Our fee in KES. It's already part of `amount_kes`. **net\_kes** `number` KES only. `amount_kes` minus `fee_kes`. This is the part that becomes USDC. **amount\_ngn** `number` NGN only. Exactly what the payer will be asked to send. **fee\_ngn** `number` NGN only. Our fee in NGN. It's already part of `amount_ngn`. **net\_ngn** `number` NGN only. `amount_ngn` minus `fee_ngn`. This is the part that becomes USDC. **amount\_usdc** `number` *required* What your address will receive. **rate** `number` *required* How much local currency 1 USDC is worth right now. **expires\_at** `string` *required* Roughly how long this quote holds, ISO 8601. A quote doesn't fix the price. The order uses the live rate at the moment you create it. ## Errors | Status | Meaning | | - | - | | `400` | Send exactly one amount (`amount_usdc`, `amount_kes`, or `amount_ngn`), within the [limits](/onramp/overview#limits), with a `currency` of `KES` or `NGN` | | `403` | Onramp isn't enabled for your account | | `502` | We couldn't get a rate just now. Try again | See [error handling](/api-reference/errors) for the response shape. # Payment link endpoints Source: https://docs.minisend.xyz/api-reference/payment-link Share a no-code payment link for USDC and USDT payments, or fetch merchant info plus a live exchange rate with the public slug lookup endpoint. Accept payments through a shareable link, with no integration code. ## Payment link URL ```text theme={null} https://merchant.minisend.xyz/pay/{slug} ``` Set your slug in **Settings**. Example: `mystore` → `https://merchant.minisend.xyz/pay/mystore`. The customer enters an amount in USDC (\$0.01 to \$10,000) and continues to the payment page. Payments from a link send the same webhooks as API-created checkout sessions. See [payment links](/payments/payment-links). ## Merchant info endpoint Returns public business details and an indicative rate for a slug. No API key is required. ```text theme={null} GET https://merchant.minisend.xyz/api/merchant/pay/info?slug={slug} ``` ### Query **slug** `string` *required* Your payment link slug. ### Examples ```bash cURL theme={null} curl "https://merchant.minisend.xyz/api/merchant/pay/info?slug=mystore" ``` ```javascript Node.js theme={null} const res = await fetch( 'https://merchant.minisend.xyz/api/merchant/pay/info?slug=mystore' ); const merchant = await res.json(); ``` ```python Python theme={null} import requests res = requests.get( "https://merchant.minisend.xyz/api/merchant/pay/info", params={"slug": "mystore"}, ) merchant = res.json() ``` ### Response ```json theme={null} { "business_name": "My Store", "logo_url": "https://example.com/logo.png", "tagline": "Coffee, brewed in Nairobi", "slug": "mystore", "payout_currency": "KES", "payout_method": "MOBILE", "indicative_rate": 129.0 } ``` **business\_name** `string` *required* **logo\_url** `string | null` *required* **tagline** `string | null` *required* Shown beneath the business name. **slug** `string` *required* **payout\_currency** `string` *required* `KES`, `NGN`, `GHS`, or `UGX`. **payout\_method** `string` *required* `MOBILE`, `BUY_GOODS`, `PAYBILL`, or `BANK_TRANSFER`. **indicative\_rate** `number | null` *required* Local currency per 1 USDC. `null` if a rate is temporarily unavailable. Returns `404` if the slug doesn't exist or the business is inactive. # Create a wallet Source: https://docs.minisend.xyz/api-reference/wallet-api/create-wallet Issue an on-chain address for one of your users, or return their existing one. Idempotent on your own reference string. Creates an address for your `walletRef`, or gives you the existing one if you've already created it. You never end up with two addresses for the same user. > [!WARNING] > > Call this from your server only, never from a browser or app, so your API key stays secret. ## Endpoint ```text theme={null} POST https://merchant.minisend.xyz/api/v1/wallets ``` ```text theme={null} Authorization: Bearer wsk_live_your_key_here ``` ## Body **walletRef** `string` *required* Your own ID for this user or wallet: 1 to 128 characters, using letters, numbers, and `_ : . -`. Your own user ID works well. Each one can only belong to one wallet on your account. **chain** `string` (default: BASE) `BASE`, `ARB`, `AVAX`, `ETH`, `OP`, `MATIC`, or `ARC`. It has to be a network your plan includes. See [pricing](/wallet-api/overview#pricing). This never creates a second address. Your user's address already works on every network your plan includes, so passing another network here just checks it's allowed and gives you back the same address. `ARC` is USDC only, see [Arc](/wallet-api/overview#arc). Solana isn't passed here: its address comes back in `solana_address`. **metadata** `object` Any JSON object. We save it with the wallet and give it back when you fetch the wallet later. ## Example ```bash cURL theme={null} curl -X POST https://merchant.minisend.xyz/api/v1/wallets \ -H "Authorization: Bearer wsk_live_your_key_here" \ -H "Content-Type: application/json" \ -d '{"walletRef": "user-9214"}' ``` ```javascript Node.js theme={null} const res = await fetch('https://merchant.minisend.xyz/api/v1/wallets', { method: 'POST', headers: { 'Authorization': 'Bearer wsk_live_your_key_here', 'Content-Type': 'application/json', }, body: JSON.stringify({ walletRef: 'user-9214' }), }); if (!res.ok) throw new Error((await res.json()).error); const { wallet } = await res.json(); ``` ```python Python theme={null} import requests res = requests.post( "https://merchant.minisend.xyz/api/v1/wallets", headers={ "Authorization": "Bearer wsk_live_your_key_here", "Content-Type": "application/json", }, json={"walletRef": "user-9214"}, ) res.raise_for_status() wallet = res.json()["wallet"] ``` ## Response (201) ```json theme={null} { "wallet": { "id": "3f6b2e1a-...", "tenant_id": "a7c9e2d0-...", "master_wallet_id": "d4f81b3c-...", "wallet_ref": "user-9214", "address": "0xabc1230000000000000000000000000000dead", "chain": "BASE", "chains": ["BASE", "MATIC", "ARB", "OP", "ETH", "AVAX", "ARC"], "solana_address": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU", "status": "active", "mode": "live", "metadata": null, "created_at": "2026-07-29T09:00:00.000Z" } } ``` **id** `string` *required* Our ID for this wallet. Use it with [get wallet](/api-reference/wallet-api/get-wallet). **tenant\_id** `string` *required* Your account's ID. It's the same on every wallet you create. **master\_wallet\_id** `string` *required* The master wallet (your business's main wallet) this address sits under. **wallet\_ref** `string` *required* The ID you sent. **address** `string` *required* The crypto address, in lowercase. **chain** `string` *required* The network this address was first created on. Always `BASE`. **chains** `array` *required* Every network this address works on: `BASE` first, then each other network your plan includes. On a paid plan, that's every network listed under [pricing](/wallet-api/overview#pricing). On the Free plan, it's just `["BASE"]`. Solana is never listed here, because its address is different. See `solana_address`. **solana\_address** `string` This user's Solana address, on a paid plan. It's a separate address from `address`, and it's case-sensitive, so store it exactly as it is. `null` on the Free plan, and for a short while after a new wallet is created, until it's ready. See [Solana](/wallet-api/overview#solana). **status** `string` *required* `active` or `frozen`. **mode** `string` *required* Always `live`. **metadata** `object` Whatever you sent when creating it, or `null`. ## Errors | Status | Meaning | | - | - | | `400` | Something isn't right: the `walletRef` format, `metadata` isn't a JSON object, your plan doesn't include that `chain`, or Base isn't activated | | `401` | Your API key is missing or wrong | | `403` | Your account is switched off | | `429` | Too many requests (the limit is 60 a minute) | # Find a deposit Source: https://docs.minisend.xyz/api-reference/wallet-api/deposits-find Look again for a deposit that was paid but never showed up. Looks up a transaction across your addresses and records the deposit if it isn't already recorded. Use it when an expected deposit hasn't appeared. Only your own addresses are searched. ## Endpoint ```text theme={null} POST https://merchant.minisend.xyz/api/v1/deposits/find ``` ```text theme={null} Authorization: Bearer wsk_live_your_key_here ``` Requires `wallets:write`: a found deposit is recorded and can send a [`wallet.deposit.received`](/wallet-api/webhooks) webhook. ## Body **tx\_hash** `string` *required* The transaction hash. For Solana, the case-sensitive transaction signature. ## Example ```bash theme={null} curl -X POST https://merchant.minisend.xyz/api/v1/deposits/find \ -H "Authorization: Bearer wsk_live_your_key_here" \ -H "Content-Type: application/json" \ -d '{"tx_hash": "0x55a572efe1720250e442f38741477a4fc3f7f152e5cd208cc52f8222a1c2a13b"}' ``` ## Response (200) Found and recorded: ```json theme={null} { "found": true, "recorded": true, "deposit": { "id": "7b2e1a3f-...", "...": "..." } } ``` Found and already recorded. No webhook is sent: ```json theme={null} { "found": true, "recorded": false, "deposit": { "id": "7b2e1a3f-...", "...": "..." } } ``` `deposit` has the same fields as in [get a wallet's deposits](/api-reference/wallet-api/get-wallet-deposits). ## Response (404) ```json theme={null} { "found": false, "message": "No deposit with that transaction was found on your addresses. It may still be confirming, or it may have been sent somewhere else." } ``` ## Errors | Status | Meaning | | - | - | | `400` | `tx_hash` is malformed | | `401` | API key missing or invalid | | `404` | Not found on your addresses | | `503` | Search temporarily unavailable. Retry | # Get a wallet's balance Source: https://docs.minisend.xyz/api-reference/wallet-api/get-balance Read a wallet's live USDC balance on every chain it's live on, straight from each chain. Tells you how much USDC a wallet holds right now. We check the blockchain itself each time, rather than adding up the deposits we've recorded, so the figure always matches what's really there. An address is the same on every network your plan includes, so this checks all of them and adds them up. ## Endpoint ```text theme={null} GET https://merchant.minisend.xyz/api/v1/wallets/{walletId}/balance ``` ```text theme={null} Authorization: Bearer wsk_live_your_key_here ``` ## Example ```bash theme={null} curl https://merchant.minisend.xyz/api/v1/wallets/3f6b2e1a-.../balance \ -H "Authorization: Bearer wsk_live_your_key_here" ``` ## Response (200) ```json theme={null} { "wallet_id": "3f6b2e1a-...", "wallet_ref": "user-9214", "address": "0xabc1230000000000000000000000000000dead", "chain": "BASE", "token": "USDC", "amount": "10.500000", "balances": [ { "chain": "BASE", "amount": "10.500000" }, { "chain": "MATIC", "amount": "2.000165" }, { "chain": "ARB", "amount": "0.000000" }, { "chain": "OP", "amount": null, "error": "unavailable" } ], "total": "12.500165", "total_complete": false } ``` **chain** `string` *required* The network the wallet was first created on, always `BASE`. The `amount` next to it is the balance on Base only. It's there for older setups that only read these two fields. **amount** `string` *required* The balance on `chain`, as text. Store and compare it as an exact decimal, never a floating-point number. **balances** `array` *required* One entry for each network the address works on, `BASE` first. On a paid plan there's also a `SOL` entry, which is the balance of the wallet's separate `solana_address`, and it counts toward `total`. We check each network separately. If we can't read one, it comes back as `{ "chain": ..., "amount": null, "error": "unavailable" }`, and the rest of the call still works. **total** `string` *required* The total across every network we could read, to 6 decimal places. **total\_complete** `boolean` *required* `false` if we couldn't read one of the networks in `balances`. In that case `total` is the least the wallet holds, not the full amount. `true` when we read every network. ## Errors | Status | Meaning | | - | - | | `401` | Your API key is missing or wrong | | `404` | We can't find this wallet, or it belongs to another account | | `502` | We couldn't read the balance on Base just now. Try again | # Get a wallet Source: https://docs.minisend.xyz/api-reference/wallet-api/get-wallet Fetch a single wallet you created, by its Minisend-assigned id. Fetches a wallet you created, using the `id` we gave you when you created it. ## Endpoint ```text theme={null} GET https://merchant.minisend.xyz/api/v1/wallets/{walletId} ``` ```text theme={null} Authorization: Bearer wsk_live_your_key_here ``` Use the wallet's `id` (a long ID like `3f6b2e1a-...`) in the URL, **not** your own `wallet_ref`. You get a `404` for a wallet on another account, and also for anything that isn't a valid `id`, so sending a `wallet_ref` here by mistake gives you a `404` too. To look a wallet up by your own `wallet_ref`, use [get a wallet by reference](/api-reference/wallet-api/get-wallet-by-ref). ## Example ```bash theme={null} curl https://merchant.minisend.xyz/api/v1/wallets/3f6b2e1a-... \ -H "Authorization: Bearer wsk_live_your_key_here" ``` ## Response (200) ```json theme={null} { "wallet": { "id": "3f6b2e1a-...", "tenant_id": "a7c9e2d0-...", "master_wallet_id": "d4f81b3c-...", "wallet_ref": "user-9214", "address": "0xabc1230000000000000000000000000000dead", "chain": "BASE", "chains": ["BASE", "MATIC", "ARB", "OP", "ETH", "AVAX", "ARC"], "solana_address": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU", "status": "active", "mode": "live", "metadata": null, "created_at": "2026-07-29T09:00:00.000Z" } } ``` Same shape as [create wallet](/api-reference/wallet-api/create-wallet)'s response. ## Errors | Status | Meaning | | - | - | | `401` | Your API key is missing or wrong | | `404` | We can't find this wallet, it belongs to another account, or what's in the URL isn't a valid `id` | # Get a wallet by reference Source: https://docs.minisend.xyz/api-reference/wallet-api/get-wallet-by-ref Look a wallet up by your own identifier instead of Minisend's id. Finds a wallet using the `walletRef` you gave it when you created it, so you don't need to save our `id` as well as your own. ## Endpoint ```text theme={null} GET https://merchant.minisend.xyz/api/v1/wallets/by-ref/{walletRef} ``` ```text theme={null} Authorization: Bearer wsk_live_your_key_here ``` It only looks in your account, so it doesn't matter if another business uses the same `walletRef` (like `user_1`). ## Example ```bash theme={null} curl https://merchant.minisend.xyz/api/v1/wallets/by-ref/user-9214 \ -H "Authorization: Bearer wsk_live_your_key_here" ``` ## Response (200) ```json theme={null} { "wallet": { "id": "3f6b2e1a-...", "tenant_id": "a7c9e2d0-...", "master_wallet_id": "d4f81b3c-...", "wallet_ref": "user-9214", "address": "0xabc1230000000000000000000000000000dead", "chain": "BASE", "chains": ["BASE", "MATIC", "ARB", "OP", "ETH", "AVAX", "ARC"], "solana_address": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU", "status": "active", "mode": "live", "metadata": null, "created_at": "2026-07-29T09:00:00.000Z" } } ``` Same shape as [create wallet](/api-reference/wallet-api/create-wallet)'s response. ## Errors | Status | Meaning | | - | - | | `400` | `walletRef` needs to be 1 to 128 characters, using letters, numbers, or `_ : . -` | | `401` | Your API key is missing or wrong | | `404` | There's no wallet with this ID on your account | # Get a wallet's deposits Source: https://docs.minisend.xyz/api-reference/wallet-api/get-wallet-deposits Paginated deposit history for one wallet, newest first. Lists every deposit one wallet has received. It's the way to check yourself instead of waiting for the [`wallet.deposit.received` webhook](/wallet-api/webhooks), and how you catch up if your server was down for longer than we keep retrying. ## Endpoint ```text theme={null} GET https://merchant.minisend.xyz/api/v1/wallets/{walletId}/deposits ``` ```text theme={null} Authorization: Bearer wsk_live_your_key_here ``` ## Query parameters **limit** `number` (default: 20) How many to return at once, up to 100. **offset** `number` (default: 0) How many to skip. Use it to get the next page. ## Example ```bash theme={null} curl "https://merchant.minisend.xyz/api/v1/wallets/3f6b2e1a-.../deposits?limit=50" \ -H "Authorization: Bearer wsk_live_your_key_here" ``` ## Response (200) ```json theme={null} { "deposits": [ { "id": "7b2e1a3f-...", "tenant_id": "a7c9e2d0-...", "wallet_id": "3f6b2e1a-...", "wallet_ref": "user-9214", "address": "0xabc1230000000000000000000000000000dead", "chain": "MATIC", "token": "USDC", "amount": "10.500000", "tx_hash": "0x55a572efe1720250e442f38741477a4fc3f7f152e5cd208cc52f8222a1c2a13b", "from_address": "0x9f2c...", "state": "complete", "detected_at": "2026-08-07T09:12:03.000Z", "created_at": "2026-08-07T09:12:03.000Z", "settlement": null } ], "total": 3, "limit": 50, "offset": 0 } ``` Each deposit has the same fields as the [`wallet.deposit.received`](/wallet-api/webhooks) webhook, plus one more: **settlement** `object` Only there if you've set a [settlement network](/wallet-api/settlement) and this deposit needed moving because of it. Otherwise `null`, including when the deposit already arrived as USDC on your settlement network, so there was nothing to do. **settlement fields** **status** `string` *required* `queued`, `settling`, `delayed`, `settled`, `failed`, or `skipped_below_minimum`. See [Settlement](/wallet-api/settlement) for what each one means. **chain** `string` *required* Your settlement network when this deposit arrived. **amount** `string` What arrived on `chain`, once `settled`. Otherwise `null`. **tx\_hash** `string` The transaction ID that delivered the money on `chain`, once `settled`. **error** `string` A plain sentence for `failed`, `delayed`, or `skipped_below_minimum`. `null` for every other status. **funds\_location** `string` Only set when `status` is `failed`. See [Settlement](/wallet-api/settlement#if-a-settlement-fails). ## Errors | Status | Meaning | | - | - | | `401` | Your API key is missing or wrong | | `404` | We can't find this wallet, or it belongs to another account | # Get a withdrawal Source: https://docs.minisend.xyz/api-reference/wallet-api/get-withdrawal Check the state of a withdrawal or recovery you requested, by its id. Shows one withdrawal or recovery, using the `id` you got when you created it. ## Endpoint ```text theme={null} GET https://merchant.minisend.xyz/api/v1/withdrawals/{withdrawalId} ``` ```text theme={null} Authorization: Bearer wsk_live_your_key_here ``` Needs a key with `wallets:read`. It only looks in your account. An `id` that belongs to someone else returns `404`, so nobody can find out it exists. ## Example ```bash theme={null} curl https://merchant.minisend.xyz/api/v1/withdrawals/9f2c4e1a-... \ -H "Authorization: Bearer wsk_live_your_key_here" ``` ## Response (200) ```json theme={null} { "withdrawal": { "id": "9f2c4e1a-...", "state": "completed", "source": "master", "chain": "BASE", "token": "USDC", "amount": "50.000000", "destination_address": "0x9f2c000000000000000000000000000000dead", "tx_hash": "0x55a572efe1720250e442f38741477a4fc3f7f152e5cd208cc52f8222a1c2a13b", "created_at": "2026-09-28T09:00:00.000Z", "updated_at": "2026-09-28T09:00:12.000Z" } } ``` The same fields as [request a withdrawal](/api-reference/wallet-api/withdrawals). If it `failed`, the reason isn't here. You'll find it in your dashboard. ## Errors | Status | Meaning | | - | - | | `401` | Your API key is missing or wrong | | `404` | We can't find this `id`, or it belongs to another account | | `503` | We couldn't read it just now. Try again | # List all deposits Source: https://docs.minisend.xyz/api-reference/wallet-api/list-deposits Every deposit across every wallet on your account, newest first. Use it to check against your own records. Lists deposits across **every** wallet on your account, newest first. If your server was down for a while, use this to catch up in one go instead of checking each wallet. ## Endpoint ```text theme={null} GET https://merchant.minisend.xyz/api/v1/deposits ``` ```text theme={null} Authorization: Bearer wsk_live_your_key_here ``` ## Query parameters **wallet\_id** `string` Only show deposits for one wallet, using our `id` for it. To use your own `walletRef` instead, look up the `id` first with [get by reference](/api-reference/wallet-api/get-wallet-by-ref). **limit** `number` (default: 20) How many to return at once, up to 100. **offset** `number` (default: 0) How many to skip. Use it to get the next page. ## Example ```bash theme={null} curl "https://merchant.minisend.xyz/api/v1/deposits?limit=50" \ -H "Authorization: Bearer wsk_live_your_key_here" ``` ## Response (200) The same as [get a wallet's deposits](/api-reference/wallet-api/get-wallet-deposits), but covering all your wallets. ## Errors | Status | Meaning | | - | - | | `400` | `wallet_id` isn't a valid wallet `id` | | `401` | Your API key is missing or wrong | # List wallets Source: https://docs.minisend.xyz/api-reference/wallet-api/list-wallets Paginated list of every wallet you've created, newest first. Lists your wallets, newest first. ## Endpoint ```text theme={null} GET https://merchant.minisend.xyz/api/v1/wallets ``` ```text theme={null} Authorization: Bearer wsk_live_your_key_here ``` ## Query parameters **limit** `number` (default: 20) How many to return at once, up to 100. **offset** `number` (default: 0) How many to skip. Use it to get the next page. ## Example ```bash theme={null} curl "https://merchant.minisend.xyz/api/v1/wallets?limit=50" \ -H "Authorization: Bearer wsk_live_your_key_here" ``` ## Response (200) ```json theme={null} { "wallets": [ { "id": "3f6b2e1a-...", "tenant_id": "a7c9e2d0-...", "master_wallet_id": "d4f81b3c-...", "wallet_ref": "user-9214", "address": "0xabc1230000000000000000000000000000dead", "chain": "BASE", "chains": ["BASE", "MATIC", "ARB", "OP", "ETH", "AVAX", "ARC"], "solana_address": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU", "status": "active", "mode": "live", "created_at": "2026-07-29T09:00:00.000Z" } ], "total": 41, "limit": 50, "offset": 0 } ``` **wallets** `array` *required* Full wallet objects, same shape as [create wallet](/api-reference/wallet-api/create-wallet). **total** `number` *required* How many wallets you have in total. Use it with `limit` and `offset` to page through them. **limit** `number` *required* The page size we actually used, which may differ from what you asked for. Anything over 100 becomes `100`, and a missing or unreadable value becomes `20`. **offset** `number` *required* The offset we actually used. A negative or unreadable value becomes `0`. # Recover a stray token Source: https://docs.minisend.xyz/api-reference/wallet-api/recover Move out a token that landed on one of your addresses but isn't USDC or USDT. Sends a coin we don't support from one of your addresses to any external address you choose. Use it when something other than USDC or USDT lands on an address. We don't handle those automatically, so it stays there until you move it. > [!WARNING] > > Call this from your server only, never from a browser or app, so your API key stays secret. The whole balance of that coin is sent. You can't send part of it, because we don't know what the coin is worth. Recovery isn't supported on Solana. ## Endpoint ```text theme={null} POST https://merchant.minisend.xyz/api/v1/recover ``` ```text theme={null} Authorization: Bearer wsk_live_your_key_here ``` The key needs the `withdraw` permission, the same as [withdrawals](/api-reference/wallet-api/withdrawals), because this also sends money out. ## Body **source** `string` *required* `"master"` to recover from your master wallet, or the `walletRef` of the address to recover from. **chain** `string` *required* The network the coin is on. Any network your wallets work on except Solana. **token\_address** `string` *required* The coin's contract address (its ID on the blockchain). If it's the real USDC or USDT on that network, we refuse it. Use a [withdrawal](/api-reference/wallet-api/withdrawals) for those instead. **destination\_address** `string` *required* Where to send the coin. It can't be one of your own addresses. ## Example ```bash theme={null} curl -X POST https://merchant.minisend.xyz/api/v1/recover \ -H "Authorization: Bearer wsk_live_your_key_here" \ -H "Content-Type: application/json" \ -d '{ "source": "user-9214", "chain": "BASE", "token_address": "0x1234000000000000000000000000000000abcd", "destination_address": "0x9f2c000000000000000000000000000000dead" }' ``` ## Response (202) ```json theme={null} { "recovery": { "id": "7a1c2e3f-...", "state": "queued", "source": "user-9214", "chain": "BASE", "token": "0x1234000000000000000000000000000000abcd", "amount": "25.000000", "destination_address": "0x9f2c000000000000000000000000000000dead", "tx_hash": null, "created_at": "2026-09-28T09:00:00.000Z", "updated_at": "2026-09-28T09:00:00.000Z" } } ``` It works just like a [withdrawal](/api-reference/wallet-api/withdrawals): you get a `202`, and the `state` goes from `queued` to `sending`, then `completed` or `failed`. Follow it with [get a withdrawal](/api-reference/wallet-api/get-withdrawal) or the [`wallet.withdrawal.completed`](/wallet-api/webhooks) webhook. ## Errors | Status | Meaning | | - | - | | `400` | Something isn't right in the request, `token_address` is the real USDC or USDT on that network, the address is one of your own, or `chain` is `SOL` | | `401` | Your API key is missing or wrong | | `403` | Your key doesn't have the `withdraw` permission, or your account is switched off | | `404` | You don't have a wallet on that network, or there's no address with that `walletRef` | | `503` | We couldn't start the recovery just now. Try again | # Settlement chain Source: https://docs.minisend.xyz/api-reference/wallet-api/settlement Read and set the chain every new deposit settles to, as USDC, at your user's own address. See [Settlement](/wallet-api/settlement) for what this does. This endpoint shows and changes the one network your deposits are gathered on. ## Endpoint ```text theme={null} GET https://merchant.minisend.xyz/api/v1/settlement PUT https://merchant.minisend.xyz/api/v1/settlement ``` ```text theme={null} Authorization: Bearer wsk_live_your_key_here ``` To read it, your key needs `wallets:read`. To change it, `wallets:write`. ## Reading your setting ```bash theme={null} curl https://merchant.minisend.xyz/api/v1/settlement \ -H "Authorization: Bearer wsk_live_your_key_here" ``` ```json theme={null} { "settlement": { "chain": "MATIC", "chains": ["BASE", "MATIC", "ARB", "OP", "ETH", "AVAX", "ARC"], "available": true, "applies_to": "new_deposits" } } ``` **chain** `string` Your settlement network, or `null` if you haven't set one, which means settlement is off. **chains** `array` *required* The networks you can choose from on your plan. **available** `boolean` *required* Whether settlement is available for your account. While `false`, a `PUT` returns `409`. **applies\_to** `string` *required* Always `"new_deposits"`. Changing `chain` never redirects a settlement that's already on its way. ## Changing your setting **chain** `string` *required* One of the networks in `chains`, or `null` to turn settlement off. ```bash theme={null} curl -X PUT https://merchant.minisend.xyz/api/v1/settlement \ -H "Authorization: Bearer wsk_live_your_key_here" \ -H "Content-Type: application/json" \ -d '{"chain": "MATIC"}' ``` You get back the same fields as the `GET` above, under `settlement`. Send `{"chain": null}` to turn it off. > [!NOTE] > > On the Free plan, the only settlement network is Base. ## Errors | Status | Meaning | | - | - | | `400` | `chain` is missing, or isn't one of the networks in `chains` | | `401` | Your API key is missing or wrong | | `409` | Settlement isn't available for your account | | `503` | We couldn't read or save your setting just now. Try again | # Auto-sweep settings Source: https://docs.minisend.xyz/api-reference/wallet-api/sweep-config Read and set the balance at which an address's funds move into your master wallet automatically. Auto-sweep moves the money from each of your users' addresses into your master wallet on the same network, once it reaches an amount you choose (the minimum). This endpoint shows and changes that minimum, for each network and coin. Each network also has its own on/off switch, in **Dashboard → Wallets → Settings → Auto-sweep**. The `auto_sweep` field here combines the two, and sweeping only happens when both are on. If you switch a network off in the dashboard, nothing is swept there, whatever you set here. ## Endpoint ```text theme={null} GET https://merchant.minisend.xyz/api/v1/sweep-config PATCH https://merchant.minisend.xyz/api/v1/sweep-config ``` ```text theme={null} Authorization: Bearer wsk_live_your_key_here ``` To read it, your key needs `wallets:read`. To change it, `wallets:write`. ## Reading your configuration ```bash theme={null} curl https://merchant.minisend.xyz/api/v1/sweep-config \ -H "Authorization: Bearer wsk_live_your_key_here" ``` ```json theme={null} { "sweep_config": [ { "chain": "BASE", "token": "USDC", "auto_sweep": true, "auto_sweep_configured": true, "chain_auto_sweep": true, "configured_min": null, "effective_min": 1, "default_min": 1, "minimum_allowed": 0.1 }, { "chain": "BASE", "token": "USDT", "auto_sweep": true, "auto_sweep_configured": true, "chain_auto_sweep": true, "configured_min": null, "effective_min": 1, "default_min": 1, "minimum_allowed": 0.1 } ] } ``` There's one entry for each coin, on every network where you have a master wallet. On a paid plan that includes `SOL`: money at your users' Solana addresses is swept into your Solana master wallet. **auto\_sweep** `boolean` *required* Whether this network and coin will actually be swept. Only `true` when `chain_auto_sweep` and `auto_sweep_configured` are both `true`. **auto\_sweep\_configured** `boolean` *required* What you've set for this coin, by itself. **chain\_auto\_sweep** `boolean` *required* The network's switch in your dashboard. You can't change it here. Use **Dashboard → Wallets → Settings**. **configured\_min** `number` The minimum you set, in the coin. `null` if you haven't set one, in which case `default_min` is used. **effective\_min** `number` *required* The minimum actually in use: your `configured_min`, or `default_min` if you haven't set one, and never lower than `minimum_allowed`. **default\_min** `number` *required* Used when you haven't set a minimum. A few cents on Base and the other cheap networks. Higher on Ethereum, where moving small amounts can cost more than they're worth. **minimum\_allowed** `number` *required* The lowest minimum you can set on this network. If you ask for less, we use this instead of refusing. ## Changing your configuration **chain** `string` *required* The network to change. You need a master wallet on it already. **token** `string` *required* `USDC` or `USDT`. **min\_amount** `number` The minimum, in the coin. If it's below `minimum_allowed` for the network, we raise it to that instead of refusing. Leave it out to keep your current setting. **auto\_sweep** `boolean` Turn sweeping on or off for this coin. Leave it out to keep your current setting. You need to send at least one of `min_amount` or `auto_sweep`. ```bash theme={null} curl -X PATCH https://merchant.minisend.xyz/api/v1/sweep-config \ -H "Authorization: Bearer wsk_live_your_key_here" \ -H "Content-Type: application/json" \ -d '{"chain": "MATIC", "token": "USDC", "min_amount": 5}' ``` You get back one entry like those above, under `sweep_config`. ## Errors | Status | Meaning | | - | - | | `400` | `chain` or `token` is missing or wrong, or there's nothing to change | | `401` | Your API key is missing or wrong | | `404` | You don't have a master wallet on that network. Switch it on first | | `503` | We couldn't read or save your settings just now. Try again | # Send a transfer Source: https://docs.minisend.xyz/api-reference/wallet-api/transfers Move USDC or USDT from one of your users' addresses to another of yours, on one chain. Moves money from one of your users' addresses to another user's address on your account. Use it when your users pay each other, split a bill, or settle up inside your product. > [!WARNING] > > Call this from your server only, never from a browser or app, so your API key stays secret. A transfer is a normal blockchain payment between two addresses you created, sent when you ask for it. To send money to an address outside your account, use a [withdrawal](/api-reference/wallet-api/withdrawals) instead. ## Endpoint ```text theme={null} POST https://merchant.minisend.xyz/api/v1/transfers ``` ```text theme={null} Authorization: Bearer wsk_live_your_key_here ``` Transfers are switched on per account, and they start off. [Contact us](mailto:info@minisend.xyz) to turn them on. Once they're on, any of your API keys can send them. ## Body **from** `string` *required* The `walletRef` of the user paying. **to** `string` *required* The `walletRef` of the user being paid. It has to be a different address from `from`. **chain** `string` *required* The network to send on. Both addresses must support it. Transfers stay on one network and aren't supported on Solana. To consolidate across networks, use [settlement](/wallet-api/settlement). **token** `string` *required* `USDC` or `USDT`. **amount** `number` *required* A positive amount of the coin, with up to 6 decimal places. The smallest transfer is 0.1 on most networks, 0.5 on Avalanche, and 20 on Ethereum. **idempotency\_key** `string` Any text unique to this transfer. If you send the same key with the same request again, you get the original transfer back instead of a second one. Sending it with a different `from`, `to`, `chain`, `token`, or `amount` is refused with `409`. Transfers and withdrawals share keys, so a key you've used for a withdrawal can't be used for a transfer. ## Example ```bash theme={null} curl -X POST https://merchant.minisend.xyz/api/v1/transfers \ -H "Authorization: Bearer wsk_live_your_key_here" \ -H "Content-Type: application/json" \ -d '{ "from": "user-42", "to": "user-7", "chain": "BASE", "token": "USDC", "amount": 12.5, "idempotency_key": "split-8841" }' ``` ## Response (202) ```json theme={null} { "transfer": { "id": "8f21c3d0-...", "state": "queued", "from": "user-42", "to": "user-7", "chain": "BASE", "token": "USDC", "amount": "12.500000", "tx_hash": null, "created_at": "2026-10-01T09:00:00.000Z", "updated_at": "2026-10-01T09:00:00.000Z" } } ``` `202` means we've accepted the transfer and it goes out shortly. Check [get a transfer](#getting-one-transfer) or wait for [`wallet.transfer.completed`](/wallet-api/webhooks#wallet-transfer-completed-and-wallet-transfer-failed). If you send an `idempotency_key` you've used before, you get `200` with the original transfer. **state** `string` *required* `queued`, `sending`, `completed`, `failed`, or `under_review`. `failed` means nothing moved, and the money is still at the `from` address. `under_review` means the outcome isn't confirmed. Treat it as neither completed nor failed. **tx\_hash** `string` The blockchain transaction ID, once the transfer completes. `null` until then, and when `failed`. > [!NOTE] > > The receiving address doesn't get a `wallet.deposit.received` for a transfer. Credit the person receiving it when you get `wallet.transfer.completed`, so the same money is never counted twice. ## Errors | Status | Meaning | | - | - | | `400` | Something isn't right: the request fields, an amount below the network's minimum, an address that doesn't work on `chain`, or `from` doesn't have enough of `token` there. Money already set aside for transfers or withdrawals still in progress counts as spent | | `403` | Transfers aren't enabled for your account | | `404` | There's no address with the `walletRef` in `from` or `to` | | `409` | One of the addresses is frozen, the `idempotency_key` was used for a different request, or transfers aren't available yet | ## Listing your transfers ```text theme={null} GET https://merchant.minisend.xyz/api/v1/transfers ``` Needs a key with `wallets:read`. Newest first. **limit** `number` (default: 20) How many to return at once, up to 100. **offset** `number` (default: 0) How many to skip. Use it to get the next page. ```json theme={null} { "transfers": [ { "id": "8f21c3d0-...", "state": "completed", "from": "user-42", "to": "user-7", "chain": "BASE", "token": "USDC", "amount": "12.500000", "tx_hash": "0x9b3e51c7a2d84f06e1b9c3a7d5f2e8b4c6a0d1f3e5b7c9a2d4f6e8b0c1a3d5f7", "created_at": "2026-10-01T09:00:00.000Z", "updated_at": "2026-10-01T09:00:41.000Z" } ], "total": 1, "limit": 20, "offset": 0 } ``` ## Getting one transfer ```text theme={null} GET https://merchant.minisend.xyz/api/v1/transfers/{transferId} ``` Needs a key with `wallets:read`. Returns `{ "transfer": { ... } }` with the same fields as above, or `404` if the `id` isn't yours. # Request a withdrawal Source: https://docs.minisend.xyz/api-reference/wallet-api/withdrawals Move a balance out to any external address, on any network your wallets work on, Solana included. Sends money from your master wallet, or from one of your users' addresses, to an address outside Minisend. > [!WARNING] > > Call this from your server only, never from a browser or app, so your API key stays secret. You name the address in each request. There's no list of addresses to approve first, so your users can withdraw to their own wallets through your product. The one thing we refuse is an address that belongs to your own account: use a [transfer](/api-reference/wallet-api/transfers) to move money between your users. > [!WARNING] > > Because any address is allowed, a key with the `withdraw` permission can send your balance anywhere. Turn that permission on only for the keys that need it, keep them on your server, and revoke a key straight away if you think it's been exposed. ## Endpoint ```text theme={null} POST https://merchant.minisend.xyz/api/v1/withdrawals ``` ```text theme={null} Authorization: Bearer wsk_live_your_key_here ``` The key needs the `withdraw` permission (scope). It's off on every key to start with, including older keys, so turn it on only for a key that should be able to send money out. ## Body **source** `string` *required* `"master"` to withdraw from your master wallet, or the `walletRef` of the address to withdraw from. **chain** `string` *required* The network to send on: `BASE`, `MATIC`, `ARB`, `OP`, `ETH`, `AVAX`, `ARC`, or `SOL` for Solana. **token** `string` *required* `USDC` or `USDT`. **amount** `number` *required* A positive amount of the coin. If it has more decimal places than the coin allows, we refuse it rather than round it, because rounding could send more than you meant to. **destination\_address** `string` *required* The address to send to. It has to be an address on the network in `chain`: a `0x` address everywhere except Solana, and a Solana address on `SOL`. It can't be one of your own addresses. **idempotency\_key** `string` Any text unique to this withdrawal. If you send the same key with the same request again, you get the original withdrawal back instead of a second one. Sending it with a different `source`, `chain`, `token`, `amount`, or `destination_address` is refused with `409`. ## Example ```bash theme={null} curl -X POST https://merchant.minisend.xyz/api/v1/withdrawals \ -H "Authorization: Bearer wsk_live_your_key_here" \ -H "Content-Type: application/json" \ -d '{ "source": "master", "chain": "BASE", "token": "USDC", "amount": 50, "destination_address": "0x9f2c000000000000000000000000000000dead" }' ``` ## Minimum amounts | Network | Smallest withdrawal | | - | - | | Base, Polygon, Arbitrum, Optimism, Arc | 0.1 | | Avalanche | 0.5 | | Solana | 0.5 | | Ethereum | 20 | ## Withdrawing on Solana On Solana you send from the wallet's `solana_address` (or your Solana master wallet), so pass `chain: "SOL"`. A few things work differently there: * **Send to a wallet address, not a token account.** On Solana, each wallet holds a coin in a separate account linked to it. If you send to one of those token accounts directly instead of the wallet it belongs to, the money can be lost, so we refuse it with a `400`. Ask your user for their main wallet address. * **Keep the address exactly as it is.** Solana addresses are case-sensitive. Changing a letter from upper to lower case gives you a different address that nobody owns. * **The first payment to a new address costs a little more.** When an address has never held that coin, the network charges a one-time fee of about \$0.30 to set it up. We pass it on at cost. That's why the smallest Solana withdrawal is 0.5. ## Response (202) ```json theme={null} { "withdrawal": { "id": "9f2c4e1a-...", "state": "queued", "source": "master", "chain": "BASE", "token": "USDC", "amount": "50.000000", "destination_address": "0x9f2c000000000000000000000000000000dead", "tx_hash": null, "created_at": "2026-09-28T09:00:00.000Z", "updated_at": "2026-09-28T09:00:00.000Z" } } ``` You get `202`, not `200`, because we've accepted the withdrawal and send it shortly after. Check [get a withdrawal](/api-reference/wallet-api/get-withdrawal) or wait for [`wallet.withdrawal.completed`](/wallet-api/webhooks) to see how it went. If you send an `idempotency_key` you've used before, you get `200` with the original withdrawal. **state** `string` *required* `queued`, `sending`, `completed`, or `failed`. **source** `string` What you sent: `"master"`, or the `walletRef` the money came from. **tx\_hash** `string` The blockchain transaction ID, once sent. `null` until then, and when `failed`. ## Listing your withdrawals ```text theme={null} GET https://merchant.minisend.xyz/api/v1/withdrawals ``` Needs a key with `wallets:read`. **limit** `number` (default: 20) How many to return at once, up to 100. **offset** `number` (default: 0) How many to skip. Use it to get the next page. ```json theme={null} { "withdrawals": [ { "id": "9f2c4e1a-...", "state": "completed", "...": "..." } ], "total": 12, "limit": 20, "offset": 0 } ``` Each one has the same fields as the response above. ## Errors | Status | Meaning | | - | - | | `400` | Something isn't right: the request fields, an address that doesn't fit the network, an amount below the network's minimum, more than you have available, the address is one of your own, or (on Solana) the address is a token account | | `401` | Your API key is missing or wrong | | `403` | Your key doesn't have the `withdraw` permission, or your account is switched off | | `404` | You don't have a wallet on that network, or there's no address with that `walletRef` | | `409` | The `idempotency_key` was already used for a different request, or this withdrawal was already sent | | `429` | Too many requests. Wait a moment and try again | | `503` | We couldn't check your balance, check a Solana address, or send the withdrawal just now. Try again | # Business verification Source: https://docs.minisend.xyz/business-verification Verify your business at merchant.minisend.xyz/verify with your incorporation documents, director details, and proof of address. Reviews take a few hours. Every Minisend account starts with a quick business check. It confirms your business is registered, who runs it, and where it operates. Our payout partners are required to do this by their regulators, and it keeps the network safe for everyone on it. It takes about ten minutes to fill in, and we review it within **a few hours**. > [card] [Start verification](https://merchant.minisend.xyz/verify) > > Sign in with email or Google at merchant.minisend.xyz/verify ## How it works **1. Sign in and fill in the form** Go to [merchant.minisend.xyz/verify](https://merchant.minisend.xyz/verify) and sign in with email or Google. Add your business details, upload your documents, and add each director and owner. Address fields suggest real places as you type. **2. Submit** You'll see a confirmation straight away. We review everything within a few hours. **3. Get your approval email** Once approved, we email the address you signed in with. It has a link to sign in to your dashboard, where you set up your payout details and start accepting payments. > [!NOTE] > > Your dashboard opens once your business is approved. Sign in with the same email or Google account you used for the form. ## What you'll need Upload each document as a PDF, JPG, or PNG, up to 4 MB. ### About the business * **Registered business name**, country, and whether it's a company or a sole proprietorship * **Registration number** and **tax number** (KRA PIN, FIRS TIN, GRA TIN, or URA TIN, depending on your country) * **Business address** ### Business documents * **Certificate of incorporation**, or the equivalent business registration * **Memorandum and articles of association**, or the operating agreement for an LLC (companies only) * **Proof of business address**: a utility bill, bank statement, lease, or government letter in the company's name, dated within the last 3 months * **Shareholder register**, if more than one person owns part of the company * **Tax registration certificate** and **business license** are optional. Add a license if your activity needs one, such as lending or financial services ### Directors and owners For each director, and for anyone who owns **10% or more** of the business: * **Full legal name, date of birth, nationality, and role** * **Ownership percentage**, if they own part of the business * **Residential address** * **Government-issued photo ID**: passport, national ID, or driving licence, with all four corners visible * **Proof of residential address**: a utility bill, bank statement, or lease in their own name, dated within the last 3 months > [!TIP] > > If your business works from a virtual office or coworking space, upload the agreement that shows your registered address there as the proof of business address. ## If we need something else Sometimes a document is unclear or out of date. When that happens we email you with a short note on what to change. Open [merchant.minisend.xyz/verify](https://merchant.minisend.xyz/verify) again and your form will be filled in as you left it, with our note at the top. Update what's needed and submit again. ## FAQ > [accordion] What countries can be verified? > > Businesses registered in Kenya, Nigeria, Ghana, and Uganda. If you're incorporated elsewhere, [contact us](https://t.me/minisendapp) before you start. > [accordion] Can I start with a sole proprietorship? > > Yes. Choose **Sole proprietorship** as the business type, upload your business name registration or single business permit, and add yourself as the owner with your ID and proof of address. > [accordion] How recent does proof of address need to be? > > Issued within the **last 3 months**. > [accordion] What if I own part of the business but I'm not a director? > > If you own 10% or more, add yourself as a person with the role **Shareholder** and your ownership percentage. > [accordion] My dashboard says my business is under review. What do I do? > > Click **Verification** on the banner, or open [merchant.minisend.xyz/verify](https://merchant.minisend.xyz/verify), and submit your documents there. Payment links, the API, and payouts open once we approve them. > [accordion] Will Minisend keep my documents? > > Documents are stored encrypted, used only for verification and ongoing compliance monitoring, and never shared outside Minisend and our settlement partners. We delete them on request if you close your account. Questions? [Contact us on Telegram](https://t.me/minisendapp). # API keys Source: https://docs.minisend.xyz/dashboard/api-keys Generate, copy, and revoke API keys to authenticate checkout session requests from your backend. Keys use the ms_live_ prefix and are shown only once. An API key is how your server proves it's you when it talks to Minisend, for example to create checkout sessions. Manage them under **Dashboard → API Keys**. > [!WARNING] > > Keep keys on your server, in environment variables. Never put them in website code, a mobile app, or a public code repository. ## What a key looks like ```text theme={null} ms_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ``` The list only shows the start of each key (like `ms_live_abc123...`). We show the full key **once**, when you create it, and we don't keep a readable copy. ## Create a key **1. Open API Keys** Click **API Keys** in the sidebar. **2. Click New Key** It's in the top right. **3. Give it a name** Something like `Production` or `Staging`. If you leave it blank, it's called `Default`. **4. Copy it now** The key appears in a banner. Copy it and store it somewhere safe. Once you close the banner, you can't see it again and would need to create a new key. > [!NOTE] > > You can create several keys, for example one for each environment. Revoking one doesn't affect the others. ## Use it in requests ```text theme={null} Authorization: Bearer ms_live_{your_key} ``` ```bash theme={null} curl -X POST https://merchant.minisend.xyz/api/merchant/checkout \ -H "Authorization: Bearer ms_live_your_key_here" \ -H "Content-Type: application/json" \ -d '{ "amount": 25.00, "description": "Order #123", "external_id": "order_123" }' ``` ## Revoke a key Hover over the row and click the trash icon. The key stops working straight away, and any request using it gets a `401`. > [!WARNING] > > You can't undo revoking a key. If your live server uses it, switch the server to a new key first. ## Good habits * Replace your keys now and then, and straight away if one might have been seen by someone else. * Use a different key for each environment. * Store the key in an environment variable on your server (like `MINISEND_API_KEY`), not written into your code. * If a key ends up in a public code repository by accident, revoke it and create a new one. # Dashboard overview Source: https://docs.minisend.xyz/dashboard/overview Your wallet balance, USDC volume, collections split, revenue chart, and recent transactions on one screen. The landing page when you sign in at [merchant.minisend.xyz/dashboard](https://merchant.minisend.xyz/dashboard). Everything updates automatically. ## Wallet card Your business wallet holds the USDC from M-Pesa collections and anything you top up yourself. The card shows your live balance and two actions: * **Top up**: send USDC on Base to the address shown. * **Withdraw**: send to an M-Pesa number, a till, a paybill, a Nigerian bank account, or an external wallet. See [Wallet](/dashboard/wallet) for the full flow. ## Stats cards These figures cover activity across checkout, [off-ramp](/offramp/overview), and [onramp](/onramp/overview) together, if you use more than one. | Metric | What it shows | | - | - | | **Volume** | The total value of **completed** payments only, in USDC (USDC and USDT added together) | | **Transactions** | How many sessions and orders were created, whatever their status | | **Success rate** | Completed payments out of all completed and failed ones | | **Fees** | All the platform fees you've paid on checkout, in USDC | Collections are split by how they were paid, so you can see how much came in through crypto and how much through M-Pesa. > [!NOTE] > > **Volume only counts completed payments.** A pending, failed, or expired payment never adds to it, however big. Volume and fees are shown in USDC, with USDT counted as its USDC value. Fee totals in local currency only include checkout, since off-ramp and onramp orders can each be in a different currency. ## Revenue chart A chart of your daily volume over the last 7 days. Hover to see the exact amount. ## Payment link card If you've set a slug in **Settings**, your full URL appears here. **Copy Link** copies it to the clipboard, and **Preview** opens your customer-facing page. ```text theme={null} https://merchant.minisend.xyz/pay/your-slug ``` ## Recent transactions Your last six payments. Each row shows the amount, your reference (your `external_id`, or a short ID), the date, and the status. Click a row to see the details. **View all** opens [Transactions](/dashboard/transactions). ## Status badges | Badge | What it means | | - | - | | **Pending** | Waiting for your customer to pay | | **Received** | We've seen the payment and started on your payout | | **Settling** | Converting the money and sending your payout | | **Completed** | You've been paid | | **Failed** | The payment arrived but we couldn't finish paying you out. Get in touch and we'll look into it | | **Expired** | Nothing was paid within 30 minutes | > [!TIP] > > Mostly **Completed** is what healthy looks like. If **Failed** starts showing up regularly, your payout details in **Settings** are the first thing worth checking. ## Explore > [card] [Wallet](/dashboard/wallet) > > Balance, top-ups, and withdrawals to M-Pesa, bank, or an external wallet. > [card] [Payroll](/dashboard/payroll) > > Pay your whole team to M-Pesa in one run. > [card] [Transactions](/dashboard/transactions) > > Full history with search, filters, and receipts. > [card] [Settings](/dashboard/settings) > > Business info, payout, slug. # Payroll Source: https://docs.minisend.xyz/dashboard/payroll Pay your whole team to M-Pesa in one run, funded from your wallet balance. Import employees by CSV, review the total, and track every payment. Pay salaries to M-Pesa in one run, funded from your [wallet](/dashboard/wallet) balance. **Dashboard → Payroll**. ## Create a run **1. New pay run** Click **New pay run**. Optionally, add the paying company's name. **2. Add employees** Add employees individually or import a CSV with name, M-Pesa number, and KES amount. Up to 5,000 payments per run, each KES 10 to 250,000. **3. Check it and pay for it** Review the count and total, then fund the run from your wallet balance. The rate is fixed at funding. **4. Everyone gets paid** Payments are sent automatically. Track each one on the run page. ## Run statuses | Status | Meaning | | - | - | | **Draft** | Being set up. Not funded | | **Awaiting funds** | Waiting for sufficient wallet balance | | **Funded** | Funded and about to start | | **Paying out** | Payments in progress | | **Completed** | All payments complete | | **Needs attention** | Some payments failed. Review and retry | | **Cancelled** | Stopped before funding | Each payment moves from **Queued** to **Sending**, **Paying**, and **Paid**, or **Failed**. ## Pricing Payroll has no fee. Amounts are converted at the rate fixed at funding. > [!NOTE] > > Failed payments remain listed and the run shows **Needs attention** until they're resolved. # Security Source: https://docs.minisend.xyz/dashboard/security Turn on two-factor authentication with an authenticator app, save your recovery codes, and keep access to your account. Manage two-factor authentication and recovery codes in **Dashboard → Settings → Security**. ## Two-factor authentication Two-factor authentication adds a six-digit code from an authenticator app to every sign-in. > [!NOTE] > > Two-factor is **required for owners and admins**. Members can turn it on but aren't required to. If it isn't set up, the dashboard prompts you at your next sign-in. ### Set it up **1. Scan the code** Open **Settings → Security** and scan the QR code with any authenticator app, or enter the key shown below it. **2. Confirm a code** Enter the six-digit code from your app. Two-factor is enabled only after this step succeeds. **3. Save your recovery codes** You receive ten single-use recovery codes. Store them separately from your phone. > [!WARNING] > > Recovery codes are shown once. Save them before you close the screen. ### Signing in afterwards After you sign in with email, enter a code from your app, or a recovery code if your phone isn't available. The dashboard shows how many recovery codes remain. ### Managing it From **Settings → Security** you can: * **Generate new recovery codes.** The previous set stops working immediately. * **Turn two-factor off.** This requires a current code. Owners and admins are prompted to set it up again. ## Losing access If you've lost both your phone and your recovery codes, [contact support](https://t.me/minisendapp). We verify your identity before restoring access. ## Keeping the rest of your account safe * Keep API keys in environment variables on your server, never in website code or a public code repository. See [API keys](/dashboard/api-keys). * Give teammates the lowest role that lets them do their job. **Member** is read-only. See [Team](/dashboard/team). * Check the signature on every webhook before acting on it. See [verification](/webhooks/verification). # Settings Source: https://docs.minisend.xyz/dashboard/settings Set your business name, payout currency and method, payment link slug, settlement mode, and destination chain, so Minisend knows exactly where to send your money. Fill these in before you start taking payments, so we know where to send your money. Find them at **Dashboard → Settings**, and click **Save Changes** when you're done. ## Business | Field | What it's for | | - | - | | **Business name** | Shown on your payment page | | **Email** | Where we send account emails | | **Website** | Optional. Shown on your payment page | ## Payout Your currency decides which payout methods you can choose. | Currency | Country | Methods | | - | - | - | | **KES** | Kenya | M-Pesa, Buy Goods, Paybill, Bank | | **NGN** | Nigeria | Bank | | **GHS** | Ghana | Mobile Money, Bank | | **UGX** | Uganda | Mobile Money, Bank | ### M-Pesa mobile (KES) Your phone number (like `0712345678`) and network (Safaricom). ### Buy Goods till (KES) Your till number. Payouts show up as customer payments on your till statement. ### Paybill (KES) Your paybill number and account number. You need both. ### Bank Transfer (KES, NGN, GHS, UGX) Your account number, bank code, and bank name. **Account Name** has to match the bank's records exactly. A name that doesn't match is the most common reason a payout fails. ### Mobile Money (GHS, UGX) Your phone number and network (MTN, Airtel, and so on). > [!NOTE] > > **Account Name** is required for all methods. It must match the name on your bank, M-Pesa, or mobile money account. ## Settlement mode Choose how you get paid by default: * **Local currency**: we convert each payment and send it to your M-Pesa, mobile money, or bank account. * **USDC**: we skip the conversion and keep the payment in your [wallet](/dashboard/wallet) as USDC. It costs less. This is the default for new payments. You can also change it for a single payment when you [create a checkout session](/payments/checkout-sessions#settlement-mode). Once a session is created, its setting is fixed, so changing this later won't affect payments already in progress. ## Destination chain If you keep USDC, choose which network your payments end up on: Base, Arbitrum, Avalanche, Optimism, Ethereum, or Polygon. Base needs nothing extra, since payments arrive there. For any other network, we move each payment across automatically, and a small fee for the move comes out of the amount. Switching networks only changes where future payments go, not USDC you already have. Your [wallet](/dashboard/wallet) shows a separate balance for every network you've been paid on. ## Payment link Choose a short, unique name (a slug) and you get a link to share: ```text theme={null} https://merchant.minisend.xyz/pay/your-slug ``` > [!NOTE] > > No two businesses can have the same slug. If yours is taken, try a slightly different one. ## Webhooks Webhooks have their own page at **Dashboard → Webhooks**: your URL, your secret, a test button, and every message we've sent you. See [Webhooks](/dashboard/webhooks) for how to set it up, and [webhook events](/webhooks/overview) for what we send. ## Security Two-factor authentication lives in the **Security** section of this page. It's required for owners and admins, so it's worth doing early. See [Security](/dashboard/security). ## Saving Click **Save Changes** (or **Create Account** if new). Required fields are marked with `*`. # Team Source: https://docs.minisend.xyz/dashboard/team Invite teammates to your dashboard by email, with owner, admin, and read-only member roles. Invite teammates to manage your account alongside you. **Dashboard → Team**. ## Roles | Role | Can do | | - | - | | **Owner** | Everything. The account that signed up; always exactly one, never invited | | **Admin** | Everything except owner-only actions: invite and remove teammates, manage API keys, edit settings | | **Member** | View only. Cannot edit settings, manage API keys, or invite or remove anyone | Owners and admins can invite; members cannot invite anyone, even other members. ## Invite a teammate **1. Enter their email and role** Choose **Admin** or **Member**. **2. Send** They receive an email with an accept link. Nothing changes on your account until they accept. **3. They accept** They sign in (or create an account) with the invited email address and land on your dashboard with the role you set. > [!NOTE] > > The link only works for the email address it was sent to. If someone forwards it, the person they forward it to can't use it. ## Managing the team You can change someone's role or remove them at any time. Removing someone takes away their access straight away. They keep their own account, but can no longer see yours. > [!WARNING] > > You can't demote or remove the owner. Ownership doesn't transfer from this page. # Transactions Source: https://docs.minisend.xyz/dashboard/transactions Browse your full Minisend payment history, filter by status, search by reference ID or amount, and inspect individual transaction details in the panel. Every checkout session, off-ramp order, and onramp order on your account, whether it worked, failed, expired, or is still going. Find it at **Dashboard → Transactions**. Even if you only use the [off-ramp](/offramp/overview) or [onramp](/onramp/overview) API and never use checkout, your activity still shows up here. ## Type filter * **All** * **Checkout** * **Off-ramp** * **Onramp** Off-ramp and onramp rows have a small label so you can tell them apart from checkout at a glance. Checkout rows, which most businesses have the most of, have no label. ## Search Searches the current page by: * `external_id` (your reference) * Our transaction ID * The amount in USDC Capital letters don't matter. ## Status filters * **All** * **Pending** * **Received** * **Settling** * **Completed** * **Failed** * **Expired** Changing the filter takes you back to page 1. **Refresh** loads the latest data. ## Columns | Column | What's in it | | - | - | | **Amount** | The amount in USDC, with the local currency underneath once completed | | **Reference** | Your `external_id`, or a short transaction ID | | **Method** | How your customer paid: a network and coin (like USDC on Base or USDT on Polygon), or **M-Pesa** | | **Type** | Checkout, off-ramp, or onramp (checkout has no label) | | **Status** | Where it is now | | **Date** | When it was created | ## Statuses | Status | What it means | | - | - | | `pending` | Waiting for your customer to pay. Expires after 30 minutes | | `deposit_received` | We've seen the payment and started on your payout | | `settling` | Converting the money and sending your payout | | `completed` | You've been paid | | `failed` | The payment arrived but we couldn't finish paying you out. Contact support | | `expired` | Nothing was paid within 30 minutes | > [!WARNING] > > `failed` doesn't mean the money is lost. Send the transaction ID to support. ## Details panel Click any row to see: * **Amount** in USDC, plus local currency once completed * **Status** * **Method**: the network and coin, or M-Pesa * **Reference**: your `external_id` or transaction ID * **Transaction ID**: our full ID for it * **Created**, **Completed**, and **Duration** * **Receipt**: the payout reference, with a **Download receipt** button for a PDF you can share * **Timeline**: each step, in order > [!TIP] > > Use the receipt to match payments against your M-Pesa or bank statement. You can share the PDF with your customer, and they can also download it themselves from the payment page. ## Pages 20 rows per page. The counter shows something like `1–20 of 143`. # Wallet Source: https://docs.minisend.xyz/dashboard/wallet Your business USDC balance: top up on Base, then withdraw to M-Pesa, a till, a paybill, a Nigerian bank account, or an external wallet. Your business wallet holds USDC until you decide to move it. It sits on the dashboard [overview](/dashboard/overview), and it's where M-Pesa collections land, where USDC-settled checkout payments stay, and where anything you top up yourself goes. > [!NOTE] > > This is your business balance. To issue addresses to your users, see [Wallets](/dashboard/wallets). ## Balance The card shows your USDC balance on Base, where M-Pesa collections arrive and withdrawals are sent from. Balances on other networks are shown separately. Balances update automatically. ## Top up Send USDC on **Base** to the address shown on the card. It's credited when the transfer confirms. > [!WARNING] > > Top up with USDC only. Other tokens aren't credited. ## Withdraw Click **Withdraw** and choose a currency. Before you confirm, you see the amount received, the amount debited, and the rate. | Currency | Goes to | How long | | - | - | - | | **KES** | An M-Pesa number, a till (Buy Goods), or a paybill | About ten seconds | | **NGN** | A Nigerian bank account | Usually a minute or two | | **USDC** | A wallet address outside Minisend, on any of six networks | Seconds on Base, minutes elsewhere | Select a recent recipient to fill in their details. ### KES: M-Pesa, till, and paybill Enter the KES amount and destination. The recipient receives the amount you enter. The fee is added to the amount debited. ### NGN: bank transfer Enter the amount, the ten-digit account number, and the bank. The account's registered name is shown before you confirm. The rate depends on the amount. ### USDC: external wallet Send USDC to an address on Base, Arbitrum, Avalanche, Optimism, Ethereum, or Polygon. Base arrives in seconds. Other networks take a few minutes. > [!NOTE] > > You can't withdraw to your own deposit address. To keep USDC on another network, change your [destination network](/dashboard/settings#destination-chain). ## Receipts M-Pesa and bank withdrawals have a downloadable PDF receipt. USDC withdrawals link to the on-chain transaction. ## What the wallet is for * **M-Pesa collections** wait here as USDC instead of being paid straight out, so you choose when to cash out. * [**Payroll**](/dashboard/payroll) runs are funded from this balance. * **Treasury**: hold USDC as a dollar balance and withdraw to local currency when the rate suits you. # Wallets Source: https://docs.minisend.xyz/dashboard/wallets Set up the Wallet API: activate chains, generate keys, issue addresses, and manage auto-sweep and withdrawals. **Dashboard → Wallets** is where you manage the [Wallet API](/wallet-api/overview): your master wallet (your business's main wallet, which your users' addresses sit under), the API keys your server uses, and all the addresses and deposits. > [!NOTE] > > Looking for your own USDC balance and withdrawals on your checkout address? That's [Wallet](/dashboard/wallet), the singular one. This page is about addresses you issue to your users. The page has five tabs. ## Overview Your master wallet, its address and balance, recent deposits, and a search box to find a deposit that never showed up. Three actions sit in the banner above the tabs: * **Withdraw**: send money out to any external address. Type or paste it in, and pick the network. * **Receive**: your master wallet's own address, shown once you're using the Wallet API. * **New address**: create an address for a user without calling the API. ## Addresses Every address you've created, newest first. Search by your own `walletRef` or by the address. On a paid plan, each one also shows its separate Solana address. ## Activity Everything that's happened across your wallets, newest first and grouped by day: deposits, transfers between your users, withdrawals, and auto-sweeps into your master wallet, plus networks switched on, addresses created, and keys created or cancelled. Use the buttons at the top to show only one kind. Click any deposit, transfer, withdrawal, or sweep to see the details: where the money came from and went, the network, the amount, each step with its time, and the transaction ID with a link to view it on the blockchain. If a deposit was moved to another network by settlement, you'll see that step and how much arrived. **Recent deposits** on the Overview tab opens the same details. Each row carries a status. **Received**, **Settled** or **Completed** means the money has arrived. **Settling** or **Sending** means it's on its way. **Under review** means we're still confirming the outcome. **Failed** or **Not settled** means it didn't go through, and the amount is still where it was. ## Developers Create a `wsk_live_` API key here. We only show the full key once, so copy it straight away. After that, you'll only see its first few characters. **Revoke** switches a key off straight away, and any request using it after that gets a `401`. There are no test keys, since the Wallet API doesn't have a test mode. ## Settings Everything that changes how the Wallet API works for your account: * **Chains**: switch a network on or off. Base comes with every plan. The others need a paid plan and show **Upgrade** until then. A network that already has an address on it can always be switched, even if your plan no longer includes it, so turning one off never needs an upgrade. * **Auto-sweep**: for each network, the amount at which money in your users' addresses is moved into your master wallet automatically. See [auto-sweep settings](/api-reference/wallet-api/sweep-config). * **Checkout deposit address**: your business's own address for customer checkout payments. It's separate from the Wallet API. It always accepts every network checkout supports, and there's nothing to switch. See [supported networks](/payments/supported-currencies#choosing-which-networks-you-accept). # Webhooks Source: https://docs.minisend.xyz/dashboard/webhooks Set your endpoint, copy your signing secret, send a test event, and replay any delivery that didn't land. **Dashboard → Webhooks** is where you tell us where your server is, and see every message we've sent it. If you'd rather your code was told about payments than have to keep checking, set this up first. For what the events contain and how to check a signature, see [Webhooks](/webhooks/overview). ## Endpoints Paste your HTTPS URL, something like `https://yourbusiness.com/webhooks/minisend`, and save. We start sending signed messages to it straight away. You can leave it blank if you'd rather check the [status endpoint](/api-reference/get-checkout) yourself. That works fine. It just means your code has to keep asking instead of being told. ### More than one product Running more than one product on this account? Click **Add endpoint** to add up to two more, three in total. Under each URL, pick the products it receives: **Checkout**, **Off-ramp**, **Onramp**, and **Wallet API**. Then save. * Anything no endpoint picks goes to endpoint 1, so you never lose events by narrowing one. * Endpoint 1 needs a URL while you have other endpoints, since it's where those leftover events go. * Two endpoints can't share a URL. * All of them use the one secret below. See [More than one endpoint](/webhooks/overview#more-than-one-endpoint) for how events are split. ## Secret We create your secret the first time you open this page and show it once, like an API key. Copy it then, and store it wherever your server keeps its settings. **Regenerate** replaces it. The old secret stops working straight away and every message after that uses the new one, so update your server at the same time. > [!TIP] > > Lost it? Regenerate a new one. Nobody can read an existing secret, not even you, which is also what keeps it safe. ## Send a test event Each endpoint has a **Send test event** button that sends a signed sample message to that URL whenever you like. Save your changes first. It's the quickest way to check your signature check works before a real payment depends on it. A test message is signed exactly like a real one, but it isn't added to the list below and we never retry it. ## Deliveries Every message we've tried to send you, to any of your endpoints, is listed here, newest first, with the event, how it went, and what your server replied. Open one to see the URL it went to. It's the first place to look when something didn't reach you. | What you see | What it means | | - | - | | **Delivered** | Your server replied with a `2xx` | | **Retrying** | A try failed and we'll try again soon | | **Failed** | We used all 8 tries, or the message got too old to send | We [try up to 8 times](/webhooks/overview#retries) over about 33 hours, so if your server is down briefly, it usually sorts itself out with nothing for you to do. ## Replay If a message failed and you've since fixed your server, **Replay** sends it again straight away, to the endpoint it was first sent to, instead of waiting for the next retry. It's exactly the same message, with the same `X-Minisend-Event-Id`, plus a fresh timestamp and signature so your time check still passes. Owners and admins can replay messages. > [!NOTE] > > After five consecutive failed messages to one endpoint, this page marks that endpoint as down. Each endpoint is checked separately. Fix your server, then replay what you missed instead of waiting for the remaining tries. # FAQ Source: https://docs.minisend.xyz/help/faq Common questions about accepting USDC and USDT, receiving local currency payouts, settlement speed, fees, payment link setup, and testing your integration. > [accordion] What stablecoins and currencies do you support? > > USDC and USDT on six networks. Payouts in KES, NGN, GHS, or UGX by M-Pesa, Buy Goods, Paybill, mobile money, or bank transfer. Configure your payout in **Settings**. > [accordion] What blockchains does Minisend support? > > Base, Ethereum, Polygon, Arbitrum, Optimism, and Avalanche, for both USDC and USDT. Payments on other networks aren't detected. See [supported networks](/payments/supported-currencies). > [accordion] How fast do I get paid? > > * **USDC on Base** is fastest. > * **USDC on other networks** adds a few minutes. > * **USDT** adds **30 to 50 seconds**. > > The payout then takes the usual time for M-Pesa, bank, or mobile money. `checkout.completed` is sent on completion. > [accordion] Do I need to know anything about crypto? > > No. Customers pay in stablecoins and you receive local currency in your bank or mobile money account. > [accordion] What if a customer's payment doesn't arrive? > > With no payment within **30 minutes**, the session expires and `checkout.expired` is sent. No fee is charged. > > > [!TIP] > > > > If a customer says they paid, ask for the transaction hash and the destination address, and send them to [support](https://t.me/minisendapp). > [accordion] What is an external\_id? > > An optional reference you set on a session, such as `order-4821`. It's included in every webhook for the session. > [accordion] What if a payout fails? > > The status changes to **Failed** and `checkout.failed` is sent. Send the `session_id` to [support](https://t.me/minisendapp). > > > [!WARNING] > > > > Your customer's money is not lost. We'll look into it and get back to you. > [accordion] Can I use Minisend without writing code? > > Yes. Set a slug in **Settings** and share your [payment link](/payments/payment-links): > > ```text theme={null} > https://merchant.minisend.xyz/pay/your-slug > ``` > [accordion] How do I test my integration? > > 1. Create a session through the API with `amount: 1.00`. > > 2. Open the `checkout_url`. > > 3. Pay from a real wallet. > > 4. Check your webhook receives `checkout.completed`. > > 5. Check the dashboard shows **Completed**. > > 6. Check the money reached your payout account. > > > [!NOTE] > > > > There's no test mode. Test with small real amounts. > [accordion] How do I get higher rate limits? > > See [rate limits](/api-reference/authentication#rate-limits). [Contact support](https://t.me/minisendapp) to request higher limits. # How it works Source: https://docs.minisend.xyz/how-it-works Follow a payment from stablecoin deposit to local currency payout, and the status your session moves through at each step. A checkout payment moves through these steps from deposit to payout. ## The flow **1. Your customer sends USDC or USDT** One deposit address accepts both, on every [supported network](/payments/supported-currencies). **2. The payment is detected** The status changes to `deposit_received`. With no payment within **30 minutes**, the session expires. **3. The payment is processed** USDT is converted to USDC, which adds **30 to 50 seconds**. The status changes to `settling`. **4. The payout is sent** To your M-Pesa, mobile money, or bank account, at the current rate. The status changes to `completed` and a webhook is sent. ## Payment statuses | Status | What it means | | - | - | | `pending` | Waiting for your customer to pay | | `deposit_received` | The payment was detected and is being processed | | `settling` | The payout is in progress | | `completed` | The payout is complete | | `failed` | The payment arrived but we couldn't finish paying you out. The money is safe. [Tell us](https://t.me/minisendapp) the session ID and we'll sort it out | | `expired` | Nothing was paid within 30 minutes | ## Coins and networks Customers can pay USDC or USDT on any [supported network](/payments/supported-currencies), to the same address. Payments on Base complete fastest. # One Tap USDT/USDC for your business. Source: https://docs.minisend.xyz/introduction Accept USDC, USDT, or M-Pesa from your customers and get paid in KES, NGN, GHS, or UGX, straight to M-Pesa, mobile money, or your bank account. Your customer pays in **USDC, USDT, or M-Pesa**, whichever they have. You get paid in **KES, NGN, GHS, or UGX**, straight to your M-Pesa, mobile money, or bank account. You don't need a crypto wallet, you're never exposed to crypto price swings, and there's nothing to convert yourself. We spot the payment on whichever of the six supported networks your customer used, convert it to your currency at the live rate, and send it to your account. > [card] [Building with an AI coding agent?](/ai-agent-skill) > > Install the Minisend skill and your agent (Claude Code, Cursor, Codex, and others) will know how to use every API on this site, even offline. ## How it looks One request from your server: ```bash theme={null} curl -X POST https://merchant.minisend.xyz/api/merchant/checkout \ -H "Authorization: Bearer ms_live_your_key_here" \ -H "Content-Type: application/json" \ -d '{"amount": 25.00, "external_id": "order-4821"}' ``` You get back a `checkout_url`, which is a payment page we host for you. Send your customer there, they pay, and we send a message to your server (a webhook) as soon as the money lands. ## Pick your path > [card] [Build with the API](/quickstart) > > Create payment pages from your own app and get told when they're paid. **About five minutes to your first payment.** > [card] [No-code payment link](/payments/payment-links) > > A permanent link for your business. Share it anywhere. No coding needed. > [card] [See how it works](/how-it-works) > > Follow one payment from your customer's wallet to your bank account. ## What you'll find in here > [card] [Supported networks](/payments/supported-currencies) > > USDC and USDT on six networks. Paid out in KES, NGN, GHS, or UGX. > [card] [API reference](/api-reference/authentication) > > Every endpoint: what to send, what you get back, and what the errors mean. > [card] [Webhooks](/webhooks/overview) > > Get a message on your server at every stage of a payment, from the moment we spot it to the moment you're paid. > [card] [MCP server](/mcp-server) > > Connect an AI coding agent to your live account and let it get quotes, create orders, and check status for you. > [card] [Off-ramp API](/offramp/overview) > > Send USDC and we pay out to M-Pesa, mobile money, or a bank account. Good for payroll, sending money home, and paying suppliers. > [card] [Onramp API](/onramp/overview) > > Collect M-Pesa payments from a customer's phone and receive USDC in your own wallet. > [card] [Wallet API](/wallet-api/overview) > > Give every user of your product their own crypto deposit address. > [card] [AI agent skill](/ai-agent-skill) > > Install a skill that teaches Claude Code, Cursor, and other agents how to use all of Minisend. # Connect your agent with MCP Source: https://docs.minisend.xyz/mcp-server Add the Minisend MCP server and let your coding agent quote payouts, create orders, collect M-Pesa payments, and provision wallets directly. The Minisend MCP server exposes your account to coding agents as tools. An agent can quote a payout, validate a recipient, and create the order from a single instruction. Knowledge tools answer API questions and work without a key. ## Add it ```bash Claude Code theme={null} claude mcp add --transport http minisend https://mcp.minisend.xyz/mcp \ --header "Authorization: Bearer ms_live_..." ``` ```json Cursor, VS Code, Windsurf theme={null} { "mcpServers": { "minisend": { "url": "https://mcp.minisend.xyz/mcp", "headers": { "Authorization": "Bearer ms_live_..." } } } } ``` Get a key under [API keys](/dashboard/api-keys). ### Wallet API tools Wallet API tools require a second header with a `wsk_live_` key. ```bash Claude Code theme={null} claude mcp add --transport http minisend https://mcp.minisend.xyz/mcp \ --header "Authorization: Bearer ms_live_..." \ --header "X-Minisend-Wallet-Key: wsk_live_..." ``` ```json Cursor, VS Code, Windsurf theme={null} { "mcpServers": { "minisend": { "url": "https://mcp.minisend.xyz/mcp", "headers": { "Authorization": "Bearer ms_live_...", "X-Minisend-Wallet-Key": "wsk_live_..." } } } } ``` A `ms_live_` key will not work on the Wallet API, and a `wsk_live_` key will not work anywhere else. ## What your agent can do | Product | Tools | | - | - | | Off-ramp | `offramp_quote`, `offramp_validate_account`, `offramp_create_order`, `offramp_submit_deposit`, `offramp_get_order`, `offramp_list_orders` | | Onramp | `onramp_quote`, `onramp_list_institutions`, `onramp_create_order`, `onramp_get_order`, `onramp_list_orders` | | Checkout | `checkout_create_session`, `checkout_get_session` | | Wallet API | `wallet_create`, `wallet_get`, `wallet_get_by_ref`, `wallet_balance`, `wallet_deposits`, `wallet_list_deposits`, `wallet_transfer`, `wallet_get_transfer`, `wallet_list_transfers` | | Account | `minisend_whoami`, `minisend_diagnose_key` | ### Knowledge tools Answered from data built into the server. No key or rate limit. | Tool | What it answers | | - | - | | `minisend_api_schema` | The exact request and response fields for an endpoint, including which headers change its behaviour | | `minisend_recipient_rules` | Required recipient fields for a currency and payout method, accepted phone formats, exact mobile network names, and the per-transaction limits | | `minisend_explain_error` | What a status code and error message actually mean, and whether retrying can help | | `minisend_webhook_spec` | Event names, the signature scheme, and ordering rules | ## You only see the tools your key can use Tools are listed according to your key's access. Products not enabled for your account don't appear. Wallet tools appear only with the wallet key header. If only knowledge tools appear, run `minisend_diagnose_key`. Restart your client after changing headers. ## These tools move real money > [!WARNING] > > There is no sandbox. Every call is live. `offramp_create_order` creates a real payout order, and `onramp_create_order` sends a real payment prompt (KES) or real bank transfer instructions (NGN). Keep tool-call approval on in your client, and check the amount and recipient before approving. * **Off-ramp orders don't pay anyone by themselves.** You send `total_deposit_usdc`, and submit the hash when `deposit_submission_required` is `true`. * **`wallet_transfer` moves real funds** and requires transfers to be enabled. Always pass an `idempotency_key`. * **Onramp orders are single attempts.** For KES the prompt is sent immediately. Create a new order instead of retrying, and don't create a second NGN order for the same payment. ## Your keys Keys are passed through to the Minisend API and not stored. Rate limits are counted against your account. ## MCP or the skill? The [agent skill](/ai-agent-skill) teaches your agent the API for writing integration code, offline. The MCP server operates your account live. Use either or both. > [card] [API keys](/dashboard/api-keys) > > Create a key for the header. # Off-ramp API Source: https://docs.minisend.xyz/offramp/overview Send USDC from your own wallet and Minisend pays out KES, NGN, GHS, or UGX to any recipient: M-Pesa, mobile money, till, paybill, or bank account. The off-ramp API pays out USDC as local currency to an M-Pesa phone, till, paybill, mobile money account, or bank account. Use it for payroll, supplier payments, and user cash-outs. To make a payout, get a quote, create an order, and send the USDC. The recipient's account is checked when you create the order. ## Two ways to send your USDC Minisend never holds your funds. You send USDC from your own wallet, and we pay the recipient in local currency. Each order's `deposit_submission_required` field tells you how to send: | Way | Field value | What you do | | - | - | - | | Automatic | `false` | Send `total_deposit_usdc` to `deposit_address`. The deposit is detected automatically | | Send and confirm | `true` | Send `total_deposit_usdc` to `deposit_address`, then submit the transaction hash | > [!NOTE] > > The way can differ between orders for the same currency and recipient type. Read `deposit_submission_required` on every order. Every order has a `refund_address`. If we can't pay the recipient, your money goes back there. Minisend never keeps it. ## Paying from your Wallet API balance To pay an order from a [Wallet API](/wallet-api/overview) address, add `funding_wallet_ref` when you create it. The order's `total_deposit_usdc` is sent from that address on Base. There's no deposit to send and no hash to submit. Wait for `offramp.completed`. * The address must hold enough USDC on Base when you create the order. Otherwise the order is refused. * `Idempotency-Key` is required. * Refunds return to the funding address. `refund_address` is ignored. * Turn [auto-sweep](/api-reference/wallet-api/sweep-config) off for the funding address. * Enabled per account. Email [info@minisend.xyz](mailto:info@minisend.xyz) to request access. See [create an order](/api-reference/offramp/create-order#paying-from-a-wallet-api-address) for an example. ## How it works **1. Get a quote** `POST /api/offramp/quote` returns the rate, the fee, and the amount the recipient receives. **2. Create an order** `POST /api/offramp/orders` checks the recipient's account and returns a `deposit_address` and the amount to send. **3. Send USDC on Base** Send `total_deposit_usdc` to `deposit_address` before `expires_at`. **4. Confirm the transfer, if the order asks** If `deposit_submission_required` is `true`, call `POST /api/offramp/orders/{order_id}/deposit` with the transaction hash. Otherwise skip this step. **5. The recipient is paid** The order moves to `completed` and an `offramp.completed` webhook is sent. ## Order statuses | Status | What it means | | - | - | | `pending` | Waiting for your USDC | | `settling` | USDC received. The payout is in progress | | `completed` | The recipient was paid. `settlement_receipt` holds the payout reference | | `failed` | The payout didn't complete. USDC is returned to `refund_address` | | `expired` | No USDC arrived before `expires_at` | `completed`, `failed`, and `expired` are final. Track orders with [webhooks](/offramp/webhooks) or [get an order](/api-reference/offramp/get-order). ## Fees and rates | Way | Fee | Rate | | - | - | - | | Send and confirm | Taken from the payout | Set when your USDC arrives | | Automatic | Added to what you send | Fixed when you create the order | On send-and-confirm orders, the quote is an estimate and the fee is deducted from the local amount. On automatic orders, a fee is added to what you send, so `total_deposit_usdc` is more than `amount_usdc`. The recipient receives `amount_local − fee`. Every quote returns `recipient_amount` and `deposit_submission_required`. Automatic quotes also return `estimated_total_deposit_usdc`. ## Limits Orders must be **0.5 to 50,000 USDC**, and the local amount must fall within the range for the currency: | Currency | Per payout | | - | - | | KES | 20 to 250,000 | | GHS | 5 to 5,000 | | UGX | 500 to 5,000,000 | Amounts outside these ranges return `400`. ## Getting access The off-ramp is enabled per account. Email [info@minisend.xyz](mailto:info@minisend.xyz) to request access. Until it's enabled, these endpoints return `403`. Once enabled, any `ms_live_` key on the account works. See [key scopes](/api-reference/authentication#key-scopes). > [card] [Make your first payout](/offramp/quickstart) > > Quote, create an order, send USDC, and confirm the payout. # Off-ramp quickstart Source: https://docs.minisend.xyz/offramp/quickstart Convert USDC to an M-Pesa or bank payout: quote the amount, create an order, send USDC on Base, and submit the transaction hash only when the order asks for it. This guide pays 10 USDC to a Kenyan M-Pesa number, then covers Nigerian bank payouts. **Prerequisites:** * An API key with off-ramp enabled. See [getting access](/offramp/overview#getting-access). * A wallet with USDC on **Base**. **1. Quote the payout** Include the recipient to verify the account and get its registered name in the same call. ```bash theme={null} curl -X POST https://merchant.minisend.xyz/api/offramp/quote \ -H "Authorization: Bearer ms_live_your_key_here" \ -H "Content-Type: application/json" \ -d '{ "amount": 10, "currency": "KES", "recipient": { "method": "MOBILE", "account_name": "Jane Wanjiku", "phone": "0712345678", "mobile_network": "Safaricom" } }' ``` ```json theme={null} { "amount_usdc": 10, "currency": "KES", "rate": 128.57, "amount_local": 1285, "fee": 0, "recipient_amount": 1285, "estimated_total_deposit_usdc": 10.12, "deposit_submission_required": false, "recipient_name": "JANE WANJIKU", "expires_at": "2026-07-05T12:05:00.000Z" } ``` `recipient_amount` is what the recipient receives. `deposit_submission_required` is `false`, so this is an [automatic order](/offramp/overview#two-ways-to-send-your-usdc): the fee is added to what you send. **2. Create the order** Send an `Idempotency-Key` unique to this payout so a retry never creates a second order. ```bash theme={null} curl -X POST https://merchant.minisend.xyz/api/offramp/orders \ -H "Authorization: Bearer ms_live_your_key_here" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: payout-8412" \ -d '{ "amount": 10, "currency": "KES", "refund_address": "0xYourWalletAddress0000000000000000000000", "reference": "payout-8412", "recipient": { "method": "MOBILE", "account_name": "Jane Wanjiku", "phone": "0712345678", "mobile_network": "Safaricom" } }' ``` ```json theme={null} { "order_id": "9b2f6c1e-...", "status": "pending", "amount_usdc": 10, "total_deposit_usdc": 10.12, "sender_fee_usdc": 0.12, "transaction_fee_usdc": 0, "currency": "KES", "rate": 128.57, "amount_local": 1285, "fee": 0, "recipient_amount": 1285, "deposit_address": "0x7a3d1c9e5b2f4a6c8e0d1b3f5a7c9e1d3b5f7a9c", "deposit_chain": "base", "deposit_submission_required": false, "expires_at": "2026-07-05T12:05:00.000Z", "instructions": "Send exactly 10.12 USDC (Base), shown as total_deposit_usdc (the order amount plus fees), to deposit_address before expires_at. A smaller amount is not credited and is refunded to refund_address. The deposit is detected automatically: do not submit a transaction hash for this order." } ``` An invalid recipient account returns `422` and no order is created. **3. Send USDC on Base** Transfer exactly `total_deposit_usdc` USDC on **Base** to `deposit_address` before `expires_at`. > [!WARNING] > > Automatic orders expire within minutes, and a short deposit is returned to `refund_address`. Create the order when you're ready to send. Send-and-confirm orders allow 30 minutes. **4. Confirm your transfer (only if asked)** Skip this step when `deposit_submission_required` is `false`. When it's `true`, submit the transaction hash: ```bash theme={null} curl -X POST https://merchant.minisend.xyz/api/offramp/orders/9b2f6c1e-.../deposit \ -H "Authorization: Bearer ms_live_your_key_here" \ -H "Content-Type: application/json" \ -d '{"transaction_hash": "0x55a572efe1720250e442f38741477a4fc3f7f152e5cd208cc52f8222a1c2a13b"}' ``` `200` with `"status": "settling"` means the payout started. `422` means the transfer couldn't be verified. Check the amount, network, and hash, then retry. **5. Check it's done** Wait for the webhook, or get the order: ```bash theme={null} curl https://merchant.minisend.xyz/api/offramp/orders/9b2f6c1e-... \ -H "Authorization: Bearer ms_live_your_key_here" ``` On payout, `status` is `completed` and `offramp.completed` is sent. See [off-ramp webhooks](/offramp/webhooks). ## NGN payouts NGN orders pay out to bank accounts. The recipient takes an `institution` code and an `account_number`. See [recipients](/offramp/recipients). Get codes from [`GET /api/offramp/institutions`](/api-reference/offramp/institutions) rather than hard-coding them. ```bash theme={null} curl -X POST https://merchant.minisend.xyz/api/offramp/orders \ -H "Authorization: Bearer ms_live_your_key_here" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: payout-8413" \ -d '{ "amount": 100, "currency": "NGN", "refund_address": "0xYourWalletAddress0000000000000000000000", "recipient": { "account_name": "Chidi Okafor", "institution": "GTBINGLA", "account_number": "0123456789" } }' ``` > [!NOTE] > > Automatic orders fix the rate at creation and expire within minutes. If an order expires, create a new one. If a payout fails after you send, the USDC is returned to `refund_address`. # Recipients Source: https://docs.minisend.xyz/offramp/recipients The recipient object shape for every payout method: M-Pesa and mobile money numbers, Kenyan tills and paybills, and bank accounts in Kenya and Nigeria. Every quote and order takes a `recipient` object. The required fields depend on the currency and the payout `method`. ## Methods per currency | Currency | Methods | | - | - | | KES | `MOBILE`, `BUY_GOODS` (till), `PAYBILL`, `BANK_TRANSFER` | | GHS | `MOBILE` | | UGX | `MOBILE` | | NGN | Bank transfer (no `method` field, see below) | ## MOBILE: KES, GHS, UGX ```json theme={null} { "method": "MOBILE", "account_name": "Jane Wanjiku", "phone": "0712345678", "mobile_network": "Safaricom" } ``` **account\_name** `string` *required* The recipient's name. Recorded on the payout. **phone** `string` *required* Local format, like `0712345678`. International formats (`+254712345678`, `254712345678`) work too. **mobile\_network** `string` *required* The recipient's mobile money network: | Currency | Networks | | - | - | | KES | `Safaricom` (alias: `m-pesa`), `Airtel` | | GHS | `MTN`, `Vodafone` (alias: `Telecel`), `AirtelTigo` | | UGX | `MTN`, `Airtel` | ## BUY\_GOODS: KES tills ```json theme={null} { "method": "BUY_GOODS", "account_name": "Mama Njeri Shop", "till": "832909" } ``` **till** `string` *required* M-Pesa till number, 5–7 digits. ## PAYBILL: KES paybills ```json theme={null} { "method": "PAYBILL", "account_name": "Nairobi Water", "paybill": "888880", "paybill_account": "254712345678" } ``` **paybill** `string` *required* Paybill business number, 5–7 digits. **paybill\_account** `string` *required* The account number the paybill asks for, such as a meter number, invoice number, or phone number. ## BANK\_TRANSFER: KES banks ```json theme={null} { "method": "BANK_TRANSFER", "account_name": "Acme Supplies Ltd", "account_number": "0102030405060", "bank_code": "68", "bank_name": "Equity Bank" } ``` **account\_number** `string` *required* Bank account number. **bank\_code** `string` *required* Kenyan bank code. **bank\_name** `string` Display name for the bank. Optional. ## NGN bank transfer NGN recipients have no `method` field. All NGN payouts are bank transfers. ```json theme={null} { "account_name": "Chidi Okafor", "institution": "GTBINGLA", "account_number": "0123456789" } ``` **institution** `string` *required* The bank's institution code, for example `GTBINGLA` for Guaranty Trust Bank. `bank_code` is accepted as an alias. Get codes from [`GET /api/offramp/institutions`](/api-reference/offramp/institutions). An invalid code prevents the order from being created. **account\_number** `string` *required* The 10-digit Nigerian bank account number (NUBAN). ## Validation Every recipient is verified **before the order is created**. An invalid account returns `422` and no order is created. * **Bank accounts** must exist and have a registered name. * **Phone numbers, tills, and paybills** return the registered name when available. A missing name doesn't block the order. To show the registered name before the user confirms, call [`POST /api/offramp/validate-account`](/api-reference/offramp/validate-account). # Off-ramp webhooks Source: https://docs.minisend.xyz/offramp/webhooks Payload schemas for offramp.completed, offramp.failed, and offramp.expired, delivered to your webhook URL and signed with the same X-Minisend-Signature header. Off-ramp events go to the webhook URL you set under [Dashboard → Webhooks](/dashboard/webhooks), or to an endpoint of their own if you [pick one for Off-ramp](/webhooks/overview#more-than-one-endpoint). They're signed like checkout events. See [verification](/webhooks/verification) and [retries](/webhooks/overview#retries). | Event | Sent when | Final status | | - | - | - | | `offramp.completed` | The recipient was paid | `completed` | | `offramp.failed` | The payout didn't complete after USDC arrived | `failed` | | `offramp.expired` | No USDC arrived before `expires_at` | `expired` | | `offramp.refunded` | The payout was reversed and USDC returned to `refund_address`. Can follow `offramp.completed` | `refunded` | *** ## offramp.completed ```json theme={null} { "event": "offramp.completed", "order_id": "9b2f6c1e-...", "external_reference": "payout-8412", "status": "completed", "amount_usdc": 10, "amount_local": 1294, "payout_currency": "KES", "exchange_rate": 129.45, "fee": 13, "recipient_account_name": "Jane Wanjiku", "settlement_receipt": "SHQ1234ABC", "completed_at": "2026-07-05T12:07:41Z", "created_at": "2026-07-05T12:00:03Z" } ``` **event** `string` *required* Always `offramp.completed`. **order\_id** `string` *required* The order ID. Deduplicate on `order_id` and `event` together. **external\_reference** `string` Your `reference`, if you set one when creating the order. **amount\_usdc** `number` *required* The order's USDC amount. **amount\_local** `number` *required* The local amount before the fee, at the payout rate. The recipient received `amount_local − fee`. **payout\_currency** `string` *required* `KES`, `NGN`, `GHS`, or `UGX`. **exchange\_rate** `number` *required* Local currency per 1 USDC at payout. **fee** `number` Fee in local currency deducted from the payout. `0` on automatic orders. **recipient\_account\_name** `string` *required* **settlement\_receipt** `string` *required* The payout reference. Can be empty. **completed\_at** `string` *required* ISO 8601. **created\_at** `string` *required* ISO 8601. *** ## offramp.failed The payout didn't complete after USDC arrived. ```json theme={null} { "event": "offramp.failed", "order_id": "9b2f6c1e-...", "external_reference": "payout-8412", "status": "failed", "amount_usdc": 10, "amount_local": 1294, "payout_currency": "KES", "exchange_rate": 129.45, "fee": 13, "recipient_account_name": "Jane Wanjiku", "created_at": "2026-07-05T12:00:03Z" } ``` > [!NOTE] > > On automatic orders, your USDC goes back to the order's `refund_address` by itself. For send-and-confirm orders, send the `order_id` to [support](https://t.me/minisendapp). Your money is not lost. *** ## offramp.expired No USDC arrived before `expires_at`. Create a new order to retry. ```json theme={null} { "event": "offramp.expired", "order_id": "9b2f6c1e-...", "external_reference": "payout-8412", "status": "expired", "amount_usdc": 10, "payout_currency": "KES", "recipient_account_name": "Jane Wanjiku", "created_at": "2026-07-05T12:00:03Z" } ``` > [!WARNING] > > If you sent USDC and the order still expired, send the `order_id` and transaction hash to [support](https://t.me/minisendapp). *** ## Handling pattern Respond `200` immediately and process asynchronously. Deduplicate on `order_id` and `event` together: one order can emit more than one event. ```javascript theme={null} app.post('/webhooks/minisend', (req, res) => { res.status(200).send('OK'); const payload = req.body; if (payload.event?.startsWith('offramp.')) { processOfframpEvent(payload); // dedupe on `${payload.order_id}:${payload.event}` } else { processCheckoutEvent(payload); // dedupe on `${payload.session_id}:${payload.event}` } }); ``` # Onramp API Source: https://docs.minisend.xyz/onramp/overview Collect KES over M-Pesa or NGN by bank transfer, and receive USDC in your own wallet. The opposite of the off-ramp API. The onramp API collects local currency from a customer and releases USDC to an address you control. Use it to accept payments from customers who don't hold crypto. The `currency` sets the payment method: | Currency | Method | How the customer pays | | - | - | - | | `KES` | M-Pesa | Approves a payment prompt on their phone | | `NGN` | Bank transfer | Transfers naira to the account in the order's instructions | Both use the same endpoints and `onramp.*` webhooks. `payment_method` is `mpesa` or `bank_transfer`. ## Where the money goes Minisend never holds the USDC. After payment, USDC is released to the Base address you set on the order. If a bank transfer order can't complete after the naira arrives, the naira is refunded to the payer's `refund_account`. ## How it works **1. Get a quote** `POST /api/onramp/quote` returns the rate and fee, from either the amount to charge or the amount to receive. **2. Create an order** `POST /api/onramp/orders` creates the order. For M-Pesa, it sends the payment prompt. For bank transfer, it returns payment instructions. **3. Your customer pays** The customer approves the prompt, or transfers the exact amount shown. **4. USDC arrives** USDC is released to your address. `onramp.completed` and `onramp.released` are sent. ## Order statuses | Status | What it means | | - | - | | `pending` | Waiting for the customer to pay | | `deposit_received` | Bank transfer only. Payment received. USDC release in progress | | `completed` | The customer paid. USDC is released to your address | | `failed` | The payment wasn't collected or the order didn't complete. See `failure_reason` | | `cancelled` | M-Pesa only. The customer dismissed the prompt. Nothing was charged | | `expired` | The customer didn't pay before `expires_at` | `completed`, `failed`, `cancelled`, and `expired` are final. Orders aren't retried. Create a new order to try again. ## Fees and rates Quote from either side: | You choose | Your customer pays | You receive | | - | - | - | | How much USDC to receive | That amount in local currency, plus the fee | The USDC you asked for | | How much to charge | Exactly that amount | That amount minus the fee, in USDC | Every quote returns both figures (`amount_kes` or `amount_ngn`, and `amount_usdc`). For bank transfer, read the final `amount_usdc` from the order. ## Limits | Currency | Charged to the customer | Also required | | - | - | - | | KES | 20 to 250,000 | At least 100 KES left after the fee | | NGN | Up to 1,000,000 | At least 1 USDC delivered | Accounts can create up to 10 orders per minute. Orders to the same phone number or payer bank account are also limited. See [rate limits](/api-reference/authentication#rate-limits). ## Bank codes for NGN Bank transfer orders require the payer's bank code in `refund_account.institution`. Get codes from [`GET /api/onramp/institutions`](/api-reference/onramp/institutions). ## Getting access The onramp is enabled per account. Email [info@minisend.xyz](mailto:info@minisend.xyz) to request access. Until it's enabled, these endpoints return `403`. See [key scopes](/api-reference/authentication#key-scopes). > [card] [Make your first collection](/onramp/quickstart) > > Quote, create an order, and receive USDC. # Onramp quickstart Source: https://docs.minisend.xyz/onramp/quickstart Collect your first M-Pesa or bank transfer payment and receive USDC in your own wallet: quote the amount, then create the order. This guide collects KES 1,000 over M-Pesa and releases USDC to your Base address, then covers Nigerian bank transfers. **Prerequisites:** * An API key with onramp enabled. See [getting access](/onramp/overview#getting-access). * A Base address you control. **1. Get a quote** Quote from the KES amount to charge or the USDC amount to receive. This example charges an exact KES amount. ```bash theme={null} curl -X POST https://merchant.minisend.xyz/api/onramp/quote \ -H "Authorization: Bearer ms_live_your_key_here" \ -H "Content-Type: application/json" \ -d '{ "currency": "KES", "amount_kes": 1000 }' ``` ```json theme={null} { "currency": "KES", "payment_method": "mpesa", "amount_kes": 1000, "fee_kes": 10, "net_kes": 990, "amount_usdc": 7.62, "rate": 129.92, "expires_at": "2026-07-23T12:05:00.000Z" } ``` `amount_kes` is what the customer pays. `amount_usdc` is what you receive. **2. Create the order** Send an `Idempotency-Key` unique to this collection so a retry never sends a second prompt. ```bash theme={null} curl -X POST https://merchant.minisend.xyz/api/onramp/orders \ -H "Authorization: Bearer ms_live_your_key_here" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: collect-2201" \ -d '{ "currency": "KES", "amount_kes": 1000, "phone": "0712345678", "address": "0xYourWalletAddress0000000000000000000000", "reference": "collect-2201" }' ``` ```json theme={null} { "order_id": "7c1e4f9a-...", "status": "pending", "currency": "KES", "payment_method": "mpesa", "amount_usdc": 7.62, "amount_local": 1000, "fee": 10, "rate": 129.92, "customer_phone": "0712345678", "mobile_network": "Safaricom", "release_address": "0xyourwalletaddress0000000000000000000000", "release_chain": "base", "release_asset": "USDC", "external_reference": "collect-2201", "expires_at": "2026-07-23T12:30:00.000Z", "created_at": "2026-07-23T12:00:03.000Z", "instructions": "The customer's phone (0712345678) will receive an M-Pesa prompt for KSh 1,000. On payment, 7.62 USDC (Base) is released to release_address." } ``` The payment prompt is sent when this call succeeds. **3. Your customer approves** The customer enters their M-Pesa PIN. > [!NOTE] > > A dismissed prompt ends the order as `cancelled`. A timeout or failed payment ends it as `failed`. Create a new order to retry. **4. Check it's done** Wait for the webhook, or get the order: ```bash theme={null} curl https://merchant.minisend.xyz/api/onramp/orders/7c1e4f9a-... \ -H "Authorization: Bearer ms_live_your_key_here" ``` After payment, `status` is `completed` and `onramp.completed` is sent. `onramp.released` follows with `release_tx_hash`. See [onramp webhooks](/onramp/webhooks). ## Starting from the USDC amount To receive an exact USDC amount, send `amount_usdc` instead of `amount_kes`: ```bash theme={null} curl -X POST https://merchant.minisend.xyz/api/onramp/quote \ -H "Authorization: Bearer ms_live_your_key_here" \ -H "Content-Type: application/json" \ -d '{ "currency": "KES", "amount_usdc": 10 }' ``` The returned `amount_kes` is what the customer pays, including the fee. Pass the same `amount_usdc` when creating the order. ## Bank transfer (NGN) Bank transfer orders differ in two ways: the payer transfers naira instead of approving a prompt, and the order requires the payer's bank account for refunds. **1. Look up the payer's bank code** ```bash theme={null} curl "https://merchant.minisend.xyz/api/onramp/institutions?currency=NGN" \ -H "Authorization: Bearer ms_live_your_key_here" ``` ```json theme={null} { "currency": "NGN", "count": 2, "institutions": [ { "code": "GTBINGLA", "name": "Guaranty Trust Bank", "type": "bank" }, { "code": "ABNGNGLA", "name": "Access Bank", "type": "bank" } ] } ``` Use the payer's bank `code` in `refund_account.institution`. **2. Get a quote** ```bash theme={null} curl -X POST https://merchant.minisend.xyz/api/onramp/quote \ -H "Authorization: Bearer ms_live_your_key_here" \ -H "Content-Type: application/json" \ -d '{ "currency": "NGN", "amount_ngn": 10120 }' ``` ```json theme={null} { "currency": "NGN", "payment_method": "bank_transfer", "amount_ngn": 10120, "fee_ngn": 120, "net_ngn": 10000, "amount_usdc": 7.14, "rate": 1400, "expires_at": "2026-09-26T10:05:00.000Z" } ``` `amount_ngn` is what the payer sends, including the fee. `net_ngn` is converted to USDC. **3. Create the order** `refund_account` is the payer's bank account, used for refunds. `account_name` is optional unless a `422` asks for it. ```bash theme={null} curl -X POST https://merchant.minisend.xyz/api/onramp/orders \ -H "Authorization: Bearer ms_live_your_key_here" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: order-8841" \ -d '{ "currency": "NGN", "amount_ngn": 10120, "refund_account": { "institution": "GTBINGLA", "account_number": "0123456789", "account_name": "John Doe" }, "address": "0xYourWalletAddress0000000000000000000000", "reference": "order-8841" }' ``` ```json theme={null} { "order_id": "...", "status": "pending", "currency": "NGN", "payment_method": "bank_transfer", "amount_usdc": 7.14, "amount_local": 10120, "fee": 120, "rate": 1400, "customer_phone": null, "mobile_network": null, "refund_account": { "institution": "GTBINGLA", "account_number": "0123456789", "account_name": "JOHN DOE" }, "payment_instructions": { "method": "bank_transfer", "bank_name": "Guaranty Trust Bank", "account_number": "9876543210", "account_name": "Provider A / John Doe", "amount": "10120", "currency": "NGN", "expires_at": "2026-09-26T10:30:00Z", "note": "Transfer exactly this amount, kobo included, before expires_at. A different amount or a late transfer will not be credited." }, "release_address": "0x...", "release_chain": "base", "release_asset": "USDC", "external_reference": "order-8841", "expires_at": "2026-09-26T10:30:00Z", "created_at": "...", "instructions": "Ask the payer to transfer exactly NGN 10120 to ... before ..." } ``` **4. Show the payment instructions** Show the payer `payment_instructions.bank_name`, `account_number`, `account_name`, and `amount`. > [!WARNING] > > Show `payment_instructions.amount` exactly as returned. It's a string and may include kobo, for example `"9108.03"`. A different amount isn't credited. Show a countdown to `payment_instructions.expires_at`. The instructions are valid only until then. **5. Wait for completion** When the transfer arrives, the order moves to `deposit_received`, then `completed`. The same `onramp.completed` and `onramp.released` events are sent. See [onramp webhooks](/onramp/webhooks). > [!NOTE] > > No webhook is sent for `deposit_received`. Read it with `GET /api/onramp/orders/{order_id}`. # Onramp webhooks Source: https://docs.minisend.xyz/onramp/webhooks Payload schemas for onramp.completed, onramp.released, onramp.failed, onramp.cancelled, and onramp.expired on both the M-Pesa and bank transfer rails, signed with the same X-Minisend-Signature header. Onramp events go to the webhook URL you set under [Dashboard → Webhooks](/dashboard/webhooks), or to an endpoint of their own if you [pick one for Onramp](/webhooks/overview#more-than-one-endpoint). They're signed like checkout events. See [verification](/webhooks/verification) and [retries](/webhooks/overview#retries). | Event | Sent when | | - | - | | `onramp.completed` | The customer paid | | `onramp.released` | The USDC transfer to your address is confirmed | | `onramp.failed` | The payment wasn't collected or the order didn't complete | | `onramp.cancelled` | The customer dismissed the M-Pesa prompt | | `onramp.expired` | The customer didn't pay before `expires_at` | A successful order sends `onramp.completed` and `onramp.released`. They can arrive in either order. Use `onramp.completed` for payment and `onramp.released` for the USDC transaction hash. Every event includes `payment_method`: `mpesa` or `bank_transfer`. On bank transfer orders, `customer_phone` and `mobile_network` are `null`. > [!NOTE] > > Bank transfer orders pass through `deposit_received` before `completed`. No webhook is sent for it. Use [get an order](/api-reference/onramp/get-order) to read it. *** ## onramp.completed ```json theme={null} { "event": "onramp.completed", "order_id": "7c1e4f9a-...", "external_reference": "collect-2201", "status": "completed", "currency": "KES", "payment_method": "mpesa", "amount_usdc": 7.62, "amount_local": 1000, "fee": 10, "exchange_rate": 129.92, "customer_phone": "0712345678", "mobile_network": "Safaricom", "release_address": "0xyourwalletaddress0000000000000000000000", "receipt_number": "SHQ1234ABC", "completed_at": "2026-07-23T12:04:41Z", "created_at": "2026-07-23T12:00:03Z" } ``` **event** `string` *required* Always `onramp.completed`. **order\_id** `string` *required* The order ID. Deduplicate on `order_id` and `event` together. **external\_reference** `string` Your `reference`, if you set one when creating the order. **payment\_method** `string` *required* `mpesa` or `bank_transfer`. **amount\_usdc** `number` *required* The USDC sent, or being sent, to `release_address`. **amount\_local** `number` *required* The local amount the customer was charged, including the fee. **fee** `number` *required* Fee in local currency, included in `amount_local`. **exchange\_rate** `number` *required* Local currency per 1 USDC. **customer\_phone** `string` The payer's phone number for M-Pesa orders. `null` for bank transfer orders. **mobile\_network** `string` `Safaricom` for M-Pesa orders. `null` for bank transfer orders. **receipt\_number** `string` The M-Pesa confirmation code, when available. Not present on bank transfer orders. **completed\_at** `string` *required* ISO 8601. **created\_at** `string` *required* ISO 8601. *** ## onramp.released Same fields as `onramp.completed`, plus `release_tx_hash`. ```json theme={null} { "event": "onramp.released", "order_id": "7c1e4f9a-...", "status": "completed", "payment_method": "mpesa", "amount_usdc": 7.62, "release_address": "0xyourwalletaddress0000000000000000000000", "release_tx_hash": "0x55a572efe1720250e442f38741477a4fc3f7f152e5cd208cc52f8222a1c2a13b", "completed_at": "2026-07-23T12:04:41Z", "created_at": "2026-07-23T12:00:03Z" } ``` **release\_tx\_hash** `string` *required* The Base transaction hash of the USDC release. *** ## onramp.failed ```json theme={null} { "event": "onramp.failed", "order_id": "7c1e4f9a-...", "external_reference": "collect-2201", "status": "failed", "currency": "KES", "payment_method": "mpesa", "amount_usdc": 7.62, "amount_local": 1000, "fee": 10, "exchange_rate": 129.92, "customer_phone": "0712345678", "mobile_network": "Safaricom", "release_address": "0xyourwalletaddress0000000000000000000000", "failure_reason": "stk_failed: The payer didn't respond to the M-Pesa prompt in time.", "created_at": "2026-07-23T12:00:03Z" } ``` **failure\_reason** `string` Why the order failed. For M-Pesa, a reason prefixed with `stk_failed:` or `stk_initiation_failed:`, for example `stk_failed: The balance is insufficient for the transaction.` Don't parse the wording. For bank transfer, one of: | Value | What it means | | - | - | | `refunded_to_payer` | Payment arrived but the order couldn't complete. Refunded to `refund_account` | | `deposit_not_settled` | Payment arrived but the order didn't complete. Contact support. Don't ask the payer to pay again | | `cancelled` | Cancelled before payment. A reason on a `failed` order, not the `cancelled` status | | `provision_failed`, `persist_failed`, `price_moved` | The order couldn't be set up. Create a new order | > [!NOTE] > > For M-Pesa, a failed order means nothing was taken, so there's nothing to refund. For bank transfer, `refunded_to_payer` means the naira had arrived and we sent it back. The payer's money isn't lost, it just wasn't converted. Either way, create a new order if your customer wants to try again. *** ## onramp.cancelled The customer dismissed the M-Pesa prompt. M-Pesa only. ```json theme={null} { "event": "onramp.cancelled", "order_id": "7c1e4f9a-...", "external_reference": "collect-2201", "status": "cancelled", "currency": "KES", "payment_method": "mpesa", "amount_usdc": 7.62, "amount_local": 1000, "fee": 10, "exchange_rate": 129.92, "customer_phone": "0712345678", "mobile_network": "Safaricom", "release_address": "0xyourwalletaddress0000000000000000000000", "failure_reason": "stk_failed: The payer cancelled the M-Pesa prompt.", "created_at": "2026-07-23T12:00:03Z" } ``` No payment was taken. Create a new order to send a new prompt. > [!NOTE] > > Handle `onramp.cancelled` as well as `onramp.failed`. A cancelled order sends only this event. *** ## onramp.expired The customer didn't pay before `expires_at`. ```json theme={null} { "event": "onramp.expired", "order_id": "7c1e4f9a-...", "external_reference": "collect-2201", "status": "expired", "currency": "KES", "payment_method": "mpesa", "amount_usdc": 7.62, "amount_local": 1000, "customer_phone": "0712345678", "created_at": "2026-07-23T12:00:03Z" } ``` *** ## Handling pattern Respond `200` immediately and process asynchronously. Deduplicate on `order_id` and `event` together. > [!WARNING] > > `onramp.completed` and `onramp.released` share `order_id` and `status`. Deduplicating on `order_id` alone drops `onramp.released` and its `release_tx_hash`. ```javascript theme={null} app.post('/webhooks/minisend', (req, res) => { res.status(200).send('OK'); const payload = req.body; const key = `${payload.order_id ?? payload.session_id}:${payload.event}`; if (payload.event?.startsWith('onramp.')) { processOnrampEvent(payload, key); } else if (payload.event?.startsWith('offramp.')) { processOfframpEvent(payload, key); } else { processCheckoutEvent(payload, key); } }); ``` # Checkout sessions Source: https://docs.minisend.xyz/payments/checkout-sessions Create Minisend checkout sessions server-side to embed crypto payments into any app. Customers get a hosted page; you receive a webhook on settlement. A checkout session is a single payment request created from your server. It returns a hosted payment page URL, and a webhook is sent when the payment completes. For a shareable link with no code, use a [payment link](/payments/payment-links). ## How it works **1. Your server creates the session** `POST /api/merchant/checkout` with the amount in USDC returns a `checkout_url` and `session_id`. **2. Send your customer to the payment page** Redirect to `checkout_url`. The page shows your business name, the amount, and the deposit address. **3. Your customer pays** In USDC or USDT on any [supported network](/payments/supported-currencies), or with M-Pesa. **4. The payment is settled** The payment is converted and paid out. USDT payments add 30 to 50 seconds. **5. Your server is notified** A webhook is sent when the session is `completed`, `failed`, or `expired`. You can also [get the session](#check-session-status). ## Pay with M-Pesa too Every checkout session can offer M-Pesa, whatever your payout currency. The payment page shows a Crypto / M-Pesa switch when the amount is within M-Pesa limits. The customer enters their phone number and approves the payment prompt. The payment settles the same way as a crypto payment. ## Create a session ```text theme={null} POST https://merchant.minisend.xyz/api/merchant/checkout ``` ```text theme={null} Authorization: Bearer ms_live_your_key_here ``` ```bash cURL theme={null} curl -X POST https://merchant.minisend.xyz/api/merchant/checkout \ -H "Authorization: Bearer ms_live_your_key_here" \ -H "Content-Type: application/json" \ -d '{ "amount": 25.00, "description": "Order #4821", "external_id": "order-4821", "customer_email": "customer@example.com", "redirect_url": "https://yourstore.com/orders/4821/thanks" }' ``` ```javascript JavaScript theme={null} const res = await fetch('https://merchant.minisend.xyz/api/merchant/checkout', { method: 'POST', headers: { 'Authorization': 'Bearer ms_live_your_key_here', 'Content-Type': 'application/json', }, body: JSON.stringify({ amount: 25.00, description: 'Order #4821', external_id: 'order-4821', customer_email: 'customer@example.com', }), }); const session = await res.json(); ``` ```python Python theme={null} import requests res = requests.post( 'https://merchant.minisend.xyz/api/merchant/checkout', headers={ 'Authorization': 'Bearer ms_live_your_key_here', 'Content-Type': 'application/json', }, json={ 'amount': 25.00, 'description': 'Order #4821', 'external_id': 'order-4821', 'customer_email': 'customer@example.com', }, ) session = res.json() ``` ### Request fields **amount** `number` *required* The amount in USDC, greater than 0. Payable in USDC, USDT, or the KES equivalent with M-Pesa. **description** `string` Shown on the payment page. **external\_id** `string` Your own reference, such as an order ID. Included in every webhook. **customer\_email** `string` Used for the customer's receipt. **settlement\_mode** `string` `fiat` or `usdc`. Overrides your account setting for this session. See [settlement mode](#settlement-mode). **settlement\_chain** `string` `BASE`, `ARB`, `AVAX`, `OP`, `ETH`, or `MATIC`. Only used when `settlement_mode` is `usdc`. **redirect\_url** `string` Where to send the customer after payment. An `https` URL, up to 2048 characters. See [sending the customer back](#sending-the-customer-back-to-your-site). ### Response (201) ```json theme={null} { "session_id": "cs_7f8a9b2c-...", "checkout_url": "https://merchant.minisend.xyz/checkout/cs_7f8a9b2c-...", "deposit_address": "0x1234...5678", "amount_usdc": 25.00, "settlement_mode": "fiat", "settlement_chain": null, "redirect_url": "https://yourstore.com/orders/4821/thanks", "expires_at": "2026-04-13T14:30:00Z", "status": "pending" } ``` > [!WARNING] > > Sessions expire after **30 minutes**. Create one when the customer is ready to pay. ## Sending the customer back to your site Set `redirect_url` to return the customer to your site after payment. Without it, the customer stays on the hosted page. [Payment links](/payments/payment-links) don't support redirects. ### Where your customer lands Two query parameters are appended to your URL: | Parameter | Value | | - | - | | `session_id` | The session ID | | `status` | `completed`, `failed`, or `expired` | So `https://yourstore.com/thanks?order=4821` becomes: ```text theme={null} https://yourstore.com/thanks?order=4821&session_id=cs_7f8a9b2c-...&status=completed ``` If your URL already contains `session_id` or `status`, your values are kept and ours aren't added. ### When it happens On `completed`, the customer is redirected automatically a few seconds after the success screen. On `failed` or `expired`, a return link is shown instead. > [!WARNING] > > Don't treat `status=completed` in the URL as proof of payment: anyone can edit it. Fulfil orders only after the webhook or a server-side [status check](#check-session-status). ## Settlement mode Sessions use your account's [settlement mode](/dashboard/settings#settlement-mode) unless `settlement_mode` overrides it: * **`fiat`**: paid out in local currency. * **`usdc`**: settled as USDC, without conversion. A session's mode is fixed at creation. With `usdc`, `settlement_chain` sets the network. For networks other than Base, `checkout.completed` arrives before the USDC reaches that network. Wait for [`checkout.forwarded`](/webhooks/events#checkout-forwarded), or check `forward` on the session. If the move fails, [`settlement.forward_failed`](/webhooks/events#settlement-forward_failed) is sent and the USDC remains on Base. Related endpoints, using your checkout API key: * `GET /api/merchant/settlement`: current mode, network, fee rate, and available networks. * `GET /api/merchant/balances`: USDC balance per network. `null` means the balance couldn't be read. ## Using external\_id Pass your order ID as `external_id`. It's included in every webhook, so you can match payments to orders. ```javascript theme={null} // Create body: JSON.stringify({ amount: 49.99, external_id: 'order-8837' }) // Handle webhook if (req.body.event === 'checkout.completed') { markOrderPaid(req.body.external_id, { receipt: req.body.receipt, local_amount: req.body.amount_local, }); } ``` ## Check session status ```text theme={null} GET https://merchant.minisend.xyz/api/merchant/checkout/{session_id} ``` No API key is required. ```bash theme={null} curl https://merchant.minisend.xyz/api/merchant/checkout/cs_7f8a9b2c-... ``` ```json theme={null} { "session_id": "cs_7f8a9b2c-...", "status": "completed", "amount_usdc": 25.00, "description": "Order #4821", "deposit_address": "0x1234...5678", "expires_at": "2026-04-13T14:30:00Z", "created_at": "2026-04-13T14:00:00Z", "amount_local": 3225.00, "exchange_rate": 129.00, "settlement_receipt": "SHQ1234ABC", "completed_at": "2026-04-13T14:08:22Z", "redirect_url": "https://yourstore.com/orders/4821/thanks?session_id=cs_7f8a9b2c-...&status=completed", "merchant": { "business_name": "My Store", "logo_url": null } } ``` ### Status values | Status | What it means | | - | - | | `pending` | Waiting for your customer to pay | | `deposit_received` | The payment was detected and is being processed | | `settling` | The payout is in progress | | `completed` | The payout is complete | | `failed` | The payment arrived but the payout didn't complete. Contact support | | `expired` | No payment was received within 30 minutes | ## Full example ```javascript theme={null} // 1. Create session const res = await fetch('https://merchant.minisend.xyz/api/merchant/checkout', { method: 'POST', headers: { 'Authorization': 'Bearer ms_live_your_key_here', 'Content-Type': 'application/json', }, body: JSON.stringify({ amount: 25.00, description: 'Order #4821 - 2x T-shirts', external_id: 'order-4821', }), }); const { checkout_url } = await res.json(); // 2. Redirect res.redirect(checkout_url); // 3. Handle webhook app.post('/webhooks/minisend', (req, res) => { const signature = req.headers['x-minisend-signature']; if (!verifyWebhook(req.body, signature, WEBHOOK_SECRET)) { return res.status(401).send('Invalid signature'); } if (req.body.event === 'checkout.completed') { markOrderPaid(req.body.external_id, { receipt: req.body.receipt, local_amount: req.body.amount_local, currency: req.body.currency, }); } res.status(200).send('OK'); }); ``` See [Webhook verification](/webhooks/verification) for the signature check. # Payment links Source: https://docs.minisend.xyz/payments/payment-links Share a URL to collect USDC or USDT payments with no code. Minisend converts every payment to local currency and sends it to your M-Pesa or bank account. A payment link is a permanent URL for your business. Customers pay in USDC or USDT, and you receive local currency. ## Your URL ```text theme={null} https://merchant.minisend.xyz/pay/{your-slug} ``` Set your slug in **Settings**. Example: `acme-store` → `https://merchant.minisend.xyz/pay/acme-store`. > [!NOTE] > > Changing your slug breaks the old URL. ## Setup **1. Set your slug** In **Settings**, enter a slug under Payment link and click **Save**. **2. Copy the link** The full URL appears in **Settings**. **3. Share it** Use it anywhere a URL works. ## How customers pay The page shows your business name, logo, and a live local-currency preview of the amount. When the customer taps **Pay**, they receive a deposit address and pay in USDC or USDT on any [supported network](/payments/supported-currencies). > [!NOTE] > > Amount range: **\$0.01 to \$10,000** USDC-equivalent. [Contact support](https://t.me/minisendapp) for higher limits. ## What your customer pays For crypto payments, the amount the customer enters is the amount you receive. The fee is added to the customer's total. For NGN payouts, the fee is included in the rate. For **M-Pesa** payments, the customer pays the KES amount they enter, and the fee is deducted from what you receive. To charge the fee to the customer on M-Pesa, use a [checkout session](/payments/checkout-sessions). ## Where to share > [!TIP] > > The link doesn't expire and accepts any number of payments. * **Website**: a "Pay with crypto" button * **Invoices**: paste the URL on PDF or email invoices * **WhatsApp**: send directly to customers * **Social**: bio, pinned posts, story links * **Email**: signature or reply # Supported networks and currencies Source: https://docs.minisend.xyz/payments/supported-currencies Minisend accepts USDC and USDT on six chains, then settles to KES, NGN, GHS, or UGX via M-Pesa, mobile money, and bank transfer. ## Stablecoins One deposit address accepts USDC and USDT on all six networks below. | Network | USDC | USDT | | - | - | - | | **Base** | Fastest | Adds 30 to 50 seconds | | Ethereum | Supported | Adds 30 to 50 seconds | | Polygon | Supported | Adds 30 to 50 seconds | | Arbitrum | Supported | Adds 30 to 50 seconds | | Optimism | Supported | Adds 30 to 50 seconds | | Avalanche | Supported | Adds 30 to 50 seconds | > [!WARNING] > > Payments on any other network aren't detected and can't be returned. Tell customers which networks to use. Need another network? [Contact support](https://t.me/minisendapp). ## Payout currencies | Currency | Country | Methods | | - | - | - | | **KES** | Kenya | M-Pesa, Buy Goods (till), Paybill, bank | | **NGN** | Nigeria | Bank | | **GHS** | Ghana | Mobile money, bank | | **UGX** | Uganda | Mobile money, bank | Set it in **Settings**. It applies to payment links and checkout sessions. ## Fees For crypto payments, the fee is added to the customer's total, so you receive the amount you set. The rate is the same for USDC and USDT and is shown in your dashboard. For M-Pesa payments on a [payment link](/payments/payment-links#what-your-customer-pays), the fee is deducted from what you receive. # Accept your first payment Source: https://docs.minisend.xyz/quickstart Accept your first USDC or USDT payment and receive local currency settlement in five steps, from sign-up to a working checkout session. Five steps from verifying your business to taking a real payment. You'll need a server that can make HTTPS requests, and that's it. **1. Get verified** Sign in at [merchant.minisend.xyz/verify](https://merchant.minisend.xyz/verify) with email or Google and fill in the [business verification](/business-verification) form. We review it within a few hours and email you a link to your dashboard once you're approved. **2. Configure your payout** In **Settings**, set your business name, payout currency (KES, NGN, GHS, or UGX), and payout method (M-Pesa, mobile money, or bank). This is where Minisend sends your local currency after every successful payment. **3. Generate an API key** Open **API Keys** → **New Key**. Copy the `ms_live_...` value immediately; it's shown only once. > [!WARNING] > > Never expose your API key in frontend code or public repos. Call the checkout endpoint from your backend only. **4. Create a checkout session** Do this from your server. `amount` is in USDC, a digital dollar worth 1 US dollar. Your customer can pay it in USDC or the same amount in USDT. ```bash cURL theme={null} curl -X POST https://merchant.minisend.xyz/api/merchant/checkout \ -H "Authorization: Bearer ms_live_your_key_here" \ -H "Content-Type: application/json" \ -d '{ "amount": 25.00, "description": "Order #4821", "external_id": "order-4821" }' ``` ```javascript JavaScript theme={null} const res = await fetch('https://merchant.minisend.xyz/api/merchant/checkout', { method: 'POST', headers: { 'Authorization': 'Bearer ms_live_your_key_here', 'Content-Type': 'application/json', }, body: JSON.stringify({ amount: 25.00, description: 'Order #4821', external_id: 'order-4821', }), }); const session = await res.json(); // Redirect your customer to session.checkout_url ``` Response (`201`): ```json theme={null} { "session_id": "cs_7f8a9b2c-...", "checkout_url": "https://merchant.minisend.xyz/checkout/cs_7f8a9b2c-...", "deposit_address": "0x1234...5678", "amount_usdc": 25.00, "expires_at": "2026-04-13T14:30:00Z", "status": "pending" } ``` If nobody pays within **30 minutes**, the session expires. **5. Send your customer to the payment page** Open `checkout_url` for your customer. They can pay in USDC or USDT on any of six networks, or with M-Pesa. Once you've been paid, we send this message (a webhook) to the URL you set under **Dashboard → Webhooks**: ```json theme={null} { "event": "checkout.completed", "session_id": "cs_7f8a9b2c-...", "amount_usdc": 25.00, "amount_local": 3225.00, "currency": "KES", "exchange_rate": 129.00, "receipt": "SHQ1234ABC", "status": "completed", "external_id": "order-4821", "completed_at": "2026-04-13T14:08:22Z", "created_at": "2026-04-13T14:00:00Z" } ``` Prefer to check yourself? Call the [session status endpoint](/api-reference/get-checkout). It doesn't need an API key. # Wallet API Source: https://docs.minisend.xyz/wallet-api/overview Give every user of your product a real on-chain address, without building or running wallet infrastructure yourself. The Wallet API creates an on-chain address for each user of your product. Call one endpoint with your user's ID to get an address that receives on every network your plan includes. ## No keys to look after Creating an address doesn't give you or your users a private key or recovery phrase to store. There's nothing to create, back up, or lose on your side. ## One address, every network An address is the same on every EVM network your plan includes: Base, Polygon, Arbitrum, Optimism, Ethereum, Avalanche, and Arc. The Free plan is Base only. On paid plans, each wallet also has a separate Solana address in `solana_address`. See [Solana](#solana). **1. Switch on Base** In **Dashboard → Wallets**, activate Base. This creates your master wallet. **2. Create an API key** Create a `wsk_live_` key on the same page. **3. Create an address** Call `POST /api/v1/wallets` with your user's ID. Repeating the call with the same ID returns the same address. ## Detecting deposits Deposits to your addresses are recorded and sent as a [`wallet.deposit.received` webhook](/wallet-api/webhooks). You can also query deposits and balances: > [card] [Get balance](/api-reference/wallet-api/get-balance) > > A wallet's USDC balance per network. > [card] [Get wallet deposits](/api-reference/wallet-api/get-wallet-deposits) > > Deposits to one wallet. > [card] [List all deposits](/api-reference/wallet-api/list-deposits) > > Deposits across your account. ## Moving funds > [card] [Auto-sweep](/api-reference/wallet-api/sweep-config) > > Move balances from user addresses to your master wallet above a threshold. > [card] [Withdraw](/api-reference/wallet-api/withdrawals) > > Send to any external address. > [card] [Transfer between users](/api-reference/wallet-api/transfers) > > Move USDC or USDT between your users on one network. > [card] [Recover a stray token](/api-reference/wallet-api/recover) > > Move out a token other than USDC or USDT. > [card] [Find a deposit](/api-reference/wallet-api/deposits-find) > > Look up a deposit by transaction hash. > [card] [Settlement](/wallet-api/settlement) > > Convert deposits to USDC on one network, at the user's address. A transfer reports `wallet.transfer.completed` or `wallet.transfer.failed`. The recipient doesn't also report a deposit. See [Wallet API webhooks](/wallet-api/webhooks). ## Pricing | Plan | Price | Addresses included | Extra addresses | Networks | Coins | | - | - | - | - | - | - | | Free | \$0 | 100/month | Blocked | Base only | USDC, USDT | | Growth | \$199/mo | 2,000/month | \$0.50 each | Every chain we offer | USDC, USDT | | Enterprise | Contracted | Unlimited | n/a | Every chain we offer | USDC, USDT | Allowances count addresses **created** in the calendar month. On Growth, each address over 2,000 costs \$0.50. Free stops at 100 until the next month. ## Arc Arc works like the other networks, with these differences: * **USDC only.** There's no USDT on Arc. * **Native and token transfers.** USDC sent either as a token transfer or as Arc's native currency counts as a USDC deposit. Amounts are truncated to 6 decimal places. * **Final on arrival.** Arc deposits arrive as `complete`, with one webhook each. A network your plan doesn't include returns `400`. [Contact us](https://t.me/minisendapp) about plans. ## Solana On paid plans, every wallet and master wallet has a Solana address in `solana_address`. It can be `null` briefly after creation. Fetch the wallet again if needed. `solana_address` is separate from `address`, and `SOL` isn't listed in `chains`. * **USDC and USDT** deposits arrive with `chain: "SOL"`. * **Case-sensitive.** Store and compare Solana addresses and signatures exactly as returned. * **Supported:** auto-sweep and [withdrawals](/api-reference/wallet-api/withdrawals#withdrawing-on-solana). * **Not supported on Solana:** [settlement](/wallet-api/settlement), [transfers](/api-reference/wallet-api/transfers), and [token recovery](/api-reference/wallet-api/recover). ## Testing The Wallet API has no test mode. Keys are live and addresses are real. Test with small amounts, and prefix test user IDs, for example `test-`. > [card] [Create your first wallet](/wallet-api/quickstart) > > Activate Base, create a key, and create an address. # Wallet API quickstart Source: https://docs.minisend.xyz/wallet-api/quickstart Activate a chain, generate a key, and issue your first user address in two API calls. This guide gives one user of your product their own address on Base. **1. Switch on Base** Open **Dashboard → Wallets** and activate Base. You only do this once. Every address you create after that sits under it. **2. Create a key** On the same page, create a new API key. We only show it once, so copy it straight away: ```text theme={null} wsk_live_a1b2c3d4e5f6... ``` Keep it on your server, for example in an environment variable. **3. Create an address** Call the create-wallet endpoint with an ID for your user. Any text you'll recognise later works, and your own user ID is a good choice. ```bash theme={null} curl -X POST https://merchant.minisend.xyz/api/v1/wallets \ -H "Authorization: Bearer wsk_live_your_key_here" \ -H "Content-Type: application/json" \ -d '{"walletRef": "user-9214"}' ``` ```json theme={null} { "wallet": { "id": "3f6b2e1a-...", "wallet_ref": "user-9214", "address": "0xabc1230000000000000000000000000000dead", "chain": "BASE", "status": "active", "mode": "live", "metadata": null, "created_at": "2026-07-29T09:00:00.000Z" } } ``` Save `address` with your user. It's where they can receive and hold money. **4. Call it again whenever you like** Sending the same request again, with the same `walletRef`, gives you the same wallet back instead of a second one. So you can call it during signup without first checking whether the user already has an address. ## Using the address on another network Once you've created an address, it already works on every network your plan includes, with nothing more to call. If you want to check that up front, pass `chain`: ```bash theme={null} curl -X POST https://merchant.minisend.xyz/api/v1/wallets \ -H "Authorization: Bearer wsk_live_your_key_here" \ -H "Content-Type: application/json" \ -d '{"walletRef": "user-9214", "chain": "ARB"}' ``` This gives you back the address you already have, not a new one. Each `walletRef` only ever has one address, whichever network you ask about. If you ask for a network your plan doesn't include, you'll get a `400` instead. > [!NOTE] > > Free plan wallets are Base only. Asking for another network returns a `400` until you upgrade. > [!NOTE] > > You can add `metadata` (any JSON object) when you create a wallet. It's a handy place to keep your own details, like an order ID or a plan name, that you'll want back when you fetch the wallet later. # Settlement Source: https://docs.minisend.xyz/wallet-api/settlement Have every deposit convert to USDC and land on one chain, at your user's own address. Settlement converts each new deposit to USDC and moves it to the same user's address on one network you choose. It's off by default. Configure it with [GET/PUT /api/v1/settlement](/api-reference/wallet-api/settlement). > [!NOTE] > > Settlement moves funds to the **user's address** on your settlement network. [Auto-sweep](/api-reference/wallet-api/sweep-config) moves funds to **your master wallet**, and still runs on the settlement network. ## What happens to a deposit With Polygon as the settlement network, a USDT deposit on Ethereum arrives as USDC at the user's Polygon address. * USDC deposits already on the settlement network aren't settled. * Solana isn't supported. Solana deposits stay on Solana. * Deposits below the minimum aren't moved and show `skipped_below_minimum`. ## Keeping track Settled deposits have a `settlement` object. See [get a wallet's deposits](/api-reference/wallet-api/get-wallet-deposits#param-settlement), or wait for [`wallet.deposit.settled`](/wallet-api/webhooks#wallet-deposit-settled). `status` is one of: | Status | What it means | | - | - | | `queued` | Accepted, not started | | `settling` | In progress | | `delayed` | Taking longer than usual. Can still complete | | `settled` | Complete. `amount` and `tx_hash` show what arrived | | `failed` | Didn't complete. See below | | `skipped_below_minimum` | Below the minimum. Not moved | ## If a settlement fails We tell you where the money is, in one of three ways: * **On the network where the deposit arrived.** Safe at your user's own address, in the coin they sent. * **On Base.** Safe at your user's own address, as USDC. * **Under review.** We're still confirming where it is and looking into it. That doesn't mean it's unsafe, only that we won't name a place until we're sure. Whichever it is, the money still belongs to your user. A `failed` settlement means the automatic move didn't finish, not that money is missing. ## Cashing out to M-Pesa or a bank With Base as the settlement network, pay a settled balance out to local currency with an [off-ramp order](/api-reference/offramp/create-order#paying-from-a-wallet-api-address) using `funding_wallet_ref`. Wait for `wallet.deposit.settled` before creating the order. ## Changing your settlement network Changes apply to new deposits only. In-progress settlements aren't redirected. # Wallet API webhooks Source: https://docs.minisend.xyz/wallet-api/webhooks Get notified when a wallet you created receives funds, and when a withdrawal or a transfer between your users completes or fails. We watch every address you create and tell you when money arrives. Set a webhook URL once under [Dashboard → Webhooks](/dashboard/webhooks), and it's used for checkout, off-ramp, onramp, and the Wallet API. To send Wallet API events somewhere else, add an endpoint there and [pick Wallet API for it](/webhooks/overview#more-than-one-endpoint). ## wallet.deposit.received Sent once for every deposit to a wallet you created. It's signed like every other Minisend webhook, with the `X-Minisend-Signature` header and your `webhook_secret`. See [webhook verification](/webhooks/verification). ```json theme={null} { "event": "wallet.deposit.received", "deposit_id": "7b2e1a3f-...", "wallet_id": "3f6b2e1a-...", "wallet_ref": "user-9214", "address": "0xabc1230000000000000000000000000000dead", "chain": "MATIC", "token": "USDC", "amount": "10.500000", "tx_hash": "0x55a572efe1720250e442f38741477a4fc3f7f152e5cd208cc52f8222a1c2a13b", "from_address": "0x9f2c...", "state": "confirmed", "detected_at": "2026-08-07T09:12:03.000Z", "created_at": "2026-08-07T09:12:03.000Z" } ``` **deposit\_id** `string` *required* Use this to spot repeats. If we send an update for the same deposit later, it has the same `deposit_id`. **wallet\_ref** `string` *required* Your own ID for the wallet, exactly as you sent it when you created the address. **chain** `string` *required* The network the money actually arrived on. An address is the same on every network, so a wallet you created on Base can also receive on Polygon, Arbitrum, or any other supported network. Always check this field rather than assuming it's the network you created the wallet on. A deposit to a wallet's Solana address comes with `chain: "SOL"`, and then `address` is the wallet's `solana_address`. **amount** `string` *required* Text, not a number. Store and compare it as an exact decimal, not a floating-point number, so you don't lose precision. **tx\_hash** `string` The blockchain transaction ID. It can be `null` for a moment in the very first message about a deposit. On Solana it's case-sensitive, so compare it exactly. **state** `string` *required* `confirmed` or `complete`. You might get `confirmed` first and `complete` a moment later for the same `deposit_id`. Both mean the money has arrived. > [!NOTE] > > A transfer between two of your own users doesn't send `wallet.deposit.received` for the receiving address. It's reported as [`wallet.transfer.completed`](#wallet-transfer-completed-and-wallet-transfer-failed) instead, so if you counted both, you'd count the money twice. > [!NOTE] > > You can also look up deposits through the API instead of waiting for a webhook. See [get wallet deposits](/api-reference/wallet-api/get-wallet-deposits) and [list all deposits](/api-reference/wallet-api/list-deposits). They're useful for catching up after your server was down, or if you'd rather check yourself. ## wallet.withdrawal.completed and wallet.withdrawal.failed Sent when a withdrawal you asked for with [POST /api/v1/withdrawals](/api-reference/wallet-api/withdrawals), or a recovery with [POST /api/v1/recover](/api-reference/wallet-api/recover), is finished. ```json theme={null} { "event": "wallet.withdrawal.completed", "withdrawal_id": "9f2c4e1a-...", "source": "master", "chain": "BASE", "token": "USDC", "amount": "50.000000", "destination_address": "0x9f2c000000000000000000000000000000dead", "tx_hash": "0x55a572efe1720250e442f38741477a4fc3f7f152e5cd208cc52f8222a1c2a13b", "state": "completed" } ``` **source** `string` `"master"` if the money came from your master wallet. Otherwise, the `wallet_ref` of the address it came from. **tx\_hash** `string` The blockchain transaction ID. `null` on `wallet.withdrawal.failed`, because nothing was sent. **state** `string` *required* `completed` or `failed`. This message doesn't say why a withdrawal failed. You'll find that in your dashboard. You can also check [get a withdrawal](/api-reference/wallet-api/get-withdrawal) instead of, or as well as, waiting for this webhook. ## wallet.transfer.completed and wallet.transfer.failed Sent when a [transfer](/api-reference/wallet-api/transfers) between two of your users is finished. ```json theme={null} { "event": "wallet.transfer.completed", "transfer_id": "8f21c3d0-...", "from": "user-42", "to": "user-7", "chain": "BASE", "token": "USDC", "amount": "12.500000", "tx_hash": "0x9b3e51c7a2d84f06e1b9c3a7d5f2e8b4c6a0d1f3e5b7c9a2d4f6e8b0c1a3d5f7", "state": "completed" } ``` **transfer\_id** `string` *required* Use it together with `event` to spot repeats. **from** `string` *required* The `walletRef` that paid. **to** `string` *required* The `walletRef` that received the money. Credit them when you get this event. **tx\_hash** `string` The blockchain transaction ID. `null` on `wallet.transfer.failed`, because nothing was sent. `wallet.transfer.failed` means nothing moved, and the money is still at the `from` address. In the rare case we can't tell for sure what happened, we don't send `wallet.transfer.failed`, because the money may have moved. [Get a transfer](/api-reference/wallet-api/transfers#getting-one-transfer) shows it as `under_review` while we check. ## wallet.deposit.settled Sent when a deposit has finished moving under your [settlement](/wallet-api/settlement) setting. It's now USDC, at your user's own address, on your settlement network. ```json theme={null} { "event": "wallet.deposit.settled", "deposit_id": "7b2e1a3f-...", "wallet_id": "3f6b2e1a-...", "wallet_ref": "user-9214", "address": "0xabc1230000000000000000000000000000dead", "source_chain": "ETH", "source_token": "USDT", "source_amount": "100.000000", "settlement_chain": "MATIC", "token": "USDC", "amount_settled": "99.410000", "tx_hash": "0x55a572efe1720250e442f38741477a4fc3f7f152e5cd208cc52f8222a1c2a13b", "settled_at": "2026-09-28T09:14:03.000Z" } ``` **source\_chain** `string` *required* The network the original deposit arrived on. **source\_amount** `string` *required* How much the deposit was, in `source_token`, before converting. **amount\_settled** `string` *required* What arrived on `settlement_chain`. Usually a little less than `source_amount`, because converting and moving money between networks both cost something. Your business covers that cost, not your user's recorded deposit. ## wallet.deposit.settlement\_failed Sent when we couldn't move a deposit under your settlement setting. ```json theme={null} { "event": "wallet.deposit.settlement_failed", "deposit_id": "7b2e1a3f-...", "wallet_id": "3f6b2e1a-...", "wallet_ref": "user-9214", "address": "0xabc1230000000000000000000000000000dead", "source_chain": "ETH", "source_token": "USDT", "source_amount": "100.000000", "settlement_chain": "MATIC", "funds_location": "source_chain", "funds_chain": "ETH", "funds_token": "USDT", "message": "Could not be settled. The funds are safe at the user's address on Ethereum, as USDT." } ``` **funds\_location** `string` *required* Where the money is now. `source_chain`: safe at the user's address on the network where it arrived. `base`: safe at the user's address on Base, as USDC. `under_review`: we're still confirming where it is. That doesn't mean it's unsafe, only that we won't say until we're sure. **funds\_chain** `string` Set for `source_chain` and `base`. `null` for `under_review`. **message** `string` *required* A sentence you can show as it is, based on `funds_location`. It's the same wording as the deposit's `settlement.error` field. > [!NOTE] > > There's no separate "delayed" event. A settlement that's taking longer than usual is still moving and can still finish by itself. It shows as `delayed` on the deposit's `settlement` field, and we never report it as failed while that's the case. # Webhook events Source: https://docs.minisend.xyz/webhooks/events Full payload schemas for every checkout and settlement event: pending, completed, failed, expired, forwarded, and the two settlement-failure events, with field descriptions and best practices for idempotent handling. Checkout session events, their payloads, and how to handle them. | Event | Sent when | | - | - | | `checkout.pending` | A payment was detected and is being processed | | `checkout.completed` | You've been paid. The money is yours | | `checkout.failed` | The payment arrived but the payout didn't complete | | `checkout.expired` | No payment was received within 30 minutes | | `checkout.forwarded` | USDC settlement: the USDC reached your settlement network | | `settlement.forward_failed` | USDC settlement: the USDC couldn't be moved to your settlement network | | `settlement.swap_failed` | USDC settlement: a USDT payment couldn't be converted to USDC | *** ## checkout.pending Sent once when a payment is detected. Use it to update your UI. It isn't a payment confirmation. ```json theme={null} { "event": "checkout.pending", "session_id": "cs_7f8a9b2c-...", "external_id": "order-4821", "amount_usdc": 25.00, "amount_expected_usdc": 25.00, "amount_received_usdc": 25.00, "deposit_chain": "ARB", "deposit_tx_hash": "0x9f2c...", "deposit_token": "USDC", "settlement_mode": "fiat", "status": "deposit_received", "created_at": "2026-04-13T14:00:00Z" } ``` **event** `string` *required* Always `checkout.pending`. **deposit\_chain** `string` The network the payment came in on. **deposit\_tx\_hash** `string` The blockchain transaction ID of the payment. **deposit\_token** `string` `USDC` or `USDT`, whichever your customer paid with. **status** `string` *required* Always `deposit_received`. > [!WARNING] > > Don't fulfil orders on `checkout.pending`. Wait for `checkout.completed`. *** ## checkout.completed You've been paid and the money is yours, either as local currency in your account or as USDC in your Minisend wallet. ```json theme={null} { "event": "checkout.completed", "session_id": "cs_7f8a9b2c-...", "external_id": "order-4821", "amount_usdc": 25.00, "amount_expected_usdc": 25.00, "amount_received_usdc": 25.00, "amount_matched": true, "deposit_chain": "BASE", "deposit_tx_hash": "0x9f2c...", "deposit_token": "USDC", "settlement_mode": "fiat", "amount_local": 3225.00, "currency": "KES", "exchange_rate": 129.00, "receipt": "SHQ1234ABC", "status": "completed", "completed_at": "2026-04-13T14:32:00Z", "created_at": "2026-04-13T14:00:00Z" } ``` **event** `string` *required* Always `checkout.completed`. **session\_id** `string` *required* Use it together with `event` to spot repeats. See [best practices](#avoid-handling-the-same-event-twice). **external\_id** `string` Your reference, if you set one. **amount\_usdc** `number` *required* The amount you asked for. **This isn't always what arrived.** See `amount_received_usdc`. **amount\_expected\_usdc** `number` *required* The amount you asked for. Same as `amount_usdc`. Compare it with `amount_received_usdc`. **amount\_received\_usdc** `number` The amount received. **Reconcile on this field, not `amount_usdc`.** **amount\_matched** `boolean` `false` when the amount received differs from the amount requested by more than \$0.01. Review these sessions. **deposit\_chain** `string` The network the payment came in on. **deposit\_tx\_hash** `string` The blockchain transaction ID of the payment. **deposit\_token** `string` `USDC` or `USDT`, whichever your customer paid with. **settlement\_mode** `string` *required* `fiat` or `usdc`. `usdc` events include `fee_usdc`, `amount_usdc_net`, `settlement_chain`, and `forward_required` instead of `amount_local` and `exchange_rate`. **fee\_usdc** `number` USDC only. The fee deducted. **amount\_usdc\_net** `number` USDC only. The amount received minus the fee. **settlement\_chain** `string` USDC only. The network the USDC settles to. **forward\_required** `boolean` USDC only. `true` when the USDC hasn't reached `settlement_chain` yet. Wait for [`checkout.forwarded`](#checkout-forwarded). **amount\_local** `number` Local currency only. What you received after the platform fee. **currency** `string` *required* `KES`, `NGN`, `GHS`, or `UGX` for local currency payouts. `USDC` if you keep USDC. **exchange\_rate** `number` Local currency only. Local currency per 1 USDC at payout. **receipt** `string` *required* For local currency, the payout reference. For USDC, the payment's transaction hash. **status** `string` *required* Always `completed`. **completed\_at** `string` *required* Date and time, ISO 8601. **created\_at** `string` *required* Date and time, ISO 8601. ### When this arrives | Settlement | Typical timing | | - | - | | USDC | Seconds after the payment confirms | | Local currency | Minutes, once the payout completes | | Paid in USDT | 30 to 60 seconds later than above | Whichever applies, by the time you get this event the payment can't be reversed, and it's safe to treat as final. *** ## checkout.failed The payment arrived but the payout didn't complete. ```json theme={null} { "event": "checkout.failed", "session_id": "cs_7f8a9b2c-...", "external_id": "order-4821", "amount_usdc": 25.00, "currency": "KES", "status": "failed", "created_at": "2026-04-13T14:00:00Z" } ``` **event** `string` *required* Always `checkout.failed`. **session\_id** `string` *required* **external\_id** `string` **amount\_usdc** `number` *required* The amount requested. `amount_received_usdc` is included when a payment was received. **currency** `string` *required* **status** `string` *required* Always `failed`. **created\_at** `string` *required* > [!NOTE] > > Send the `session_id` to [support](https://t.me/minisendapp) and we'll sort it out. Your customer's money is not lost. *** ## checkout.expired No payment was received within 30 minutes. ```json theme={null} { "event": "checkout.expired", "session_id": "cs_7f8a9b2c-...", "external_id": "order-4821", "amount_usdc": 25.00, "currency": "KES", "status": "expired", "created_at": "2026-04-13T14:00:00Z" } ``` **event** `string` *required* Always `checkout.expired`. **session\_id** `string` *required* **external\_id** `string` Your reference, if set. **amount\_usdc** `number` *required* The amount requested. **currency** `string` *required* **status** `string` *required* Always `expired`. **created\_at** `string` *required* > [!NOTE] > > Fees apply only to completed payments. *** ## checkout.forwarded USDC settlement to a network other than Base only. The USDC reached `settlement_chain`. ```json theme={null} { "event": "checkout.forwarded", "session_id": "cs_7f8a9b2c-...", "external_id": "order-4821", "amount_usdc": 25.00, "settlement_chain": "ARB", "forward_tx_hash": "0x9f2c...", "status": "completed", "completed_at": "2026-04-13T14:08:22Z", "created_at": "2026-04-13T14:00:00Z" } ``` **event** `string` *required* Always `checkout.forwarded`. **session\_id** `string` *required* **external\_id** `string` **settlement\_chain** `string` *required* The network the USDC arrived on. **forward\_tx\_hash** `string` *required* The transaction hash on that network. > [!NOTE] > > If the move fails, you get `settlement.forward_failed` below instead. Your USDC is safe on Base either way. To check without waiting for an event, look at `forward.status` on the [checkout session](/api-reference/get-checkout). *** ## settlement.forward\_failed USDC settlement only. The USDC couldn't be moved to `settlement_chain`. The checkout itself completed. ```json theme={null} { "event": "settlement.forward_failed", "session_id": "cs_7f8a9b2c-...", "external_id": "order-4821", "settlement_mode": "usdc", "settlement_chain": "ARB", "funds_on_chain": "BASE", "status": "completed", "created_at": "2026-04-13T14:00:00Z" } ``` **event** `string` *required* Always `settlement.forward_failed`. **settlement\_chain** `string` *required* The intended network. **funds\_on\_chain** `string` *required* Where the USDC is. Always `BASE`. > [!NOTE] > > Sent only when the move is final. Send the `session_id` to [support](https://t.me/minisendapp). *** ## settlement.swap\_failed USDC settlement only, for USDT payments. The USDT couldn't be converted to USDC and remains on the network it was paid on. ```json theme={null} { "event": "settlement.swap_failed", "session_id": "cs_7f8a9b2c-...", "external_id": "order-4821", "settlement_mode": "usdc", "settlement_chain": "BASE", "funds_on_chain": "ARB", "funds_token": "USDT", "status": "completed", "created_at": "2026-04-13T14:00:00Z" } ``` **event** `string` *required* Always `settlement.swap_failed`. **funds\_on\_chain** `string` *required* The network the payment was made on, where the funds are. **funds\_token** `string` *required* Always `USDT`. > [!NOTE] > > Always follows `checkout.completed`. Not sent for local-currency settlement. Send the `session_id` to [support](https://t.me/minisendapp). *** ## Best practices ### Reply first, then do the work ```javascript theme={null} app.post('/webhooks/minisend', (req, res) => { res.status(200).send('OK'); processWebhookAsync(req.body); }); ``` ### Avoid handling the same event twice The same event can be delivered more than once with different `X-Minisend-Event-Id` values. Deduplicate on `session_id` and `event`: ```javascript theme={null} async function processWebhookAsync(payload) { const key = `${payload.session_id}:${payload.event}`; const seen = await db.events.findOne({ key }); if (seen) return; await db.events.insert({ key, processed_at: new Date() }); // ...handle event } ``` ### Check settlement\_mode before reading amounts Amount fields differ by `settlement_mode`: ```javascript theme={null} if (payload.event === 'checkout.completed') { if (payload.settlement_mode === 'usdc') { if (payload.forward_required) { // wait for checkout.forwarded before treating funds as arrived } ledger.record(payload.session_id, payload.amount_usdc_net); } else { ledger.record(payload.session_id, payload.amount_local, payload.currency); } } ``` ### Record what arrived, not what you asked for `amount_usdc` is the amount requested. Reconcile on `amount_received_usdc`. ```javascript theme={null} if (payload.event === 'checkout.completed') { const received = payload.amount_received_usdc ?? payload.amount_usdc; if (payload.amount_matched === false) { await ops.flagForReview(payload.session_id, { expected: payload.amount_expected_usdc, received: payload.amount_received_usdc, }); } } ``` ### Match payments to your orders with external\_id ```javascript theme={null} if (payload.event === 'checkout.completed') { await orders.markPaid(payload.external_id, { receipt: payload.receipt, payout_amount: payload.amount_local, currency: payload.currency, }); } else if (payload.event === 'checkout.expired') { await orders.markAbandoned(payload.external_id); } ``` # Webhooks Source: https://docs.minisend.xyz/webhooks/overview Minisend posts a signed event to your server at every stage of a payment, from the moment a deposit is first seen through settlement, forwarding, or a terminal failure. Configure your endpoint, verify signatures, and understand retries. A webhook is a message we send to your server when something happens, so you don't have to keep asking. When a customer's payment shows up, and again when you've been paid, we send a `POST` request to a URL you choose. Each one is signed, so you can check it really came from us. > [!NOTE] > > [Off-ramp orders](/offramp/overview), [onramp orders](/onramp/overview), and the [Wallet API](/wallet-api/webhooks) send their own events (`offramp.*`, `onramp.*`, `wallet.*`), signed the same way. By default they all go to one URL. If you run more than one product, you can [send each product to its own URL](#more-than-one-endpoint). This page covers checkout, since that's where most people start. ## Getting started **1. Add your URL** Go to [Dashboard → Webhooks](/dashboard/webhooks), paste your HTTPS URL (something like `https://yourbusiness.com/webhooks/minisend`), and save. **2. Copy your secret** We create it the first time you open that page and show it once. You'll use it to check every message is really from us. See [Verification](/webhooks/verification). **3. Send yourself a test** The same page has a **Send test** button, so you can make sure everything works before a real payment comes through. > [!WARNING] > > Always check the `X-Minisend-Signature` header before acting on a message. See [Verification](/webhooks/verification). ## More than one endpoint One business account can run several products, for example a shop on checkout and an app on the Wallet API. You don't need a second account for that. Under [Dashboard → Webhooks](/dashboard/webhooks) you can add up to two more endpoints, three in total, and pick which products each one receives: **Checkout**, **Off-ramp**, **Onramp**, and **Wallet API**. * Every endpoint is signed with the same secret, so you verify them all the same way. * Anything no endpoint picks goes to your first endpoint, so narrowing an endpoint never loses events. * If two endpoints both pick a product, both get its events. Each copy is a separate message with its own `X-Minisend-Event-Id` and its own retries, and one endpoint being down never holds up the other. * Checkout events include the two `settlement.*` events, since they're about a checkout's money. To tell your products apart inside one handler instead, read the `event` field (`checkout.*`, `offramp.*`, `onramp.*`, `wallet.*`) and the reference you set when you created the payment (`external_id` on checkouts, `external_reference` on off-ramp and onramp orders). ## What we send, and when A checkout session can send you up to five events, in this order: 1. **`checkout.pending`** when we first see the payment. This is a heads-up, not a confirmation. 2. **`checkout.completed`** when you've been paid, or **`checkout.failed`** if we couldn't finish. If nothing was paid at all, you get **`checkout.expired`** instead. 3. **`checkout.forwarded`**, only if you keep USDC on a network other than Base, once it has arrived there. Two more events cover the rare case where your customer's payment went through but we need to step in on our side: `settlement.forward_failed` and `settlement.swap_failed`. In both cases the money is safe, it's just stuck partway. Full details for all seven are on the [Events](/webhooks/events) page. > [!WARNING] > > `checkout.pending` doesn't mean you've been paid. Use it to tell your customer "we've seen your payment, hang on", never to hand over goods. ## Headers Every message, for any event, comes with these three headers: | Header | Value | | - | - | | `Content-Type` | `application/json` | | `X-Minisend-Signature` | A signature of the message body, so you can check it came from us | | `User-Agent` | `Minisend-Webhooks/1.0` | Checkout and settlement messages (`checkout.*` and `settlement.*`) come with three more: | Header | Value | | - | - | | `X-Minisend-Event-Id` | The ID of this message. If you see the same ID twice, it's the same message being sent again | | `X-Minisend-Delivery-Attempt` | Which attempt this is, starting at 1 | | `X-Minisend-Signature-V2` | `t=,v1=`. A stronger signature that includes the time it was sent, so an old message can't be re-sent by someone else later | > [!NOTE] > > `X-Minisend-Event-Id` identifies one **message**, not one payment. We can occasionally send the same news twice, for example `checkout.completed` for one session, and each copy gets its own ID. To make sure you never fulfil an order twice, use `session_id` and `event` from the message body together as your check, not this header. See [Events](/webhooks/events) for an example. Reply with any `2xx` status within **10 seconds** and we'll treat the message as delivered. If we time out or get a `4xx` or `5xx`, we try again later, so a slow moment on your side doesn't lose anything. ## Retries If a message doesn't get through, we try again on this schedule: | Attempt | Wait before it | | - | - | | 1 | None | | 2 | 30 seconds | | 3 | 2 minutes | | 4 | 8 minutes | | 5 | 32 minutes | | 6 | 2 hours | | 7 | 6 hours | | 8 | 24 hours | That's eight tries over about 33 hours, so a short outage on your side won't make you miss anything. If your server is still down after the last try, we mark the message as failed, and you can [send it again](/dashboard/webhooks#replay) once you're back up. A retry always goes to the endpoint the message was first sent to, at its current URL. If you move a product to a different endpoint, messages already on their way finish at the old one. If you remove an endpoint, we stop retrying its messages. ## Replay [Dashboard → Webhooks](/dashboard/webhooks) lists every message we've sent, with its status and your server's response. You can resend any that failed. A resent message has exactly the same content and ID, with a fresh timestamp and signature, so your server treats it as a retry rather than something new. > [!TIP] > > After five consecutive failed messages to one endpoint, it's marked as down on that page. Once it's fixed, replay what you missed. # Verify webhook signatures Source: https://docs.minisend.xyz/webhooks/verification Use HMAC-SHA256 and the X-Minisend-Signature header to confirm webhook requests came from Minisend. Includes examples in JavaScript, Python, and PHP. Anyone can send a request to your webhook URL, so before you act on one, check it really came from us. Every message we send has an `X-Minisend-Signature` header. It's a fingerprint of the message body made with your `webhook_secret` (technically, an HMAC-SHA256 hex digest). You make the same fingerprint on your side, and if the two match, the message is genuine. > [!NOTE] > > Find your `webhook_secret` under [Dashboard → Webhooks](/dashboard/webhooks). Treat it like a password. > [!WARNING] > > Compare the two with a timing-safe function, like the ones in the examples below. A plain `===` can leak information to an attacker through how long it takes. ## Use the raw body The signature is made from the **exact text we sent**. If you parse the JSON and turn it back into text (`JSON.stringify(req.body)`), the spacing or order can change and the check will fail. So grab the raw body before your framework parses it. In Express, use `express.raw({ type: 'application/json' })` on the webhook route. ## Verify ```javascript JavaScript theme={null} const crypto = require('crypto'); function verifyWebhook(rawBody, signature, secret) { const expected = crypto .createHmac('sha256', secret) .update(rawBody, 'utf8') .digest('hex'); const a = Buffer.from(signature, 'hex'); const b = Buffer.from(expected, 'hex'); if (a.length !== b.length) return false; return crypto.timingSafeEqual(a, b); } ``` ```python Python theme={null} import hmac, hashlib def verify_webhook(raw_body: bytes, signature: str, secret: str) -> bool: expected = hmac.new( secret.encode('utf-8'), raw_body, hashlib.sha256, ).hexdigest() return hmac.compare_digest(signature, expected) ``` ```php PHP theme={null} ,v1=`. It includes the time we sent the message, so if someone copied an old message, they couldn't send it to you again later. `X-Minisend-Signature` is staying and works everywhere. V2 is there if you want the extra protection. ```javascript theme={null} function verifyWebhookV2(rawBody, header, secret, toleranceSeconds = 300) { const parts = Object.fromEntries(header.split(',').map((kv) => kv.split('='))); const age = Math.abs(Date.now() / 1000 - Number(parts.t)); if (age > toleranceSeconds) return false; const expected = crypto .createHmac('sha256', secret) .update(`${parts.t}.${rawBody}`) .digest('hex'); const a = Buffer.from(parts.v1, 'hex'); const b = Buffer.from(expected, 'hex'); if (a.length !== b.length) return false; return crypto.timingSafeEqual(a, b); } ``` Not every message has this header. Off-ramp, onramp, and Wallet API events only send `X-Minisend-Signature`. So use V2 when it's there, and fall back to the first check when it isn't. ## Full Express handler ```javascript theme={null} const express = require('express'); const crypto = require('crypto'); const app = express(); // Raw body required for signature verification app.use( '/webhooks/minisend', express.raw({ type: 'application/json' }), ); function verifyWebhook(rawBody, signature, secret) { const expected = crypto.createHmac('sha256', secret).update(rawBody, 'utf8').digest('hex'); const a = Buffer.from(signature, 'hex'); const b = Buffer.from(expected, 'hex'); if (a.length !== b.length) return false; return crypto.timingSafeEqual(a, b); } app.post('/webhooks/minisend', (req, res) => { const signature = req.headers['x-minisend-signature']; if (!signature) return res.status(401).json({ error: 'Missing signature' }); if (!verifyWebhook(req.body, signature, process.env.MINISEND_WEBHOOK_SECRET)) { return res.status(401).json({ error: 'Invalid signature' }); } const payload = JSON.parse(req.body.toString('utf8')); // Acknowledge immediately, then process res.status(200).send('OK'); switch (payload.event) { case 'checkout.completed': markOrderPaid(payload.external_id, { session_id: payload.session_id, receipt: payload.receipt, amount_local: payload.amount_local, currency: payload.currency, }); break; case 'checkout.failed': handleFailedPayment(payload.external_id, payload.session_id); break; case 'checkout.expired': handleExpiredSession(payload.external_id, payload.session_id); break; } }); app.listen(3000); ``` > [!TIP] > > Reply with `2xx` first, then do your own processing. If you take more than 10 seconds to reply, we'll send the message again.