1. Webhook
Lesspay2.0
  • LESSPAY2 API Reference
    • Get started
    • Authentication
    • Parameter Specifications
    • Pay In
      • Overview
      • Development Guidelines
      • Local Payment Methods (LPMs)
      • Error Codes
      • Card payment
        • Card Payment
        • 3D Secure (3DS) Configuration
        • Fraud & Dispute Webhook Notifications
      • API List
        • Create Payin
        • Fetch Payin
      • Webhook
        • Payin webhook
    • Pay Out
      • Overview
      • Development Guidelines
      • Multiple Transfer Methods
      • Error Codes
      • API List
        • Create Payout
        • Payout Supported Banks
        • Fetch Payout
      • Webhook
        • Payout webhook
  1. Webhook

Payout webhook

Lesspay sends an asynchronous notification to your system when a payout batch reaches a final state.

1. Configuration Sources#

The Callback URL (notify_url) can be configured in two ways:
1.
Merchant Dashboard (Default):
Register your default notify_url with the Lesspay Product Operations team.
This is the standard way to receive payout notifications.
2.
API Parameter (Dynamic):
Specify notify_url in the Batch Payout API (/api/global/payout/batch/create-order).
Overrides the dashboard setting for that specific batch.

2. Webhook Authentication#

You must verify the signature of the webhook to ensure authenticity.

Signature Mechanism#

The mechanism is identical to the Pay In Webhook:
Header: x-auth-signature
Algorithm: SHA256 (Uppercase)
Key: Your appSecret

Verification Steps#

1.
Collect all parameters from the JSON body (exclude null/empty).
2.
Sort by key (ASCII).
3.
Concatenate as key=value&....
4.
Append &key=YOUR_APP_SECRET.
5.
Hash (SHA256) and convert to Uppercase.
6.
Compare with the header.

3. Notification Parameters#

The webhook payload corresponds to the PayoutQueryVO structure.

Batch Information (Root)#

Field NameTypeDescription
request_idStringMerchant's Batch ID
pay_order_idStringLesspay's Batch Order ID
order_statusStringBatch Status (SUCCESS, PARTIAL_SUCCESS, FAILED)
currencyStringPayout Currency
total_amountStringTotal Amount
fail_reasonStringReason for failure (if applicable)
created_atStringCreation Timestamp

Detail List (details)#

The details array contains the status of each individual transaction in the batch.
Field NameTypeDescription
mch_order_idStringMerchant's Detail ID
payout_order_detail_idStringLesspay's Detail ID
amountStringAmount
statusStringDetail Status (SUCCEED, FAILED)
fail_reasonStringFailure reason (if failed)
channel_order_noStringChannel Order Number
bank_account_noStringMasked Account Number
bank_account_nameStringMasked Beneficiary Name

4. Examples#

Data Format Example#

{
    "pay_order_id": "PO20251219001",
    "request_id": "BATCH_001",
    "order_status": "PARTIAL_SUCCESS",
    "currency": "IDR",
    "total_amount": "200000.00",
    "created_at": "2025-12-19 12:00:00",
    "details": [
        {
            "mch_order_id": "DET_001",
            "payout_order_detail_id": "POD_001",
            "amount": "100000.00",
            "status": "SUCCEED",
            "bank_account_no": "123***456",
            "bank_account_name": "John Doe"
        },
        {
            "mch_order_id": "DET_002",
            "payout_order_detail_id": "POD_002",
            "amount": "100000.00",
            "status": "FAILED",
            "fail_reason": "Invalid Account",
            "bank_account_no": "987***654",
            "bank_account_name": "Jane Smith"
        }
    ]
}

Modified at 2025-12-19 04:49:57
Previous
Fetch Payout
Built with