For the complete documentation index, see llms.txt. This page is also available as Markdown.

Getting Started

Make your first API call in minutes

This guide walks you through creating a recipient, getting a quote, and initiating a transfer via the Madhouse Wallet off-ramp API.


1. Get an API Key

Sign in at business.madhousewallet.com and navigate to Developers → API Keys. Create a new key. The full key is shown once — copy it immediately.

mw_live_<keyId>_<secret>

Include it on every request:

Authorization: Bearer mw_live_xxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

2. Fetch Account Requirements

Before creating a recipient, fetch the required fields for the target currency. Different currencies require different inputs (routing numbers, IBANs, sort codes, UPI handles, etc.).

curl https://business.madhousewallet.com/api/payouts/account-requirements \
  -H "Authorization: Bearer $API_KEY" \
  -G -d "source=USD" -d "target=KES" -d "sourceAmount=500"

The response returns an array of field groups. Render each field according to its type (text, select, radio) and respect validationRegexp and minLength/maxLength.

If a field has refreshRequirementsOnChange: true, POST the current form state back to this endpoint when that field changes to get updated requirements.


3. Create a Recipient

Response:

Save the recipient id — you'll use it to get quotes and create transfers.


4. Get a Quote

Response includes:

Quotes are valid for 5 minutes. Pass quoteId to the next step.


5. Initiate the Transfer

Response:


6. Send USDC

Send exactly amount USDC from source_wallet to escrow_wallet on any supported chain:

  • Arbitrum

  • Base

  • Ethereum Mainnet

  • Optimism

  • Polygon

  • Solana

The platform detects the deposit on-chain, converts to fiat, and routes to the recipient's bank account automatically.


7. Poll for Status

Status
Meaning

pending

Awaiting USDC deposit

awaiting_deposit

Deposit address issued

deposit_sent

USDC confirmed on-chain

processing

Converting and routing funds

completed

Funds delivered to recipient

failed

Contact support with transfer_id

Poll every 5 seconds. Stop polling on completed or failed.


Next Steps

Last updated

Was this helpful?