API REFERENCE
In-appbetalingen
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.CreatePaymentsAlipayAppPay | Verplicht |
| time | Long | Timestamp | Verplicht |
- Parameters
| Parameter | Type | Beschrijving | Verplicht |
|---|---|---|---|
| pay_method | String | online | Verplicht |
| sub_pay_method | String | Alipay | Verplicht |
| sub_pay_method_type | String | Bekijk de lijst met ondersteunde wallets | Optioneel |
| order_id | String | Bestel-ID van de handelaar | Verplicht |
| amount | String | Numeriek bedrag. Schrijf bijvoorbeeld € 24.99 als 24.99; het CNY-bedrag moet >=1 zijn; het eurobedrag >=0.1 | Verplicht |
| currency | String | ISO-valutacode 4217, bijvoorbeeld EUR of CHF | Verplicht |
| description | String | Bestelomschrijving | Verplicht |
| demo | String | Aangepast veld | Optioneel |
| timeout | String | Vervaltijd in minuten (0-1440) | Verplicht |
| notify_url | String | URL voor asynchrone melding na afronding van de betaling | Verplicht |
| redirect_url | String | Omleidings-URL na afronding van de betaling. Gebruik voor iOS en Android een applink of deeplink om callbacks naar de APP af te handelen | Optioneel |
| os_type | String | Geef android op voor Android en ios voor Apple | Verplicht |
Handtekeningvoorbeeld:
Gesorteerde parameters aaneengevoegd tot een queryreeks in URL-stijl
"amount=1¤cy=EUR&description=YabandPay test&method=v3.CreatePaymentsAlipayAppPay¬ify_url=https://www.yabandpay.com/notify&order_id=202412654894165484&os_type=ios&pay_method=online&redirect_url=https://www.yabandpay.com/redirect_url&sub_pay_method=Alipay&time=1546588959&timeout=0&user=YOUR_CASHIER_UID"
Onderteken stringA met secret_key
De resulterende handtekening is:
"YOUR_SIGNATURE"
Aanvraagvoorbeeld:
{
"user": "YOUR_CASHIER_UID",
"sign": "YOUR_SIGNATURE",
"method": "v3.CreatePaymentsAlipayAppPay",
"time": 1546588959,
"data": {
"description": "YabandPay test",
"timeout": "0",
"pay_method": "online",
"sub_pay_method": "Alipay",
"order_id": "YOUR_ORDER_ID",
"amount": "1",
"currency": "EUR",
"notify_url": "https://www.yabandpay.com/notify",
"redirect_url": "https://www.yabandpay.com/redirect_url",
"os_type": "ios"
}
}
Antwoordvoorbeeld:
{
"status": true,
"code": "200",
"data": {
"order_id": "YOUR_ORDER_ID",
"trade_id": "e5baf40b-08b2-4660-ed20-d632eeeceab3",
"amount": "0.01",
"currency": "EUR",
"parameters": {
"pay_url": "https://open-sea-global.alipayplus.com/api/open/v1/ac/cashier/self/codevalue/checkout.htm?codeValue=281666040097PyqF6IxZEzTURq7PhvTv3ken",
"payments_data": "{\"displayPaymentAmount\":\"0.01\",\"displayPaymentCurrency\":\"EUR\",\"wallets\":[{\"enabled\":true,\"promoNames\":[\"{\\\"en_US\\\":\\\"test\\\",\\\"nl_NL\\\":\\\"test\\\"}\"],\"searchKeywords\":[\"dana wallet\"],\"walletName\":\"DANA\"}]}"
},
"state": "processing"
},
"message": ""
}
Aanvullende informatie:
Als uw APP een webview gebruikt, leid dan rechtstreeks om naar pay_url.
Als uw APP voor iOS of Android is ontwikkeld, download dan de bijbehorende SDK: Downloaden.
Raadpleeg de officiële documentatie van AliPay+ voor de integratie.
Resultaat van het antwoord:
-
Een geslaagde aanvraag retourneert "status": true.
-
Een mislukte aanvraag retourneert "status": false.
We raden sterk aan zowel Bestelling opvragen als Asynchrone meldingen te gebruiken om de betalingsstatussen actueel en nauwkeurig te houden.
Wallets die Alipay+ ondersteunen:
De wallets die bij sub_pay_method_type horen, ondersteunen de volgende betaalscenario's:
| sub_pay_method_type | APP | WAP | Web | Miniprogramma |
|---|---|---|---|---|
| ALIPAY_CN | ✅ | ❌ | ✅ | ✅ |
| TRUEMONEY | ✅ | ❌ | ✅ | ✅ |
| ALIPAY_HK | ✅ | ✅ | ✅ | ✅ |
| TNG | ✅ | ✅ | ✅ | ✅ |
| GCASH | ✅ | ✅ | ✅ | ✅ |
| DANA | ✅ | ✅ | ✅ | ✅ |
| KAKAOPAY | ✅ | ❌ | ✅ | ❌ |
| RABBIT_LINE_PAY | ✅ | ❌ | ✅ | ❌ |
| BPI | ❌ | ✅ | ✅ | ❌ |
| BOOST | ✅ | ✅ | ✅ | ❌ |
| AKULAKU_PAYLATER | ✅ | ✅ | ✅ | ❌ |
| BILLEASE | ✅ | ✅ | ✅ | ❌ |
| TINABA | ✅ | ✅ | ✅ | ❌ |
| NAVERPAY | ❌ | ✅ | ✅ | ❌ |
| TOSSPAY | ✅ | ❌ | ✅ | ✅ |
| MPAY | ✅ | ✅ | ✅ | ❌ |
| KREDIVO_ID | ✅ | ❌ | ✅ | ❌ |
| KPLUS | ✅ | ✅ | ✅ | ❌ |
| HIPAY | ✅ | ✅ | ✅ | ✅ |
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 |
