Payment Intent API Documentation


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/intent

Sandbox

POST https://sandbox.facilero.com/api/v1/payments/intent

Request Headers

HeaderTypeRequiredDescription
Content-TypestringYesMust be application/json.
RefererstringNoOptional HTTP referrer for context.

Request Body

FieldTypeRequiredDescription
requestIdStringYesUnique identifier for this request.
midStringYesMerchant Account ID assigned by Facilero.
amountStringYesPayment amount (e.g. "100.00").
currencyStringYesISO 4217 currency code (e.g. "USD", "EUR").
langStringYesLanguage code for displaying the payment page.
billingDetailsObject (BillingDetails)YesCustomer billing information. See below.
callbackUrlStringYesWebhook URL to receive transaction status updates.
successRedirectUrlStringYesURL to redirect the user after successful payment.
failureRedirectUrlStringYesURL to redirect the user after failed or cancelled payment.
orderObject (Order)YesOrder-specific information.
deviceObject (Device)YesDevice metadata for risk analysis.
kycVerifiedBooleanNoWhether the user is KYC verified.
previousPaymentCountLongNoNumber of previous payments by the user.

BillingDetails Object

FieldTypeRequiredDescription
externalUserIdStringNoExternal user ID in your system.
firstNameStringNoCustomer’s first name.
lastNameStringNoCustomer’s last name.
address1StringNoBilling address line 1.
cityStringNoCity.
stateStringNoState or province.
countryStringNoISO Alpha-2 country code (e.g., "US").
postalCodeStringNoPostal/ZIP code.
phoneStringNoPhone number.
emailStringYesEmail address.
dateOfBirthStringNoFormat: 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

FieldTypeRequiredDescription
dateStringNoDate of the order.
orderIdStringNoUnique identifier for the order.
titleStringNoTitle or name of the order.
siteIdStringNoSite identifier where the order was placed.
nameStringNoCustomer's name for the order.
domainNameStringNoDomain name where the order was placed.

Device Object

FieldTypeRequiredDescription
deviceIdStringNoUnique identifier for the device.
fingerprintDataStringNoDevice fingerprint data for risk assessment.
ipStringYesCustomer's IP address.
acceptStringNoBrowser's accept header. Required for 3D Secure transactions
acceptLanguageStringNoLanguage accepted by the browser. Required for 3D Secure transactions
userAgentStringYesUser-Agent header for identifying the browser.
javaEnabledBooleanNoFlag indicating whether Java is enabled. Required for 3D Secure transactions
javaScriptEnabledBooleanNoFlag indicating whether JavaScript is enabled. Required for 3D Secure transactions
deviceLanguageStringNoLanguage set on the device. Required for 3D Secure transactions
colorDepthStringNoScreen color depth in bits. Required for 3D Secure transactions
screenHeightStringNoScreen height in pixels. Required for 3D Secure transactions
screenWidthStringNoScreen width in pixels. Required for 3D Secure transactions
deviceTimezoneStringNoTimezone of the device. Required for 3D Secure transactions

Response Body

FieldTypeDescription
redirectUrlStringURL to redirect the user to the Facilero Hosted Payment Page.
iframeUrlStringReserved for iframe integrations (currently null).
errorCodeStringReturned if there was an error creating the payment intent.

Example Response

{
  "redirectUrl": "https://checkout.facilero.com/pay/abcde12345",
  "iframeUrl": null,
  "errorCode": null
}

Redirect Flow

  1. After receiving the redirectUrl, redirect the customer to the Facilero Hosted Payment Page (HPP).
  2. The HPP will display payment options based on the user’s region, preferences, and available methods.
  3. If required billing fields were not included in the original request, the user will be prompted to complete them on the HPP.
  4. After the transaction is completed or cancelled:
  • The customer is redirected to successRedirectUrl or failureRedirectUrl.
  • A server-to-server callback is sent to your callbackUrl.

Callback Behavior

Upon transaction completion, Facilero will send a server-to-server callback to the callbackUrl you provided in the request.

Callback Structure

The callback will be a POST request with:

  • A JSON body containing the transaction result (either card or APM format).
  • An additional query parameter appended to the callback URL:
Query ParameterTypeDescription
paymentMethodStringIndicates the payment method used. One of: "card" or "apm"

This allows you to determine the structure of the JSON body before deserializing it.

Example

If your original callbackUrl was:

https://merchant.com/payment-status

Facilero will call:

POST https://merchant.com/payment-status?paymentMethod=apm

or:

POST https://merchant.com/payment-status?paymentMethod=card

with the corresponding JSON body in the request payload.

Expected Behavior

  • If paymentMethod = card → the body will conform to Merchant Callback DTO (used for card payments).
  • If paymentMethod = apm → the body will conform to ApmPaymentTxInfoDto (used for alternative payment methods).

See also:
Merchant Callback DTO – for card payments ApmPaymentTxInfoDto – for APM payments