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

Transfer

Transfer Payment

POSThttps://sandbox-open.legionpays.com/v1/generate/transfer/payment

Recent Requests

TimeStatusUser Agent
Click Try It! to create a request history for this session.
0 Request This Session
Please make sure to carefully follow these instructions to successfully generate a transfer payment through our API. By adhering to these guidelines, you will be able to configure the necessary parameters and ensure a seamless payment process. Should you have any inquiries or require additional assistance, our dedicated support team is here to help. Feel free to reach out to us anytime. We appreciate your trust and look forward to serving you.🍻

Body Params

amount int32 required Defaults to 10000.

The amount of the transaction, following min and max as specified in the Bank Channel API.

transferRef string required Defaults to test123456789.

A unique reference ID for the transfer.

inquiryRef string required Defaults to test123456789.

A unique Reference ID, referred to as the "Inquiry Ref," can be obtained from the inquiry response. This REF is located in the field labeled "inquiryRef."

type string required Defaults to Bank Transfer.

The Type for the transfer channel, as specified in the Transfer Channel API.

channelCode string required Defaults to 002.

The code for the transfer channel, as specified in the Transfer Channel API.

accountNumber string required Defaults to 01234568211.

The bank account number to which the transfer will be made.

remark string

Notes or remarks to be included with the transfer.

Headers

X-SIGNATURE string required Defaults to test.

Get from hashed signature from the Signature API, along with the client ID, Inquiry Signature and Signature Key generated from the dashboard.

X-TIMESTAMP string required Defaults to 1672506000000.

The timestamp indicating when you make this API call must be the same as the timestamp when you call the Signature API.

Responses

200
401

Credentials

BasicBase64
:
$npx api install "@legionpay/v1.0#1k7d63fkmfdu9rlh"
import legionpay from '@api/legionpay';

legionpay.transferPayment({
  amount: 10000,
  transferRef: 'test123456789',
  inquiryRef: 'test123456789',
  type: 'Bank Transfer',
  channelCode: '002',
  accountNumber: '01234568211'
}, {
  'X-SIGNATURE': 'test',
  'X-TIMESTAMP': '1672506000000'
})
  .then(({ data }) => console.log(data))
  .catch(err => console.error(err));
{
  "status": 200,
  "success": true,
  "data": {
    "amount": 10000,
    "fee": 5000,
    "channel": "014",
    "channelName": "BANK BCA",
    "accountNumber": "1234567890",
    "name": "test_transfer_name",
    "refId": "1689562129004",
    "partnerRefId": "Dac1772c68ca693c287ab0565f1a327f2db5be8a816c83b22c686c8fc762504c8",
    "process": "process",
    "status": "success",
    "desc": "Success Transfer Payment",
    "inquiryRef": "inquiry-ref"
  }
}

Request Session

Recent request history resets when this page is refreshed. Current session: 0

Credentials

BasicBase64
:
$npx api install "@legionpay/v1.0#1k7d63fkmfdu9rlh"
import legionpay from '@api/legionpay';

legionpay.transferPayment({
  amount: 10000,
  transferRef: 'test123456789',
  inquiryRef: 'test123456789',
  type: 'Bank Transfer',
  channelCode: '002',
  accountNumber: '01234568211'
}, {
  'X-SIGNATURE': 'test',
  'X-TIMESTAMP': '1672506000000'
})
  .then(({ data }) => console.log(data))
  .catch(err => console.error(err));
{
  "status": 200,
  "success": true,
  "data": {
    "amount": 10000,
    "fee": 5000,
    "channel": "014",
    "channelName": "BANK BCA",
    "accountNumber": "1234567890",
    "name": "test_transfer_name",
    "refId": "1689562129004",
    "partnerRefId": "Dac1772c68ca693c287ab0565f1a327f2db5be8a816c83b22c686c8fc762504c8",
    "process": "process",
    "status": "success",
    "desc": "Success Transfer Payment",
    "inquiryRef": "inquiry-ref"
  }
}

Request Session

Recent request history resets when this page is refreshed. Current session: 0