Documentación/Referencia de API

API REFERENCE

Pagos con token

POSThttps://mapi.yabandpay.com/Payments
Live API
API PLAYGROUND · Live API

Pagos con token

POSThttps://mapi.yabandpay.com/Payments
Automatically signed with your credentials

Request parameters12

Required fields first

Token支付

pay_methodRequiredstringdata.pay_methodonline
sub_pay_methodRequiredstringdata.sub_pay_methodToken
operationRequiredstringdata.operation11.Token for sales 12.Token for authorisation;
amountRequiredstringdata.amount金额数字。例如 € 24.99 应该写成24.99
currencyRequiredstringdata.currency货币代码,ISO 4217,例如EUR,CHF
payment_token_objectRequiredstringdata.payment_token_object支付Token
descriptionRequiredstringdata.description订单描述
timeoutRequiredstringdata.timeout过期时间单位分钟(0-1440)
notify_urlRequiredstringdata.notify_url支付完成后异步通知地址
request_idRequiredstringdata.request_id请求id需保持唯一,建议24以上位数字+字母
Optional parameters 1
demoOptionalstringdata.demo自定义字段

请求参数

3ds_initiateRequiredstringdata.3ds_initiate01. 开启3ds验证; 02.不开启3DS(需申请开通);03. SCA豁免(需申请开通);

Credentials stay on this page. Your secret key is never stored or sent to the documentation server.

Parámetros

ParameterTypeDescripciónObligatorio
data.pay_methodstringonline✓
data.sub_pay_methodstringToken✓
data.operationstring11.Token for sales 12.Token for authorisation;✓
data.order_idinteger商户的订单ID✓
data.sca_exemptionstringLowValue✓
data.amountstring金额数字。例如 € 24.99 应该写成24.99✓
data.currencystring货币代码,ISO 4217,例如EUR,CHF✓
data.payment_token_objectstring支付Token✓
data.descriptionstring订单描述✓
data.demostring自定义字段—
data.timeoutstring过期时间单位分钟(0-1440)✓
data.notify_urlstring支付完成后异步通知地址✓
data.request_idstring请求id需保持唯一,建议24以上位数字+字母✓
data.3ds_initiatestring01. 开启3ds验证; 02.不开启3DS(需申请开通);03. SCA豁免(需申请开通);✓

Se aplica a: iniciar pagos con token mediante tarjetas de crédito

Después de que el pagador complete una transacción estándar con tarjeta de crédito en la página de pago alojada por YabandPay y dé su consentimiento, YabandPay convierte los datos confidenciales del titular en una cadena numérica aleatoria (un token) para eliminar la información identificativa. El token puede utilizarse para los siguientes pagos:

  1. Los usuarios pueden pagar con un solo clic en la página de pago sin introducir los datos de la tarjeta de crédito.
  2. Los comercios pueden utilizar este token para pagos recurrentes, cargos de suscripción y otros fines similares.

[!TIP|style:flat] Workflow

  1. Active los pagos con token. Póngase en contacto con su gestor de cuenta para habilitar esta función.
  1. 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.
  1. Obtener un token. Primero, inicie una transacción estándar con tarjeta de crédito. YabandPay devuelve una URL de pago. Cuando el usuario complete el pago mediante esa URL y dé su consentimiento, YabandPay devolverá el token en una notificación asíncrona utilizando el parámetro payment_token_object parameter.
  1. Inicie un pago con token. Incluya el token en la payment_token_object variable. Si la validación del token es correcta, YabandPay procesa el pago con token. Si falla, YabandPay devuelve un error. En ese caso, recomendamos iniciar otra transacción estándar con tarjeta para obtener un token y volver a iniciar el pago.
ParámetroTipoDescripciónObligatorio
userStringCashier account UIDObligatorio
signStringSignatureObligatorio
methodStringv3.CreateCardPaymentsObligatorio
timeLongTimestampObligatorio
  • Parameters
ParámetroTipoDescripciónObligatorio
pay_methodStringonlineObligatorio
sub_pay_methodStringTokenObligatorio
operationString11.Token for sales 12.Token for authorisation;Obligatorio
order_idStringMerchant order IDObligatorio
3ds_initiateString01. Enable 3DS verification; 02. Disable 3DS (requires activation approval); 03. SCA exemption (requires activation approval).Obligatorio
sca_exemptionStringLowValue3ds_initiate=03 Required
amountStringAmount as a numeric string. For example, enter 24.99 for € 24.99.Obligatorio
currencyStringISO 4217 currency code, for example EUR or CHFObligatorio
payment_token_objectStringPayment TokenObligatorio
descriptionStringOrder descriptionObligatorio
demoStringCustom fieldOpcional
timeoutStringExpiration time in minutes (0-1440)Obligatorio
notify_urlStringAsynchronous notification URL after paymentObligatorio
request_idStringUnique request ID; a combination of digits and letters at least 24 characters is recommendedObligatorio

Signature example:

Sorted parameters concatenated into a URL-style query string

"3ds_initiate=01&amount=1&currency=EUR&description=test&method=v3.CreateCardPayments&notify_url=https://www.yabandpay.com/notify&operation=11&order_id=1725875543&pay_method=online&payment_token_object=VnXaRabcsedfsSlPFZXavcsdfasdEFDd&request_id=hjf5lv32i40lh7oh86j6az98tnscwv37&sub_pay_method=Token&time=1725875543&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": 1725875543,
    "data": {
        "3ds_initiate": "01",
        "description": "test",
        "timeout": "0",
        "pay_method": "online",
        "sub_pay_method": "Token",
        "operation": "11",
        "order_id": 1725875543,
        "amount": "1",
        "currency": "EUR",
        "payment_token_object": "VnXaRabcsedfsSlPFZXavcsdfasdEFDd",
        "notify_url": "https://www.yabandpay.com/notify",
        "request_id": "hjf5lv32i40lh7oh86j6az98tnscwv37"
    }
}

Response example:

{
    "status": true,
    "code": "200",
    "data": {
        "order_id": "YOUR_ORDER_ID",
        "trade_id": "109bb0e9-e1fb-49cb-c537-ec944f33c388",
        "amount": "1.00",
        "currency": "EUR",
        "state": "paid"
    },
    "message": "",
    "response_id": "202409091752241912726578"
}

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.

Response result:
  1. A successful request returns "status": true.

  2. If the call fails, "status": false is returned. If you receive Invalid Token, we recommend calling HPP Token again to obtain a new Token.

The API returns the payment status synchronously. We strongly recommend using both Order Query como Notificaciones asíncronas to synchronize and update the payment status and keep payment information accurate in real time. a) If the order status state is paid, payment succeeded; b) if the order status state is authorized, authorization succeeded. To capture funds after successful authorization, call the authorization capture API.

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.

#CurrencyAmount
1EUR30
2DKK225
3GBP27
4SEK310
5ISK5000
6NOK325
7CHF32
8PLN135
9USD36
Response codes:
StatusCodeMessage
true200
false-1000Internal error
false-403The signature Error
false-2001The user not exist
false-3001Required field is missing
false-4118Incorrect request ID
false-4119Invalid Token
false-4120No operational permissions