API REFERENCE
Gehoste betaaloplossing (HPP)
Ondersteunde betaalmethoden: all payment methods
Dit is een Hosted Payment Page-oplossing (HPP): YabandPay host de checkout, waar klanten een betaalmethode kiezen en betalen. Handelaren hoeven alleen deze checkout te integreren in plaats van elke betaalmethode afzonderlijk. Dit vereenvoudigt het beheer en toekomstige upgrades.
| Parameter | Type | Beschrijving | Verplicht |
|---|---|---|---|
| user | String | Kassiersaccount UID | Verplicht |
| sign | String | Signature | Verplicht |
| method | String | v3.CreatePayments | Verplicht |
| time | Long | Timestamp | Verplicht |
- Parameters
| Parameter | Type | Beschrijving | Verplicht |
|---|---|---|---|
| pay_method | String | online | Verplicht |
| sub_pay_method | String | List | Verplicht |
| order_id | String | Merchant order ID | Verplicht |
| operation | String | 1.Sales 2.Authorisation; | Verplicht |
| amount | String | Bedrag als numerieke tekenreeks. Voer bijvoorbeeld 24.99 in voor € 24.99. CNY-bedrag >=1; EUR-bedrag >=0.1 (voor iDeal, Sofort en PayPal moet het EUR-bedrag >=1 zijn). | Verplicht |
| currency | String | ISO 4217-valutacode, bijvoorbeeld EUR of 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=1¤cy=EUR&demo=test&description=YabandPay test&method=v3.CreatePayments¬ify_url=https://www.yabandpay.com/notify&operation=1&order_id=20248746132489&pay_method=online&redirect_url=https://www.yabandpay.com&sub_pay_method=List&time=1546588900&timeout=0&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.CreatePayments",
"time": 1546588900,
"data": {
"description": "YabandPay test",
"timeout": "0",
"operation": "1",
"pay_method": "online",
"sub_pay_method": "List",
"order_id": "YOUR_ORDER_ID",
"amount": "1",
"currency": "EUR",
"redirect_url": "https://www.yabandpay.com",
"notify_url": "https://www.yabandpay.com/notify",
"demo": "test"
}
}
Response example:
{
"status": true,
"code": "200",
"data": {
"order_id": "YOUR_ORDER_ID",
"trade_id": "b769e338-20e7-35fa-dbb4-986892b96079",
"amount": "1.00",
"currency": "EUR",
"url": "https://pay.yabandpay.com/SelectPay/Yjc2OWUzMzgtMjBlNy0zNWZhLWRiYjQtOTg2ODkyYjk2MDc5",
"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 |
