API REFERENCE
Obtener token (integración directa)
Parámetros
| Parameter | Type | Descripción | Obligatorio |
|---|---|---|---|
| data.pay_method | string | online | ✓ |
| data.sub_pay_method | string | Card | ✓ |
| data.operation | string | 10.Create Token only; 11.Token for sales; 12.Token for authorisation | ✓ |
| data.order_id | integer | 商户的订单ID | ✓ |
| data.cardinfo | string | 卡信息 | — |
| data.amount | string | 金额数字。例如 € 24.99 应该写成24.99。如果operation为10,请设置amount=0 | ✓ |
| data.currency | string | 货币代码,ISO 4217,例如EUR,CHF | ✓ |
| data.description | string | 订单描述 | ✓ |
| data.email | string | 持卡人email | ✓ |
| data.demo | string | 自定义字段 | — |
| data.timeout | string | 过期时间单位分钟(0-1440) | ✓ |
| data.redirect_url | string | 支付完成后跳转地址 | — |
| data.notify_url | string | 支付完成后异步通知地址 | ✓ |
| data.request_id | string | 请求id需保持唯一,建议24以上位数字+字母 | ✓ |
| data.3ds_initiate | string | 3ds设置。 01. 必须开启3ds验证; | ✓ |
| data.sca_exemption | string | SCA 豁免类型;样例中的该字段受 3DS 模式约束。 | ✓ |
Se aplica a: comercios e instituciones certificados según PCI DSS
Utilice esta API para completar un pago de extremo a extremo (la verificación 3DS es obligatoria). YabandPay convierte los datos confidenciales del titular en una cadena aleatoria (un token) para eliminar la información identificativa. El token puede utilizarse para los siguientes pagos:
- Los usuarios pueden pagar con un solo clic en la página de pago sin introducir los datos de la tarjeta de crédito.
- Los comercios pueden utilizar este token para pagos recurrentes, cargos de suscripción y otros fines similares.
[!TIP|style:flat] Workflow
- Active los pagos con token. Póngase en contacto con su gestor de cuenta para habilitar esta función.
- Obtenga el consentimiento del usuario. Al habilitar pagos exprés (pagos con token) para consumidores, debe informarles claramente y obtener su consentimiento para evitar posibles disputas.
- Get a Token. First, initiate a standard credit card transaction. YabandPay returns a url. After the user completes 3DS verification through that url, YabandPay returns the Token in an asynchronous notification using the payment_token_object parameter.
- Inicie un pago con token. Incluya el token en la payment_token_object variable. If Token validation succeeds, YabandPay processes the Token payment. If validation fails, YabandPay returns an error. In that case, we recommend repeating this transaction flow to obtain a Token and then initiating payment again.
| Parámetro | Tipo | Descripción | Obligatorio |
|---|---|---|---|
| user | String | Cashier account UID | Obligatorio |
| sign | String | Signature | Obligatorio |
| method | String | v3.CreateCardPayments | Obligatorio |
| time | Long | Timestamp | Obligatorio |
- Parameters
| Parámetro | Tipo | Descripción | Obligatorio |
|---|---|---|---|
| pay_method | String | online | Obligatorio |
| sub_pay_method | String | Card | Obligatorio |
| operation | String | 10.Create Token only; 11.Token for sales; 12.Token for authorisation | Obligatorio |
| order_id | String | Merchant order ID | Obligatorio |
| 3ds_initiate | String | 3ds settings. 01. 3ds verification must be enabled; | Obligatorio |
| cardinfo | String | Card information | Treat the value of cardinfo as a string (fields within cardinfo do not need to be included in sorting) |
| cardinfo.card_holder | string | Cardholder name | Obligatorio |
| cardinfo.card_number | string | Card number | Obligatorio |
| cardinfo.expiration_month | string | Card expiration month, MM | Obligatorio |
| cardinfo.expiration_year | string | Card expiration year, YYYY | Obligatorio |
| cardinfo.cvc | string | CVC (storing the CVC in any form violates PCI DSS requirements) | Obligatorio |
| amount | String | Numeric amount. For example, € 24.99 must be written as 24.99. If operation is 10, set amount=0 | Obligatorio |
| currency | String | ISO 4217 currency code, for example EUR or CHF | Obligatorio |
| description | String | Order description | Obligatorio |
| string | Cardholder email | 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 |
| request_id | String | Unique request ID; a combination of digits and letters at least 24 characters is recommended | Obligatorio |
Signature example:
Sorted parameters concatenated into a URL-style query string
"3ds_initiate=01&amount=0.1&cardinfo={"card_holder":"John Smith","email":"JohnSmith@gmail.com","card_number":"4356789012345670","expiration_month":"01","expiration_year":"2023","cvc":"123"}¤cy=EUR&description=test&method=v3.CreateCardPayments¬ify_url=https://www.yabandpay.com/notify&operation=11&order_id=1756878556&pay_method=online&redirect_url=https://www.yabandpay.com/redirect_url&request_id=a7z1lox4l6z6mdx1udgn5gtezasze1x0&sca_exemption=LowValue&sub_pay_method=Card&time=1756878556&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.CreateCardPayments",
"time": 1756878556,
"data": {
"description": "test",
"3ds_initiate": "01",
"timeout": "0",
"pay_method": "online",
"sub_pay_method": "Card",
"operation": "11",
"order_id": 1756878556,
"cardinfo": "{\"card_holder\":\"John Smith\",\"card_number\":\"4356789012345670\",\"expiration_month\":\"01\",\"expiration_year\":\"2023\",\"cvc\":\"123\"}",
"sca_exemption": "LowValue",
"amount": "0.1",
"currency": "EUR",
"email": "JohnSmith@gmail.com",
"redirect_url": "https://www.yabandpay.com/redirect_url",
"notify_url": "https://www.yabandpay.com/notify",
"request_id": "a7z1lox4l6z6mdx1udgn5gtezasze1x0"
}
}
Response example:
{
"status": true,
"code": "200",
"data": {
"order_id": "YOUR_ORDER_ID",
"trade_id": "2b2aa1af-6e97-4c01-8c52-86200bf66c82",
"amount": "0.1",
"currency": "EUR",
"url": "https://pay.yabandpay.com/pay_method/Y3JlZGl0Y2FyZA==/MmIyYWExYWYtNmU5Ny00YzAxLThjNTItODYyMDBiZjY2Yzgy",
"state": "processing"
},
"message": "",
"response_id": "202409091749500451314672"
}
Additional information:
MIT & CIT :
MIT = Merchant Initiated subsequent transactions. Token payments initiated by the merchant.
CIT = Cardholder Initiated Subsequent transactions. Token payments involving the customer. When activating payments, specify whether you need MIT or CIT so the appropriate mode can be configured.
Payment result:
-
A successful request returns "status": true.
-
A failed request returns "status": false.
Redirija al cliente a la url. After entering card details and completing payment at this url, the customer is redirected to redirect_url. Recomendamos encarecidamente utilizar tanto Consulta de pedido como Notificaciones asíncronas para mantener los estados de pago precisos y actualizados.
Returned Token:
-
After the customer grants authorization and the payment succeeds, YabandPay returns payment_token_object through an asynchronous notification.
-
If the customer does not grant authorization or does not complete payment, the asynchronous notification does not return payment_token_object.
3DS low-value exemption:
Transactions within the following limits may qualify as low-value transactions. If the order amount is less than or equal to the applicable amount below, transaction code 02 (low-value exemption) may be used with approval.
| # | Currency | Amount |
|---|---|---|
| 1 | EUR | 30 |
| 2 | DKK | 225 |
| 3 | GBP | 27 |
| 4 | SEK | 310 |
| 5 | ISK | 5000 |
| 6 | NOK | 325 |
| 7 | CHF | 32 |
| 8 | PLN | 135 |
| 9 | USD | 36 |
Response codes:
| Status | Code | Message |
|---|---|---|
| true | 200 | |
| false | -1000 | Internal error |
| false | -403 | The signature Error |
| false | -2001 | The user not exist |
| false | -3001 | Required field is missing |
| false | -4118 | Incorrect request ID |
| false | -4120 | No operational permissions |
