When you initiate an APM payment, the response includes an apmResponseData.actionType field that determines what happens next. There are three flow types: Redirect, QR Code, and Server-to-Server (S2S).
All three flows use the same API endpoint and the same webhook-based final result. The difference is what happens between the initial response and the webhook.
The webhook callback is always the source of truth for the final transaction result. Do not rely on redirects, QR confirmation, or the initial response.
Quick Reference
| actionType | Customer Action | You Handle | Example APMs |
|---|---|---|---|
REDIRECTION | Redirected to provider page | Redirect or iframe | PayPal, iDEAL, Skrill, SEPA, Giropay |
QR | Scans QR with payment app | Display QR or deep link | PIX, Alipay, WeChat Pay, UPI, BLIK |
NONE | No action required | Wait for webhook | Bank transfers, some voucher methods |
Flow 1: Redirect (actionType = REDIRECTION)
actionType = REDIRECTION)The customer is redirected to the payment provider to complete authentication and authorization.
- Receive
transactionStatus: "CUSTOMER_VERIFICATION"withapmResponseData.redirectUrl(and optionallyiframeUrl) - Redirect the customer to
redirectUrlor embediframeUrl - Customer completes authentication
- Provider redirects back to your
successRedirectUrlorfailureRedirectUrl - Final result arrives via webhook
Redirect vs Iframe
| Option | Best For | Consideration |
|---|---|---|
redirectUrl | Mobile and simple flows | Customer leaves your site |
iframeUrl | Desktop checkout | Some providers block iframe usage |
If both are available, use iframe on desktop and redirect on mobile.
Flow 2: QR Code (actionType = QR)
actionType = QR)Used when the customer scans a QR code with a mobile payment app.
- Receive
transactionStatus: "CUSTOMER_VERIFICATION"with:qrData(Base64 QR image)qrDeepLinkqrCodeImageUrl
- On desktop: display QR for scanning
- On mobile: open deep link
- Customer stays on your page during payment
- Final result arrives via webhook
QR Expiration
QR codes usually expire within 1–5 minutes. Show a countdown and allow regeneration. Do not reuse expired QR codes.
Flow 3: Server-to-Server (actionType = NONE)
actionType = NONE)No customer interaction after the request.
The response can be:
- Final (
SUCCEEDorFAILED) - Async (
PROCESSINGorPENDING)
If async:
- Wait for webhook
- Poll after ~5 minutes only as fallback
Common Patterns
| Pattern | Recommendation |
|---|---|
| Customer closes browser mid-flow | Webhook still determines final state |
| QR expires | Allow refresh and retry |
| S2S stuck in processing | Wait for webhook, then poll if needed |
| Both redirect and iframe provided | Use iframe on desktop |
| Duplicate webhooks | Handle idempotently |
| Redirect shows success but webhook fails | Trust webhook |
Related
- API Reference: POST /api/v1/payments/apm
- Handling the Callback
- Checksum Authentication
- APM Payload References

