API REFERENCE
MobilePay
MobilePay ondersteunt het aanmaken van online betaalbestellingen door pay_method in te stellen op online en sub_pay_method op MobilePay.
API-URL:https://mapi.yabandpay.com/Payments
Methode:POST
POST gegevenstype:Json
| 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 | MobilePay | Verplicht |
| order_id | String | Bestel-ID van de handelaar | Verplicht |
| amount | String | Numeriek bedrag. Schrijf bijvoorbeeld EUR 24.99 als 24.99 | Verplicht |
| currency | String | EUR | Verplicht |
| description | String | Bestelomschrijving | Verplicht |
| demo | String | Aangepast veld | Optioneel |
| timeout | String | Vervaltijd in minuten (0-1440) | Verplicht |
| redirect_url | String | Omleidings-URL na betaling | Optioneel |
| notify_url | String | URL voor asynchrone melding na betaling | Verplicht |
Handtekeningvoorbeeld:
Gesorteerde parameters aaneengevoegd tot een queryreeks in URL-stijl
"amount=1¤cy=EUR&demo=test&description=YabandPay test&method=v3.CreatePayments¬ify_url=https://www.yabandpay.com/notify&order_id=20240726785412369&pay_method=online&redirect_url=https://www.yabandpay.com&sub_pay_method=MobilePay&time=1646388458&timeout=0&user=YOUR_CASHIER_UID"
Onderteken de resulterende stringA met secret_key.
De resulterende handtekening is:
"YOUR_SIGNATURE"
Aanvraagvoorbeeld:
{
"user": "YOUR_CASHIER_UID",
"sign": "YOUR_SIGNATURE",
"method": "v3.CreatePayments",
"time": 1646388458,
"data": {
"description": "YabandPay test",
"timeout": "0",
"pay_method": "online",
"sub_pay_method": "MobilePay",
"order_id": "YOUR_ORDER_ID",
"amount": "1",
"currency": "EUR",
"redirect_url": "https://www.yabandpay.com",
"notify_url": "https://www.yabandpay.com/notify",
"demo": "test"
}
}
Antwoordvoorbeeld:
{
"status": true,
"code": "200",
"data": {
"order_id": "YOUR_ORDER_ID",
"trade_id": "23615e31-75e2-45b8-a8ef-6d4175292b44",
"amount": "1.00",
"currency": "EUR",
"url": "https://pay.yabandpay.com/pay_method/bW9iaWxlcGF5/MjM2MTVlMzEtNzVlMi00NWI4LWE4ZWYtNmQ0MTc1MjkyYjQ0",
"state": "processing"
},
"message": ""
}
Aanvullende informatie:
Resultaat van het antwoord:
-
Bij een geslaagde aanroep wordt "status": true geretourneerd.
-
Bij een mislukte aanroep wordt "status": false geretourneerd.
We raden sterk aan zowel Bestelling opvragen als Asynchrone meldingen te gebruiken om de betalingsstatussen actueel en nauwkeurig te houden.
Antwoordcodes:
| Status | Code | Bericht |
|---|---|---|
| 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 |
