This document outlines how to initiate a transaction using the Facilero Hosted Payment Page (HPP) via the Payment Intent API. After creating the intent, you will receive a redirectUrl to send the user to a secure Facilero-hosted checkout page. Upon completion, a server-to-server callback will notify your system of the transaction result.
API Endpoint
Live
POST https://live.facilero.com/api/v1/payments/intentSandbox
POST https://sandbox.facilero.com/api/v1/payments/intentRequest Headers
| Header | Type | Required | Description |
|---|---|---|---|
Content-Type | string | Yes | Must be application/json. |
Referer | string | No | Optional HTTP referrer for context. |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
requestId | String | Yes | Unique identifier for this request. |
mid | String | Yes | Merchant Account ID assigned by Facilero. |
amount | String | Yes | Payment amount (e.g. "100.00"). |
currency | String | Yes | ISO 4217 currency code (e.g. "USD", "EUR"). |
lang | String | Yes | Language code for displaying the payment page. |
billingDetails | Object (BillingDetails) | Yes | Customer billing information. See below. |
callbackUrl | String | Yes | Webhook URL to receive transaction status updates. |
successRedirectUrl | String | Yes | URL to redirect the user after successful payment. |
failureRedirectUrl | String | Yes | URL to redirect the user after failed or cancelled payment. |
order | Object (Order) | Yes | Order-specific information. |
device | Object (Device) | Yes | Device metadata for risk analysis. |
kycVerified | Boolean | No | Whether the user is KYC verified. |
previousPaymentCount | Long | No | Number of previous payments by the user. |
BillingDetails Object
| Field | Type | Required | Description |
|---|---|---|---|
externalUserId | String | No | External user ID in your system. |
firstName | String | No | Customer’s first name. |
lastName | String | No | Customer’s last name. |
address1 | String | No | Billing address line 1. |
city | String | No | City. |
state | String | No | State or province. |
country | String | No | ISO Alpha-2 country code (e.g., "US"). |
postalCode | String | No | Postal/ZIP code. |
phone | String | No | Phone number. |
email | String | Yes | Email address. |
dateOfBirth | String | No | Format: YYYY-MM-DD. |
Note:
For certain payment methods (such as e-wallets, vouchers, or localized APMs), full billing details may be required to complete the transaction.
If any of the required fields are not provided during the API request, the user will be prompted to enter the missing information directly on the Facilero Hosted Payment Page (HPP) before continuing with the payment.
Order Object
| Field | Type | Required | Description |
|---|---|---|---|
date | String | No | Date of the order. |
orderId | String | No | Unique identifier for the order. |
title | String | No | Title or name of the order. |
siteId | String | No | Site identifier where the order was placed. |
name | String | No | Customer's name for the order. |
domainName | String | No | Domain name where the order was placed. |
Device Object
| Field | Type | Required | Description |
|---|---|---|---|
deviceId | String | No | Unique identifier for the device. |
fingerprintData | String | No | Device fingerprint data for risk assessment. |
ip | String | Yes | Customer's IP address. |
accept | String | No | Browser's accept header. Required for 3D Secure transactions |
acceptLanguage | String | No | Language accepted by the browser. Required for 3D Secure transactions |
userAgent | String | Yes | User-Agent header for identifying the browser. |
javaEnabled | Boolean | No | Flag indicating whether Java is enabled. Required for 3D Secure transactions |
javaScriptEnabled | Boolean | No | Flag indicating whether JavaScript is enabled. Required for 3D Secure transactions |
deviceLanguage | String | No | Language set on the device. Required for 3D Secure transactions |
colorDepth | String | No | Screen color depth in bits. Required for 3D Secure transactions |
screenHeight | String | No | Screen height in pixels. Required for 3D Secure transactions |
screenWidth | String | No | Screen width in pixels. Required for 3D Secure transactions |
deviceTimezone | String | No | Timezone of the device. Required for 3D Secure transactions |
Response Body
| Field | Type | Description |
|---|---|---|
redirectUrl | String | URL to redirect the user to the Facilero Hosted Payment Page. |
iframeUrl | String | Reserved for iframe integrations (currently null). |
errorCode | String | Returned if there was an error creating the payment intent. |
Example Response
{
"redirectUrl": "https://checkout.facilero.com/pay/abcde12345",
"iframeUrl": null,
"errorCode": null
}Redirect Flow
- After receiving the
redirectUrl, redirect the customer to the Facilero Hosted Payment Page (HPP). - The HPP will display payment options based on the user’s region, preferences, and available methods.
- If required billing fields were not included in the original request, the user will be prompted to complete them on the HPP.
- After the transaction is completed or cancelled:
- The customer is redirected to
successRedirectUrlorfailureRedirectUrl. - A server-to-server callback is sent to your
callbackUrl.
Below is a single, consolidated section that merges the old and new content, removes duplication, and cleanly explains callback parsing behavior for S2S, HPP, Card, and APM flows.
You can replace the existing callback section with this as-is.
Webhook Callback Behavior (S2S, HPP, Cards, and APMs)
Upon transaction completion, Facilero sends a server-to-server (S2S) webhook callback to the callbackUrl provided during transaction creation.
This applies to:
- Direct S2S integrations
- Hosted Payment Page (HPP) flows
- Card payments
- Alternative Payment Methods (APMs)
All callbacks are delivered as HTTP POST requests with a JSON payload and identifying query parameters.
Why Callback Identification Is Required
In HPP flows, the final payment method is not known at transaction creation time.
The end user selects the payment option later in the checkout flow (Card or a specific APM).
As a result:
- The transaction lifecycle may resolve to different DTOs
- The callback payload structure depends on the payment method actually used
To guarantee deterministic webhook handling, Facilero explicitly identifies the resolved payment method in every callback.
Callback Identification Fields
Facilero provides identifiers that allow merchants to determine the expected payload structure before parsing the request body.
1) paymentMethod (Query Parameter)
paymentMethod (Query Parameter)All webhook callbacks include the paymentMethod query parameter appended to the callback URL.
| Parameter | Type | Possible Values | Description |
|---|---|---|---|
paymentMethod | String | card, apm | High-level payment method category |
This parameter is always present.
2) apmType (Query Parameter and Payload Field)
apmType (Query Parameter and Payload Field)When paymentMethod=apm, Facilero also provides apmType.
| Field / Parameter | Type | Description |
|---|---|---|
apmType | String | Specific APM selected by the end user |
Characteristics:
-
Present only when
paymentMethod=apm -
Value comes from the Supported Payment Methods (
PaymentMethod) enum -
Included both:
- as a query parameter
- inside the callback payload
-
Enables routing and parsing decisions without inspecting the payload structure
Callback URL Examples
If the original callback URL is:
https://merchant.com/payment-statusCard Payment
POST https://merchant.com/payment-status?paymentMethod=cardPayload format:
- Merchant Callback DTO (Card)
APM Payment
POST https://merchant.com/payment-status?paymentMethod=apm&apmType={APM_METHOD}Example:
POST https://merchant.com/payment-status?paymentMethod=apm&apmType=UPI_QRPayload format:
- ApmPaymentTxInfoDto
- Includes
apmResponseData
Expected Callback Payloads
Card Payments
If paymentMethod=card:
- The JSON body conforms to Merchant Callback DTO
- Used for all card-based flows (including HPP)
📘 Reference:
Merchant Callback DTO
https://api.facilero.com/reference/payments#/example-response-body
APM Payments
If paymentMethod=apm:
- The JSON body conforms to ApmPaymentTxInfoDto
- Includes APM-specific response data
| Field | Type | Description |
|---|---|---|
apmResponseData | ApmResponseData | Data required to continue the APM flow (redirect, iframe, polling, etc.) |
The structure of apmResponseData depends on apmType.
📘 Reference:
ApmPaymentTxInfoDto
https://api.facilero.com/reference/payment#/callback-data-object-apmpaymenttxinfodto
Parsing APM Callbacks (apmResponseData)
apmResponseData)apmResponseData varies by APM provider and flow type.
Guidelines:
- Use
apmTypeto select the correct parser - Expect different fields per APM
- Follow the APM-specific UX instructions (redirect, iframe rendering, polling, confirmations)
⚠️ Important
Do not assume a common structure across all APMs.
Parsing and user flow handling must be driven by apmType.
APM-Specific Documentation
Each supported apmType has dedicated documentation describing:
apmResponseDataschema- Redirect vs iframe behavior
- Required follow-up actions
- Provider-specific notes and edge cases
Use the apmType value from the callback to navigate to the relevant APM documentation page.
Processing Guidance
- Read
paymentMethodfrom the callback URL to determine Card vs APM - When
paymentMethod=apm, readapmTypeto select the correct APM schema - Parse the payload using the matching DTO
- For HPP flows, rely on callback identifiers rather than the original request intent
✅ Result
A single webhook endpoint can reliably handle Card and all APM callbacks with predictable parsing and flow control.

