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

Topup Callback

Topup Callback

The Callback functionality allows you to receive real-time updates on the status of a topup by sending notifications to your specified payment callback URL. When certain events or changes occur related to the payment, such as a successful transaction 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 topup.
feeIntegerThe fee associated with the topup
expiredTimestampThe expiration date or time for the topup.
methodStringThe payment method code used for the topup.
methodNameStringThe name or identifier of the payment method used.
customerNameStringThe name of the customer or payer.
transactionRefStringOur transactionRef
partnerTransactionRefStringYour transactionRef
statusStringThe status of the topup (e.g., "paid", "expired," "failed").
descStringA description or note related to the topup.
paidTimeDateThe date and time when the topup was completed or processed.
serialNumberStringThe unique serial number or identifier form bank for the topup.
phoneStringThe contact phone number associated with the customer or payer.

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. 🍻