QuickPay QR — El Salvador, Honduras and Costa Rica
QuickPay QR is the only rail wired on the alternative-payments /payments endpoint for these three countries. The integration is identical in all three — only the phone prefix and the merchant currency change. (In Guatemala the same rail runs alongside others; see Guatemala.)
| Country | E.164 prefix | Currency |
|---|---|---|
| El Salvador | +503 | USD |
| Honduras | +504 | HNL |
| Costa Rica | +506 | CRC |
Setup
Set these variables in your shell before running any curl. The host (sb-mw.migopayments.com) and the path (/api/v1/integrations/...) are the public sandbox reachable by external integrators. The Alternative Payments routes accept the 64-char merchant token as a Bearer token.
export MIGO_BASE="https://sb-mw.migopayments.com"
export MIGO_CLIENT="<your-client-slug>"
export MIGO_TOKEN="<your-64-char-merchant-token>" # 64 hex chars
export MIGO_USER_ID="+50600000000" # use your country's prefix
export UID=$(
curl -s -X POST "$MIGO_BASE/api/v1/integrations/transactions" \
-H "Authorization: Bearer $MIGO_TOKEN" \
-H "Content-Type: application/json" \
-d "{
\"amount\": 250000,
\"channel\": \"web\",
\"client\": \"$MIGO_CLIENT\",
\"userId\": \"$MIGO_USER_ID\",
\"customKeys\": { \"orderId\": \"recipe-test\" }
}" | jq -r '.data.uid'
)
Inspect the returned paymentMethods to confirm which rails your client has enabled; they are resolved at runtime from clientConfig.processors.
Process the payment (quickPayQR)
Interbank QR aggregator. It needs no pre-call to payment-intents and returns a json payload.
curl -X POST "$MIGO_BASE/api/v1/integrations/transactions/$UID/payments" \
-H "Authorization: Bearer $MIGO_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "processor": "quickPayQR", "data": {} }'
The response type and data come straight from the processor's paymentRequest:
{
"success": true,
"message": "Success",
"data": {
"transaction_id": "…",
"type": "<paymentRequest.type>",
"data": "<paymentRequest.data>",
"cancelAt": null
}
}
Render the QR payload from data.data. The payment status arrives later through the merchant callback configured in clientConfig.callback — see Merchant Generic Callback.
quickPayQR supports revert via POST $MIGO_BASE/revert with body {"transactionUid":"$UID","processor":"quickPayQR"}. That surface uses the JWT-Bearer scheme, separate from the merchant token used here.
Errors
The alternative-payments middleware returns 4-digit codes in error.code, not the ALI Gateway 7xxx catalog:
| HTTP | error.code | When |
|---|---|---|
| 400 | 5000 | Missing or invalid params (amount, channel, client, userId, customKeys, processor) |
| 400 | — | processor not allowed for this client |
| 400 | 5004 | Client config not found |
| 400 | 2002 | Transaction create failed |
| 400 | 2003 | Amount outside the allowed range |
See the Error catalog for the full description of each code.
Related
- Integration recipes — country × rail matrix
- Guatemala — the same rail alongside Zigi, Akisi, Banco Industrial, BAM and Pronet
- Available payment methods — country-filtered catalog