API REFERENCE
Solución de pago alojada (HPP)
Parámetros
| Parameter | Type | Descripción | Obligatorio |
|---|---|---|---|
| data.pay_method | string | online | ✓ |
| data.sub_pay_method | string | List | ✓ |
| data.order_id | string | 商户的订单ID | ✓ |
| data.operation | string | 1.Sales 2.Authorisation; | ✓ |
| data.amount | string | 金额数字。例如 € 24.99 应该写成24.99,CNY金额>=1,欧元金额>=0.1(iDeal支付、Sofort支付、PayPal支付,欧元金额>=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 | 支付完成后异步通知地址 | ✓ |
Métodos de pago admitidos: todos los métodos de pago
Esta solución utiliza una página de pago alojada (HPP): YabandPay aloja el proceso de pago, donde los clientes seleccionan un método y pagan. Los comercios solo tienen que integrar este proceso, en lugar de cada método de pago por separado, lo que simplifica la gestión y las actualizaciones futuras.
| Parámetro | Tipo | Descripción | Obligatorio |
|---|---|---|---|
| user | String | Cashier account UID | Obligatorio |
| sign | String | Signature | Obligatorio |
| method | String | v3.CreatePayments | Obligatorio |
| time | Long | Timestamp | Obligatorio |
- Parameters
| Parámetro | Tipo | Descripción | Obligatorio |
|---|---|---|---|
| pay_method | String | online | Obligatorio |
| sub_pay_method | String | List | Obligatorio |
| order_id | String | Merchant order ID | Obligatorio |
| operation | String | 1.Sales 2.Authorisation; | Obligatorio |
| amount | String | Amount as a numeric string. For example, enter 24.99 for € 24.99. CNY amount >=1; EUR amount >=0.1 (for iDeal, Sofort, and PayPal, EUR amount >=1). | Obligatorio |
| currency | String | ISO 4217 currency code, for example EUR or CHF | Obligatorio |
| description | String | Order description | Obligatorio |
| demo | String | Custom field | Opcional |
| timeout | String | Expiration time in minutes (0-1440) | Obligatorio |
| redirect_url | String | Redirect URL after payment | Opcional |
| notify_url | String | Asynchronous notification URL after payment | Obligatorio |
Signature example:
Sorted parameters concatenated into a URL-style query string
"amount=1¤cy=EUR&demo=test&description=YabandPay test&method=v3.CreatePayments¬ify_url=https://www.yabandpay.com/notify&operation=1&order_id=20248746132489&pay_method=online&redirect_url=https://www.yabandpay.com&sub_pay_method=List&time=1546588900&timeout=0&user=YOUR_CASHIER_UID"
Sign stringA using secret_key
The resulting signature is:
"YOUR_SIGNATURE"
Request example:
{
"user": "YOUR_CASHIER_UID",
"sign": "YOUR_SIGNATURE",
"method": "v3.CreatePayments",
"time": 1546588900,
"data": {
"description": "YabandPay test",
"timeout": "0",
"operation": "1",
"pay_method": "online",
"sub_pay_method": "List",
"order_id": "YOUR_ORDER_ID",
"amount": "1",
"currency": "EUR",
"redirect_url": "https://www.yabandpay.com",
"notify_url": "https://www.yabandpay.com/notify",
"demo": "test"
}
}
Response example:
{
"status": true,
"code": "200",
"data": {
"order_id": "YOUR_ORDER_ID",
"trade_id": "b769e338-20e7-35fa-dbb4-986892b96079",
"amount": "1.00",
"currency": "EUR",
"url": "https://pay.yabandpay.com/SelectPay/Yjc2OWUzMzgtMjBlNy0zNWZhLWRiYjQtOTg2ODkyYjk2MDc5",
"state": "processing"
},
"message": ""
}
Additional information:
Response result:
-
A successful request returns "status": true.
-
A failed request returns "status": false.
Recomendamos encarecidamente utilizar tanto Consulta de pedido como Notificaciones asíncronas para mantener los estados de pago precisos y actualizados.
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 |
