Pay-ins & Payouts
Collect stablecoin payments and disburse funds to wallets, bank accounts, or local rails.
Pay-ins increase your available balance. Payouts move value from that balance to external destinations.
Pay-in intent
curl "$M2_BASE_URL/v1/payins" \
-H "Authorization: Bearer $M2_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": "150.00",
"currency": "USDC",
"customer_id": "cus_01JEXAMPLE",
"metadata": {
"invoice_id": "inv_2048"
}
}'Payout request
curl "$M2_BASE_URL/v1/payouts" \
-H "Authorization: Bearer $M2_API_KEY" \
-H "Idempotency-Key: payout-vendor-4401" \
-H "Content-Type: application/json" \
-d '{
"amount": "500.00",
"currency": "USDC",
"destination": {
"type": "wallet",
"network": "ethereum",
"address": "0x0000000000000000000000000000000000000000"
},
"metadata": {
"vendor_id": "vendor_4401"
}
}'Status model
| Status | Pay-in meaning | Payout meaning |
|---|---|---|
pending | Awaiting funds | Queued for processing |
processing | Confirmation in progress | Delivery in progress |
completed | Funds are available | Destination received funds |
failed | Funds were not accepted | Delivery failed |
rejected | Risk controls blocked payment | Risk controls blocked payout |
Reconciliation
Store your internal IDs in metadata. Use M2Square IDs as immutable external references in your ledger and support tools.