Voucher
Applicable to: Gift Cards
This payment method allows orders to be paid using the funds from a gift card. The gift card must be activated at the point of sale.
API URL:https://mapi.yabandpay.com/Payments
Method:POST
POST data type:Json
Parameter | Type | Description | Required |
---|---|---|---|
user | String | the UID of cashier account | Required |
sign | String | signature | Required |
method | String | v3.CreatePayments | Required |
time | Long | timestamp | Required |
- Parameter
Parameter | Type | Description | Required |
---|---|---|---|
pay_method | String | online | Required |
sub_pay_method | String | Voucher | Required |
order_id | String | order id from Merchant | Required |
amount | String | format in cents: € 24.99 should be 24.99, the min amount is EUR 0.10 or CNY 1.00 | Required |
currency | String | ISO 4217, For example EUR, CHF | Required |
description | String | order description | Required |
demo | String | custom field | Optional |
timeout | String | value 0 means 1440 minutes | Required |
redirect_url | String | the redirect URL after payment is completed | Optional |
notify_url | String | asynchronous notification url | Required |
cardnumber | String | Gift card number (optional if using the hosted page redirect method). | Optional |
pincode | String | Gift card password (required if the card number is provided). | Optional |
Signature:
Lexicographical sequence and URL key-value format new string
"amount=0.01&cardnumber=6064364245787814896¤cy=EUR&demo=test&description=YabandPay test VVV&method=v3.CreatePaymentsVoucher¬ify_url=https://www.yabandpay.com/notify&order_id=202405110140188881&pay_method=online&pincode=568971&redirect_url=https://www.yabandpay.com&sub_pay_method=Voucher&time=1546588959&timeout=0&user=016683"
Use stringA and secret_key to get stringSign
Get Signature:
"10cfa202a8943b214c601f4d4df706889c6a9ab1b003f2eecb6882833b5d1846"
Example Request:
{
"user": "016683",
"sign": "10cfa202a8943b214c601f4d4df706889c6a9ab1b003f2eecb6882833b5d1846",
"method": "v3.CreatePaymentsVoucher",
"time": 1546588959,
"data": {
"description": "YabandPay test VVV",
"timeout": "0",
"pay_method": "online",
"sub_pay_method": "Voucher",
"order_id": "202405110140188881",
"amount": "0.01",
"currency": "EUR",
"redirect_url": "https://www.yabandpay.com",
"notify_url": "https://www.yabandpay.com/notify",
"demo": "test",
"cardnumber": "6064364245787814896",
"pincode": "568971"
}
}
Example Response:
{
"status": true,
"code": "200",
"data": {
"order_id": "202405110140188881",
"trade_id": "535ea4a1-917a-bc14-58e2-d1565720af90",
"amount": "0.01",
"currency": "EUR",
"settlement_amount": "0.01",
"settlement_currency": "EUR",
"exchange_rate": "1",
"url": "",
"state": "processing"
},
"message": ""
}
Hosted Page Method:
If you need to complete the gift card account and password verification on YabandPay's hosted page, please use this payment method. In this case, the card number and PIN code do not need to be transmitted. After the call, redirect to the return URL to proceed with the next step of the payment process.
Example Request:
{
"user": "016683",
"sign": "ce23d2d12eff66fa9f48ce577f61b7bad86aae6067a4d83610a65c7a063900bd",
"method": "v3.CreatePaymentsVoucher",
"time": 1546588959,
"data": {
"description": "YabandPay test VVV",
"timeout": "0",
"pay_method": "online",
"sub_pay_method": "Voucher",
"order_id": "20240511014018888",
"amount": "0.01",
"currency": "EUR",
"redirect_url": "https://www.yabandpay.com",
"notify_url": "https://www.yabandpay.com/notify",
"demo": "test"
}
}
Example Response:
{
"status": true,
"code": "200",
"data": {
"order_id": "20240511014018888",
"trade_id": "c0d9c0bb-0b40-1cb6-7373-fd1a97c7124e",
"amount": "0.01",
"currency": "EUR",
"url": "https://pay.yabandpay.com/payments/callback/order/YzBkOWMwYmItMGI0MC0xY2I2LTczNzMtZmQxYTk3YzcxMjRl",
"state": "processing"
},
"message": ""
}
More Information:
Return results:
On a successful API call, the response will be
"status": true
.On a failed API call, the response will be
"status": false
.
We strongly recommend using both Order Query and Asynchronous Notification simultaneously to synchronize and update payment status, ensuring real-time accuracy of payment information.
Result/Error codes:
Status | Code | Message |
---|---|---|
true | 200 | Success |
fales | -1000 | Internal error |
fales | -3001 | Required field is missing |
fales | -403 | The signature Error |
fales | -4011 | Not support the payment method |