Payment
https://sandbox-open.legionpays.com/v1/generate/accept/paymentTransaction validity duration in seconds.
The amount of the transaction, following min and max as specified in the Payment Method API.
A unique reference ID for the transaction.
Your Customer Name
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.generateAcceptPayment({
expiredInSeconds: 3600,
amount: 10000,
transactionRef: 'testtest_123',
customerName: 'Test',
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": 10000,
"fee": 0,
"expired": "2020-12-01T00:00:00.001Z",
"channel": "qris-id",
"channelName": "QRIS",
"refId": "123456789012345678",
"partnerRefId": "123456789012345678",
"status": "pending",
"desc": "Success proceed your Accepting Payment Request",
"paymentString": "dummy-payment-string",
"customerName": "Test Customer Name"
}
}Request Session
Recent request history resets when this page is refreshed. Current session: 0