API REFERENCE
Gehoste betaalpagina
Voor kaartautorisaties en directe aankopen
De Hosted Payment Page (HPP) van YabandPay is een gebruiksklare betaalpagina die volledig door YabandPay wordt beheerd. Handelaren kunnen betalingen veilig accepteren doordat gevoelige PCI-gegevens op het systeem van YabandPay worden gehost. Het formulier kan als iframe of omleidingspagina in de checkout van de handelaar worden opgenomen.
Tip
Autorisaties zijn 30 dagen geldig. Autorisatiebestellingen verlopen automatisch na 30 dagen.
| Parameter | Type | Beschrijving | Verplicht |
|---|---|---|---|
| user | String | Kassiersaccount UID | Verplicht |
| sign | String | Signature | Verplicht |
| method | String | v3.CreateCardPayments | Verplicht |
| time | Long | Timestamp | Verplicht |
- Parameters
| Parameter | Type | Beschrijving | Verplicht |
|---|---|---|---|
| pay_method | String | online | Verplicht |
| sub_pay_method | String | Cards HPP | Verplicht |
| operation | String | 1.Sales 2.Authorisation; | Verplicht |
| order_id | String | Merchant order ID | Verplicht |
| 3ds_initiate | String | 01. Enable 3DS verification; 02. Disable 3DS (requires activation approval); 03. SCA exemption (requires activation approval). | Verplicht |
| sca_exemption | String | LowValue | Required when 3ds_initiate=03 |
| amount | String | Bedrag als numerieke tekenreeks. Voer bijvoorbeeld 24.99 in voor € 24.99. | Verplicht |
| currency | String | ISO 4217 currency code, for example EUR or CHF | Verplicht |
| description | String | Order description | Verplicht |
| form_type | String | Type of returned url; defaults to 01. 01.completed, 02.iframe | Optioneel |
| string | Cardholder email | 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 |
| request_id | String | Unique request ID; a combination of digits and letters at least 24 characters is recommended | Verplicht |
Signature example:
Sorted parameters concatenated into a URL-style query string
"3ds_initiate=01&amount=1¤cy=EUR&description=test&email=JohnSmith@gmail.com&form_type=01&method=v3.CreateCardPayments¬ify_url=https://www.yabandpay.com/notify&operation=1&order_id=203040950640690239603690&pay_method=online&redirect_url=https://www.yabandpay.com/redirect_url&request_id=tscqf7ki76o7aem4z1yl1xs72f89fptl&sub_pay_method=Cards HPP&time=1720680417&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.CreateCardPayments",
"time": 1720680417,
"data": {
"description": "test",
"form_type": "01",
"3ds_initiate": "01",
"timeout": "0",
"pay_method": "online",
"sub_pay_method": "Cards HPP",
"operation": "1",
"order_id": "YOUR_ORDER_ID",
"amount": "1",
"currency": "EUR",
"email": "JohnSmith@gmail.com",
"redirect_url": "https://www.yabandpay.com/redirect_url",
"notify_url": "https://www.yabandpay.com/notify",
"request_id": "tscqf7ki76o7aem4z1yl1xs72f89fptl"
}
}
Response example:
{
"status": true,
"code": "200",
"data": {
"order_id": "YOUR_ORDER_ID",
"trade_id": "160899f3-f6d9-a8d8-ab5b-82eacdab9c5b",
"amount": "1.00",
"currency": "EUR",
"url": "https://pay.yabandpay.com/payments/callback/order/MTYwODk5ZjMtZjZkOS1hOGQ4LWFiNWItODJlYWNkYWI5YzVi",
"state": "processing"
},
"message": "",
"response_id": "202407111544200649155078"
}
Aanvullende informatie:
Resultaat van het antwoord:
-
Een geslaagde aanvraag retourneert "status": true.
-
Een mislukte aanvraag retourneert "status": false.
Stuur de klant door naar de geretourneerde url. Nadat de klant daar de kaartgegevens heeft ingevoerd en de betaling heeft voltooid, wordt deze doorgestuurd naar redirect_url. We raden sterk aan zowel Query Order als Asynchronous Notifications te gebruiken om de betalingsstatussen actueel en nauwkeurig te houden. a) Een bestelstatus state van paid betekent dat de betaling is geslaagd. b) Een bestelstatus state van authorized betekent dat de autorisatie is geslaagd. Roep de API voor het incasseren van de autorisatie aan om een geautoriseerde betaling te incasseren.
Response codes:
| Status | Code | Message |
|---|---|---|
| true | 200 | |
| false | -1000 | Internal error |
| false | -403 | The signature Error |
| false | -2001 | The user not exist |
| false | -3001 | Required field is missing |
| false | -4118 | Incorrect request ID |
