Callback Identification
How to route Card, APM, and HPP callbacks using paymentMethod and apmType query parameters
When using HPP or accepting multiple payment methods, Exirom appends explicit identifiers to every callback URL so you can determine the correct DTO and parsing logic before reading the body.
#Identification Fields
#paymentMethod (Query Parameter)
All callbacks are sent as HTTP POST requests. Exirom appends paymentMethod to the callback URL regardless of the original callbackUrl provided.
| Parameter | Possible Values | Description |
|---|---|---|
paymentMethod | card, apm | High-level payment method category |
#apmType (Query Parameter and Payload Field)
When paymentMethod=apm, apmType is appended to the URL and included in the payload body.
| Field / Parameter | Type | Description |
|---|---|---|
apmType | String | Specific APM selected by the user |
- Present only when
paymentMethod=apm - Value matches the Supported Payment Methods (
PaymentMethod) enum - Use it to select the correct parser before reading the body
#Callback URL Examples
Given the original callback URL:
https://merchant.com/payment-statusExirom invokes one of the following:
Card payment:
POST https://merchant.com/payment-status?paymentMethod=cardAPM payment:
POST https://merchant.com/payment-status?paymentMethod=apm&apmType={APM_METHOD}Example:
POST https://merchant.com/payment-status?paymentMethod=apm&apmType=UPI_QR#Parsing APM Callbacks (apmResponseData)
When paymentMethod=apm, the callback payload contains an apmResponseData field whose structure varies by apmType.
| Field | Type | Description |
|---|---|---|
apmResponseData | ApmResponseData | APM-specific data for redirecting the user or rendering an iframe |
Do not assume
apmResponseDatahas the same shape for all APMs. Always route parsing based onapmType.
Navigate to the relevant APM documentation page using the apmType value — each page describes the expected fields, redirect vs iframe behavior, and any required follow-up actions.
#Routing Summary
| Signal | Action |
|---|---|
paymentMethod=card | Parse using Card callback DTO |
paymentMethod=apm | Read apmType → parse using APM-specific DTO |
| HPP flow | Rely on callback identifiers — payment method is unknown at request time |
A single webhook endpoint can handle Card and all APM callbacks deterministically using these two query parameters.
#Related
- APM Response Data Examples —
apmResponseDataschemas by APM type - Webhook Best Practices — signature verification, deduplication, polling fallback