API REFERENCE
Betaling met QR-code
Voor betalingen in winkels
Tip
Toon de geretourneerde URL (of een QR-code die op basis van die URL is gemaakt) en de pictogrammen van beschikbare betaalmethoden aan de klant.
| Parameter | Type | Beschrijving | Verplicht |
|---|---|---|---|
| user | String | Kassiersaccount UID | Verplicht |
| sign | String | Signature | Verplicht |
| method | String | v3.QRcodePayment | Verplicht |
| time | Long | Timestamp | Verplicht |
- Parameters
| Parameter | Type | Beschrijving | Verplicht |
|---|---|---|---|
| pay_method | String | offline | Verplicht |
| sub_pay_method | String | QRcode | Verplicht |
| order_id | String | Merchant order ID | Verplicht |
| amount | String | Bedrag als numerieke tekenreeks. Voer bijvoorbeeld 24.99 in voor € 24.99. CNY-bedrag >=1; EUR-bedrag >=0.1. | Verplicht |
| tip_amount | String | Fooi inbegrepen in het totaalbedrag, als numerieke tekenreeks; bijvoorbeeld 1.02 | Optioneel |
| currency | String | ISO 4217 currency code, for example EUR or CHF | Verplicht |
| description | String | Order description | Verplicht |
| demo | String | Custom field | Optioneel |
| timeout | String | Vervaltijd in minuten (0-1440) | Verplicht |
| redirect_url | String | Redirect URL after payment | Optioneel |
| notify_url | String | Asynchronous notification URL after payment | Verplicht |
Signature example:
Sorted parameters concatenated into a URL-style query string
"amount=12.1¤cy=EUR&demo=test&description=YabandPay test&method=v3.QRcodePayment¬ify_url=https://www.yabandpay.com/notify&order_id=202486556498441613&pay_method=offline&redirect_url=https://www.yabandpay.com&sub_pay_method=QRcode&time=1555498137&timeout=0&tip_amount=0.5&user=YOUR_CASHIER_UID"
Sign stringA using secret_key
The resulting signature is:
"YOUR_SIGNATURE"
Request example:
{
"user": "YOUR_CASHIER_UID",
"sign": "YOUR_SIGNATURE",
"method": "v3.QRcodePayment",
"time": 1555498137,
"data": {
"amount": "12.1",
"currency": "EUR",
"tip_amount": "0.5",
"demo": "test",
"description": "YabandPay test",
"notify_url": "https://www.yabandpay.com/notify",
"order_id": "YOUR_ORDER_ID",
"pay_method": "offline",
"redirect_url": "https://www.yabandpay.com",
"sub_pay_method": "QRcode",
"timeout": "0"
}
}
Response example:
{
"status": true,
"code": "200",
"data": {
"order_id": "YOUR_ORDER_ID",
"trade_id": "4552eeea-1ae8-1e40-3b4b-802dc2f5686a",
"amount": "12",
"currency": "EUR",
"tip_amount": "0.5",
"url": "https://pay.yabandpay.com/payments/selectpay/order/ODlmYmYyMzQtN2U1Yy00ZDI5LTM5NWMtNGI4NzljYjI4MDlj",
"available_payment_methods": "Alipay+, Wechat Pay, iDEAL, UnionPay, QuickPass, Bancontact, Visa, Mastercard, ApplePay, GooglePay",
"state": "processing"
},
"message": ""}
Aanvullende informatie:
Resultaat van het antwoord:
- Een geslaagde aanvraag retourneert "status": true.
- Een mislukte aanvraag retourneert "status": false.
We raden sterk aan zowel Query Order als Asynchronous Notifications te gebruiken om de betalingsstatussen actueel en nauwkeurig te houden.
Response codes:
| Status | Code | Message |
|---|---|---|
| true | 200 | Success |
| false | -1000 | Internal error |
| false | -3001 | Required field is missing |
| false | -403 | The signature Error |
| false | -4011 | Not support the payment method |
