Mini Program Payment
[!TIP|style:flat]
Only available for Alipay China wallet, other wallets of Alipay+ are not supported.
Please refer to the official documentation of Alipay+ for access to Alipay+ Mini Programs(https://miniprogram.alipay.com/docs-alipayconnect/miniprogram_alipayconnect/solutions/cn-cashier-payment)
API URL:https://mapi.yabandpay.com/Payments
Method:POST
POST data type:Json
| Parameter | Type | Description | Mark |
|---|---|---|---|
| user | String | the UID of cashier account | Required |
| sign | String | signature | Required |
| method | String | v3.CreatePaymentsWechatMiniPay | Required |
| time | Long | timestamp | Required |
- Parameter
| Parameter | Type | Description | Mark |
|---|---|---|---|
| pay_method | String | online | Required |
| sub_pay_method | String | Alipay | Required |
| sub_pay_method_type | String | Reference List of Supported Wallets | Optional |
| order_id | String | order id from Merchant | Required |
| amount | String | format in cents: € 24.99 should be 24.99, the min amount is EUR 0.10 or CNY1 | Required |
| currency | String | ISO 4217, For example EUR, CHF | Required |
| description | String | order description | Required |
| demo | String | custom field | Optional |
| timeout | String | Timeout (minutes) value 0-1440 | Required |
| redirect_url | String | the redirect URL after payment is completed | Optional |
| notify_url | String | asynchronous notification url | Required |
Signature:
Lexicographical sequence and URL key-value format new string
"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=016683"
Use stringA and secret_key to get stringSign
Get Signature:
"4e58609ed462f8e7e99ad2b8eeb6a76c82d42c03f51f8c597e72f083fa42e3a7"
Example Request:
{
"user": "016683",
"sign": "4e58609ed462f8e7e99ad2b8eeb6a76c82d42c03f51f8c597e72f083fa42e3a7",
"method": "v3.CreatePaymentsAlipayMiniPay",
"time": 1546588959,
"data": {
"description": "YabandPay test",
"timeout": "0",
"pay_method": "online",
"sub_pay_method": "Alipay",
"order_id": "2024519846516588484",
"amount": "1",
"currency": "EUR",
"notify_url": "https://www.yabandpay.com/notify",
"redirect_url": "https://www.yabandpay.com"
}
}
Example Response:
{
"status": true,
"code": "200",
"data": {
"order_id": "2024519846516588484",
"trade_id": "5902ea82-df87-bc30-3eef-c9cd1c64555c",
"amount": "1",
"currency": "EUR",
"parameters": {
"transaction_id": "2816660400948ddP1j0Et1lNHl2sOlC0bKn0"
},
"state": "processing"
},
"message": ""
}
More Information:
Return results:
On a successful API call, the response will be
"status": true.On a failed API call, the response will be
"status": false.
We strongly recommend using both Order Query and Asynchronous Notification simultaneously to synchronize and update payment status, ensuring real-time accuracy of payment information.
List of Wallets Supported by Alipay+:
The wallet list corresponding to the sub_pay_method_type supports the following payment scenarios:
| sub_pay_method_type | APP | WAP | Web | Mini Program |
|---|---|---|---|---|
| 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 | ✅ | ✅ | ✅ | ✅ |
Result/Error 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 |