Initiating a Payout

This guide explains how to initiate payouts using the Exirom Alternative Payment Methods (APM) API.
The payout API allows merchants to disburse funds to beneficiaries via multiple methods such as e-wallets, bank accounts, and mobile wallets.

Note: This endpoint mirrors the structure of the APM Payment API but is designed specifically for outbound transactions (payouts) instead of incoming payments.


API Endpoint

POST https://${host}/api/v1/payouts/apm

Request

Headers

HeaderTypeRequiredDescription
Content-TypeStringYesMust be application/json.
AuthorizationStringYesBearer <AUTH_TOKEN> – Token obtained from Authorization Service.
RefererStringYesDomain from which the request originates.

Example: Payout Request Body (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"
  }
}

Request Fields Description

FieldTypeRequiredDescription
requestIdStringYesUnique identifier for the payout request.
accountIdStringYesMerchant’s account ID associated with the payout.
apmPayloadObject (ApmPayload)YesContains method-specific fields; structure varies by payout method.
amountStringYesAmount to be paid out (as string to preserve decimal precision).
currencyStringYesCurrency code in ISO 4217 format (e.g., USD, EUR).
callbackUrlStringNoURL where Exirom will POST the final transaction status.
successRedirectUrlStringNoRedirect URL after a successful payout (if user-facing).
failureRedirectUrlStringNoRedirect URL after a failed payout (if user-facing).
metadataMap<String, String>NoOptional metadata for tracking or reconciliation.
orderObject (Order)NoOptional order-related information.
billingDetailsObject (ApmBillingDetails)NoBeneficiary’s details (may be required for certain payout methods).
deviceObject (Device)NoOptional device information for fraud detection and transaction logging.

Successful Response

Example

{
  "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"
}

Response Fields Description

FieldTypeDescription
requestIdStringEchoed request ID from your payout initiation.
transactionIdStringUnique ID assigned to the payout transaction.
transactionStatusEnum (TxStatus)Status of the transaction: PENDING, COMPLETED, DECLINED.
declineCodeIntegerError code if the transaction was declined.
declineSubReasonStringOptional text with additional decline reason.
apmResponseDataObject (ApmResponseData)Provider-specific response data (e.g., payout reference ID).
createdTimeStringTimestamp indicating when the transaction was created.

Callback (Webhook)

If a callbackUrl is provided, Exirom will send a POST request to that URL with the final payout transaction status.

Callback Headers

HeaderTypeDescription
X-ChecksumStringHMAC-SHA256 checksum computed using accountId, amount, currency, transactionId.

Callback Payload Example

Callback data follows the ApmPaymentTxInfoDto structure:

{
  "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"
}

Fields Description

FieldTypeDescription
transactionIdStringUnique payout transaction ID.
requestIdStringOriginal request ID sent during payout initiation.
accountIdLongMerchant’s account ID.
transactionStatusEnumFinal status of the payout (e.g., COMPLETED).
declineCodeIntegerError code if the payout failed.
declineSubReasonStringDetailed decline reason if applicable.
orderCurrencyStringOriginal currency requested.
processedCurrencyStringFinal processed currency (after conversions).
orderAmountDoubleOriginal payout amount.
processedAmountDoubleFinal processed amount after conversions.
conversionRateDoubleApplied conversion rate (if any).
apmRequestPayloadObjectOriginal apmPayload sent with the payout request.
apmResponseDataObjectProvider response data.
callbackUrlStringCallback URL provided in the request.
billingDetailsObjectBeneficiary billing information.
orderObjectOptional order information.
createdAtStringTimestamp when the transaction was created.

Status Codes

HTTP StatusMeaning
200 OKPayout request accepted.
201 CreatedNew payout successfully created.
400Invalid or malformed request.
401Unauthorized request.
404Resource not found.
500Internal server error.

Notes

  • The payout API is request-response based and supports webhook callbacks for final transaction status.
  • Certain payout methods may require additional KYC/AML verification depending on the provider.
  • Always verify the final payout status via the callback or by polling the /info/{transactionId} endpoint (future support).