Topup
https://sandbox-open.legionpays.com/v1/generate/topup/requestThe amount of the transaction, following min and max as specified in the Payment Method API.
A unique reference ID for the transaction.
The code for the payment method, as specified in the Payment Method API.
Get from hashed signature from the Signature API, along with the client ID and Signature Key generated from the dashboard.
The timestamp indicating when you make this API call must be the same as the timestamp when you call the Signature API.
Credentials
npx api install "@legionpay/v1.0#1k7d63fkmfdu9rlh"import legionpay from '@api/legionpay';
legionpay.topupRequest({
amount: 10000,
transactionRef: 'testtest_123',
channelCode: 'qris-id'
}, {
'X-SIGNATURE': 'test',
'X-TIMESTAMP': '1672506000000'
})
.then(({ data }) => console.log(data))
.catch(err => console.error(err));{
"status": 200,
"success": true,
"data": {
"amount": 15000,
"expired": 1683910800000,
"method": "002",
"methodName": "BRI",
"customerName": "Test",
"ref1": "testtest_1233",
"ref2": "T20d5b877fd1f22ca07db0241abdf3d6c9fdb0f2edb1c0cd52ad1aebaa13a6305",
"status": "pending",
"desc": "Success generate Virtual Account",
"va": "463134574945316"
}
}Request Session
Recent request history resets when this page is refreshed. Current session: 0