Payout

APM Payout API Documentation

Overview

This document outlines how to initiate payouts using the Facilero Alternative Payment Methods (APM) API. This API enables merchants to disburse funds to users through various methods such as e-wallets, bank accounts, and mobile wallets.

Note: This endpoint mirrors the structure and principles of the APM payment API but is used for outbound transactions (payouts) instead of incoming payments.


API Endpoint

🔹 Live

POST https://api.facilero.com/api/v1/payouts/apm

🔸 Sandbox

POST https://sandbox.facilero.com/api/v1/payouts/apm

Request Headers

HeaderTypeRequiredDescription
Content-TypeStringYesMust be application/json
AuthorizationStringYesBearer <AUTH_TOKEN> — the token from the Authorization Service
RefererStringYesReferring domain for the request

Request Body

Fields

FieldTypeRequiredDescription
requestIdStringYesUnique identifier for the payout request
accountIdStringYesMerchant account ID to associate the payout
apmPayloadObject (ApmPayload)YesContains method-specific fields; structure depends on payout method
amountStringYesAmount to be paid out (as string to maintain precision)
currencyStringYesISO 4217 code (e.g., USD, EUR)
callbackUrlStringNoURL to receive transaction status updates
successRedirectUrlStringNoRedirect URL after a successful payout (if user-facing)
failureRedirectUrlStringNoRedirect URL after a failed payout (if user-facing)
metadataMap<String, String>NoOptional metadata
orderObject (Order)NoOptional order-related information
billingDetailsObject (ApmBillingDetails)NoBeneficiary’s personal details (required for certain payout methods)
deviceObject (Device)NoOptional device information used for fraud detection and logging

Response

Fields

FieldTypeDescription
requestIdStringEchoed request ID
transactionIdStringUnique ID for the payout transaction
transactionStatusEnum (TxStatus)Status of the transaction: PENDING, COMPLETED, DECLINED, etc.
declineCodeIntegerError code if declined
declineSubReasonStringOptional text describing reason for decline
apmResponseDataObject (ApmResponseData)Provider-specific response data, such as payout reference or redirect URLs
createdTimeStringTimestamp of when the transaction was created

Callback (Webhook)

If a callbackUrl is provided, Facilero will POST the final transaction result to it.

Headers

HeaderTypeDescription
X-ChecksumStringHMAC-SHA256 checksum based on accountId, amount, currency, transactionId

Body

Follows the ApmPaymentTxInfoDto format:

FieldTypeDescription
transactionIdStringUnique payout transaction ID
requestIdStringOriginal request ID
accountIdLongMerchant account ID
transactionStatusEnumTransaction status
declineCodeIntegerError code, if declined
declineSubReasonStringAdditional explanation if declined
orderCurrencyStringOriginal currency
processedCurrencyStringFinal currency after conversion (if any)
orderAmountDoubleOriginal payout amount
processedAmountDoubleFinal processed amount
conversionRateDoubleConversion rate applied
apmRequestPayloadObjectOriginal apmPayload sent
apmResponseDataObjectResponse data from the payout provider
callbackUrlStringCallback URL from the request
billingDetailsObjectBeneficiary billing information
orderObjectOptional order info
createdAtStringCreation timestamp

Example Request (Payout to E-Wallet)

{
  "requestId": "payout-req-10001",
  "accountId": "12345",
  "apmPayload": {
    "paymentMethod": "ExPay",
    "paymentType": "E_WALLET",
    "walletId": "wallet-98765"
  },
  "amount": "250.00",
  "currency": "USD",
  "callbackUrl": "https://merchant.example.com/callbacks/payouts",
  "successRedirectUrl": "https://merchant.example.com/payout/success",
  "failureRedirectUrl": "https://merchant.example.com/payout/failure",
  "billingDetails": {
    "firstName": "Jane",
    "lastName": "Smith",
    "email": "[email protected]",
    "country": "US"
  }
}

Example Response

{
  "requestId": "payout-req-10001",
  "transactionId": "payout-tx-55555",
  "transactionStatus": "PENDING",
  "apmResponseData": {
    "paymentMethod": "ExPay",
    "paymentType": "E_WALLET",
    "providerTransactionId": "ExPay-out-abc123"
  },
  "createdTime": "2025-07-14T10:00:00Z"
}

Example Callback

{
  "transactionId": "payout-tx-55555",
  "requestId": "payout-req-10001",
  "accountId": 12345,
  "transactionStatus": "COMPLETED",
  "orderCurrency": "USD",
  "processedCurrency": "USD",
  "orderAmount": 250.00,
  "processedAmount": 250.00,
  "conversionRate": 1.0,
  "apmRequestPayload": {
    "paymentMethod": "ExPay",
    "paymentType": "E_WALLET",
    "walletId": "wallet-98765"
  },
  "apmResponseData": {
    "paymentMethod": "ExPay",
    "paymentType": "E_WALLET",
    "providerTransactionId": "ExPay-out-abc123"
  },
  "callbackUrl": "https://merchant.example.com/callbacks/payouts",
  "billingDetails": {
    "firstName": "Jane",
    "lastName": "Smith",
    "email": "[email protected]",
    "country": "US"
  },
  "createdAt": "2025-07-14T10:00:00Z"
}

Status Codes

HTTP StatusMeaning
200 OKPayout request accepted
400Invalid request
401Unauthorized
404Resource not found
500Internal server error

Notes

  • This payout API is request-response and callback-based.
  • Payouts may be subject to additional KYC/AML requirements depending on the provider.
  • Always verify final status via callback or polling the /info/{transactionId} endpoint (future support).