Create Payout

The Create Payout API endpoint is one of the feature within LeanX, allowing you to initiate secure and swift fund transfers. Streamline financial processes by programmatically generating payout transactions with ease and precision.

It is important to ensure that there is enough balance in your prefund pool to cover the payout transfers. LeanX requires you to maintain a minimum balance of RM 2.00.

You are advised to verify the recipient before proceeding with the transfer. We have provided bank verification endpoints which you can view via the link below.

Bank Account Verification

Authentication

LeanX uses Auth Token to authenticate in each request's header.

Auth Token can be retrieved in your portal dashboard under API page.

Request Header

{
    "auth-token": "LP-0D7C06DE-MM|7394e58e-edee-4c42-9ca5-bcbc449f1b9f|2141df4a3cb633d5ce8683bb0c55067e5caebfbe07390dde277dc455bcc95c91723a81b5e565c7c02d68fb84e396722563016bf99e576a4b8cdbe4423fbf226b"
}

Create a payout

HTTP Method: POST

https://api.leanx.dev/api/v1/merchant/create-payout-invoice

Request body

{
  "virtual_pool_reference": "VA-8F9FD0-132317969417-PAYOUT",
  "payout_service_id": 23,
  "amount": 13.00,
  "recipient_name": "John Doe",
  "client_callback_url": "https://www.yourdomain.com/api-callback-url",
  "third_party_account_no": "8011408168",
  "external_invoice_ref": "INVOICE1234",
  "recipient_reference": "test"
}

Attribute

PropertyTypeDescription

virtual_pool_reference*

String

Your virtual pool reference can be found in the portal under Prefund Page

payout_service_id*

Number

Payout service ID from payout service list

amount*

Decimal (10,2)

The amount that you want to payout.

recipient_name

String

Required

client_callback_url*

String

Callback url after the payout is made.

third_party_account_no*

String

Account number of the recipient

external_invoice_ref

String

Reference to your own invoice ID. Can be use to query back the payout status

recipient_reference*

String

Recipient reference for the transfer

Response

{
  "response_code": 2000,
  "description": "SUCCESS",
  "app_version": "/api/v1",
  "talk_to_server_before": "2023-12-05T17:43:07.620538",
  "data": {
    "status": "SUCCESS",
    "invoice_no": "PAYOUT-A9D5:174307-LEANX"
  },
  "breakdown_errors": "",
  "token": "18e0933d-6bc1-4808-9bc7-aad2bcd38686"
}

Last updated