LEGIONPAYLEGIONPAY
Demo
StableAPI Reference

Introduction

Getting Started with Legionpay

Utility

Get Payment MethodGETGet Transfer ChannelGETGet Account BalanceGET

Signature

Generating Signature

Payment

Generate Accept PaymentPOST

Transfer

Transfer InquiryPOSTTransfer PaymentPOST

Topup

Topup RequestPOST

Check Status

Check Payment StatusGETCheck Transfer StatusGETCheck Topup StatusGET

Callback

Payment CallbackTransfer CallbackTopup Callback

Additional Things

Response CodePayment and Topup StatusTransfer StatusRedirect Payment URL

Callback

Transfer Callback

Transfer Callback

The Callback functionality allows you to receive real-time updates on the status of a transfer by sending notifications to your specified payment callback URL. When certain events or changes occur related to the payment, such as a successful transfer or a failed payment, the callback is triggered and a notification is sent to your endpoint.

To ensure proper setup of your callback URL and to obtain a unique client secret key, we highly recommend referring to the comprehensive instructions provided in the introductory section below. Following these detailed guidelines will facilitate the seamless configuration of the callback functionality in a professional and efficient manner. Access the Introduction section for step-by-step instructions.

Http Method

POST

Headers

NameValue
Content-Typeapplication/json
X-SIGNATURESIGNATURE

PAYLOAD / REQUEST BODY

NameTypeDescription
amountIntegerThe amount of the transfer
feeIntegerThe fee associated with transfer.
channelNameStringThe name or identifier of the bank channel used.
accountNumberStringThe bank account number of the customer.
nameStringThe bank account name of the customer.
refIdStringOur transferRef
partnerRefIdStringYour transferRef
statusStringThe status of the transfer (e.g., "success", "failed," "rejected).
descStringA description related to the transfer.
paidTimeDateStringThe date and time when the transfer was completed or processed.
serialNumberString | NullThe "Unique Serial Number" is a special identifier provided by the bank for each transfer request.
remarkStringAdditional note or remark for the transfer.

Response

Upon successful processing of the callback request, we expect you to give us a response in the following format:

JSON
{
  "message": "OK"
}

The "message" field indicates the status of the callback request. In this case, the value "OK" signifies that the callback was successfully received and processed by your system.

Please ensure you follow these instructions carefully to successfully configure your callback URL and obtain the necessary callback key. If you require further assistance or have any questions, please do not hesitate to reach out to our support team. 🍻