API REFERENCE
Betalingen via miniprogramma
Tip
Alleen de Alipay China-wallet wordt ondersteund. Andere Alipay+-wallets worden niet ondersteund. Raadpleeg voor de integratie van Alipay+ Mini Program de officiële Alipay+-documentatie (https://miniprogram.alipay.com/docs-alipayconnect/miniprogram_alipayconnect/solutions/cn-cashier-payment).
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.CreatePaymentsAlipayMiniPay | 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 | Bedrag als numerieke tekenreeks. Voer bijvoorbeeld 24.99 in voor € 24.99. Het CNY-bedrag moet >=1 zijn; het EUR-bedrag >=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 |
| 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&description=YabandPay test&method=v3.CreatePaymentsAlipayMiniPay¬ify_url=https://www.yabandpay.com/notify&order_id=2024519846516588484&pay_method=online&redirect_url=https://www.yabandpay.com&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.CreatePaymentsAlipayMiniPay",
"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"
}
}
Antwoordvoorbeeld:
{
"status": true,
"code": "200",
"data": {
"order_id": "YOUR_ORDER_ID",
"trade_id": "5902ea82-df87-bc30-3eef-c9cd1c64555c",
"amount": "1",
"currency": "EUR",
"parameters": {
"transaction_id": "2816660400948ddP1j0Et1lNHl2sOlC0bKn0"
},
"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 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 |
