Payment Link Quick Start
End-to-end walkthrough: the merchant backend creates a transaction, the customer pays in Migo's hosted webview, and the merchant receives the result via webhook.
ββ merchant backend βββ
β 1. POST β /transactions βββββββΊ
β (auth: token) β
β β βββββ 2. uid + URL
βββββββββββββββββββββββ
β 3. send URL to customer
βΌ
ββ customer βββββββββββββββββββββββββββββββββββ
β 4. opens the hosted webview at the URL β
β and pays there: enters card data, β
β chooses installments, completes 3DS β
ββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
ββ merchant backend βββ
β 5. receives result β βββββ webhook (terminal status)
βββββββββββββββββββββββ
1. Create the transaction (merchant backend)β
The recommended path for a backend integration is POST /transactions with your merchant token in the Authorization header. Send the raw value Migo issued for your application β the raw token (no Bearer prefix) is the recommended form, though the authorizer tolerates and strips a leading Bearer if present.
curl -X POST https://sb-mw.migopayments.com/transactions \
-H 'Content-Type: application/json' \
-H 'Authorization: <your-sandbox-token>' \
-d '{
"amount": 125.50,
"userId": "+50212345678",
"channel": "wa",
"client": "your-client-slug",
"currency": "GTQ",
"externalId": "ORD-2026-0429-001",
"ads": []
}'
Response:
{
"uid": "trx_8f3c2b1d9e7a",
"reference": "CLIENT020007SB",
"URL": "https://sandbox.migopayments.com/?orderId=trx_8f3c2b1d9e7a"
}
The hosted webview link is delivered in URL (capital U-R-L), not url β see Create a Payment Link β Successful response.
Send the value of URL to the customer (WhatsApp, SMS, email β any channel works).
The full request-body reference β required and optional fields, allowed values, and error codes β is in Create a Payment Link.
Live spec entries:
POST /transactions(bearer auth).
2. The customer opens the hosted webviewβ
Migo serves the hosted webview at the issued URL. When the customer opens it, the webview resolves the client configuration and the enabled processors and renders the payment UI automatically β there is nothing for you to call here.
See Hosted webview for details.
3. The customer completes the payment in the webviewβ
Everything in this step happens inside Migo's hosted webview β the integrator does nothing here.
Inside the webview the customer:
- enters their card details in the payment form,
- chooses the number of installments (when the processor supports them),
- and confirms the payment.
If the processor requires 3D Secure, the webview presents the challenge to the customer and collects the response. Migo then tokenizes the card and charges the transaction internally; no integrator API call is involved.
See Hosted webview for how the checkout (including any 3D Secure challenge) behaves.
4. Receive the result (merchant backend)β
Migo notifies the merchant once the transaction reaches a terminal status (approved, denied, refunded, reversed). The Payment Link product uses the Merchant Generic Callback β an outbound POST from Migo to a URL you registered with support, carrying { uid, reference, status, amount, currency, ... }.
| Mechanism | Direction | When | Documentation |
|---|---|---|---|
| Merchant Generic Callback | Migo β your backend | Transaction reaches terminal status | Merchant Generic Callback |
| Processor β Migo callback | Processor β Migo (internal) | Processor confirms outcome | Inbound processor hooks |
The Generic Callback does not sign the body with HMAC β authenticity is delegated to the merchant via a static API key/header you register with Migo. See Merchant Generic Callback β Authenticating the request.
Relatedβ
- Sandbox Quickstart β base URLs, test cards, sample payloads ready to copy
- React quickstart (Payment Link) β copy-paste form that calls
/transactionsand renders the link - Normalized payment details (
paymentInfo) β the payment summary (card, payer, 3D Secure) returned byGET /transactions