API REFERENCE
Pagamentos Web
Parâmetros
| Parameter | Type | Descrição | Obrigatório |
|---|---|---|---|
| data.pay_method | string | online | ✓ |
| data.sub_pay_method | string | Alipay | ✓ |
| data.sub_pay_method_type | string | 参考支持的钱包列表 | — |
| data.order_id | string | 商户的订单ID | ✓ |
| data.amount | string | 金额数字。例如 € 24.99 应该写成24.99,CNY金额>=1,欧元金额>=0.1 | ✓ |
| data.currency | string | 货币代码,ISO 4217,例如EUR,CHF | ✓ |
| data.description | string | 订单描述 | ✓ |
| data.demo | string | 自定义字段 | — |
| data.timeout | string | 过期时间单位分钟(0-1440) | ✓ |
| data.redirect_url | string | 支付完成后跳转地址 | — |
| data.notify_url | string | 支付完成后异步通知地址 | ✓ |
Aplicável a: Alipay Web
| Parâmetro | Tipo | Descrição | Obrigatório |
|---|---|---|---|
| user | String | Conta do operador de caixa UID | Obrigatório |
| sign | String | Signature | Obrigatório |
| method | String | v3.CreatePaymentsAlipayWeb | Obrigatório |
| time | Long | Timestamp | Obrigatório |
- Parameters
| Parâmetro | Tipo | Descrição | Obrigatório |
|---|---|---|---|
| pay_method | String | online | Obrigatório |
| sub_pay_method | String | Alipay | Obrigatório |
| sub_pay_method_type | String | Consulte a lista de carteiras suportadas | Opcional |
| order_id | String | ID do pedido do comerciante | Obrigatório |
| amount | String | Montante em formato de cadeia numérica. Por exemplo, introduza 24.99 para € 24.99. Montante em CNY >=1; montante em EUR >=0.1. | Obrigatório |
| currency | String | Código de moeda ISO 4217, como EUR ou CHF | Obrigatório |
| description | String | Descrição do pedido | Obrigatório |
| demo | String | Campo personalizado | Opcional |
| timeout | String | Tempo de expiração em minutos (0-1440) | Obrigatório |
| redirect_url | String | URL de redirecionamento após o pagamento | Opcional |
| notify_url | String | URL de notificação assíncrona após o pagamento | Obrigatório |
| redirect_url | String | URL de redirecionamento após o pagamento | Opcional |
Signature example:
Parâmetros ordenados e concatenados numa cadeia de consulta no formato de URL
"amount=1¤cy=EUR&description=YabandPay test&method=v3.CreatePaymentsAlipayWeb¬ify_url=https://www.yabandpay.com/notify&order_id=20234947457979708&pay_method=online&redirect_url=https://www.yabandpay.com&sub_pay_method=Alipay&time=1546588959&timeout=0&user=YOUR_CASHIER_UID"
Assine a stringA utilizando secret_key
A assinatura resultante é:
"YOUR_SIGNATURE"
Submission example:
{
"user": "YOUR_CASHIER_UID",
"sign": "YOUR_SIGNATURE",
"method": "v3.CreatePaymentsAlipayWeb",
"time": 1546588959,
"data": {
"description": "YabandPay test",
"timeout":"0",
"pay_method": "online",
"sub_pay_method": "Alipay",
"order_id": "YOUR_ORDER_ID",
"amount": "1",
"currency": "EUR",
"redirect_url": "https://www.yabandpay.com",
"notify_url": "https://www.yabandpay.com/notify"
}
}
Response example:
{
"status": true,
"code": "200",
"data": {
"order_id": "YOUR_ORDER_ID",
"trade_id": "3148ad26-8c58-9cb5-d52d-9f3d78a40eeb",
"amount": "1.00",
"currency": "EUR",
"url": "https://open-sea-global.alipayplus.com/api/open/v1/ac/cashier/self/codevalue/checkout.htm?codeValue=281666040095AppH6HJK89glcF0cyxq8ZkPK",
"state": "processing"
},
"message": ""
}
Additional information:
Response result:
-
Um pedido bem-sucedido devolve "status": true.
-
Um pedido mal-sucedido devolve "status": false.
Recomendamos vivamente utilizar Query Order e Asynchronous Notifications para manter os estados dos pagamentos corretos e atualizados.
Carteiras suportadas pelo Alipay+:
As carteiras correspondentes a sub_pay_method_type suportam os seguintes cenários de pagamento:
| 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 | ✅ | ✅ | ✅ | ✅ |
Response 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 |
