API request
POST /developers/v1/terminal-payments
Push amount + currency to a signed-in terminal for CRM/POS checkout.
curl -X POST "https://api.mainmoney.net/api/v2/developers/v1/terminal-payments" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{"terminalId":"POS-ABC123-001","businessId":"biz_...","amount":1.03,"currencyCode":"USD","merchantReference":"crm-order-1001","metadata":{"table":"12"},"expiresInSeconds":300}'Happy path only. Base URL: https://api.mainmoney.net/api/v2.
The cashier always chooses palm / phone / QR / cash on the terminal. Your API only pushes amount and currency.
client_id, client_secret, and webhook signing secretcurl -X POST https://api.mainmoney.net/api/v2/developers/oauth/token \
-H 'Content-Type: application/json' \
-d '{
"grant_type": "client_credentials",
"client_id": "mm_test_...",
"client_secret": "YOUR_SECRET"
}'
Export TOKEN from data.access_token. Use Authorization: Bearer $TOKEN below.
curl https://api.mainmoney.net/api/v2/developers/v1/merchants \
-H "Authorization: Bearer $TOKEN"
OPERATING — single business (optional businessId later)GROUP — pick a child businessId for the next stepscurl "https://api.mainmoney.net/api/v2/developers/v1/terminals?businessId=BUSINESS_ID" \
-H "Authorization: Bearer $TOKEN"
Note a terminalId (e.g. POS-ABC123-001) that is online / recently used.
curl -X POST https://api.mainmoney.net/api/v2/developers/v1/terminal-payments \
-H "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"terminalId": "POS-ABC123-001",
"businessId": "BUSINESS_ID",
"amount": 1.03,
"currencyCode": "USD",
"merchantReference": "crm-order-1001",
"metadata": { "table": "12", "waiter": "alice" }
}'
The signed-in terminal prefills 1.03 USD. Default TTL is 5 minutes.
Configure your app webhookUrl. On completion you receive terminal_payment.completed (also failed / cancelled / expired).
Verify X-Mainmoney-Signature as HMAC-SHA256 of the raw body with your whsec_… secret. Details: Terminal payment webhooks.
curl -X POST https://api.mainmoney.net/api/v2/developers/v1/terminal-payments/{id}/simulate-complete \
-H "Authorization: Bearer $TOKEN"
Sandbox only — fires the completed webhook without a real device charge.