Documentation/API Reference

API REFERENCE

Get Token

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

Get Token

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

Request parameters15

Required fields first

Get Token (HPP)

pay_methodRequiredstringdata.pay_methodonline
sub_pay_methodRequiredstringdata.sub_pay_methodCards HPP
operationRequiredstringdata.operation10.Create Token only; 11.Token for sales; 12.Token for authorisation
amountRequiredstringdata.amountNumeric amount. For example, € 24.99 must be written as 24.99. If operation is 10, set amount=0
currencyRequiredstringdata.currencyISO 4217 currency code, for example EUR or CHF
descriptionRequiredstringdata.descriptionOrder description
emailRequiredstringdata.emailCardholder email
timeoutRequiredstringdata.timeoutExpiration time in minutes (0-1440)
notify_urlRequiredstringdata.notify_urlAsynchronous notification URL after payment
request_idRequiredstringdata.request_idUnique request ID; a combination of digits and letters at least 24 characters is recommended
Optional parameters 4
cardinfoOptionalstringdata.cardinfoCard information
form_typeOptionalstringdata.form_typeType of the returned url. Default: 01. 01.completed, 02.iframe
demoOptionalstringdata.demoCustom field
redirect_urlOptionalstringdata.redirect_urlRedirect URL after payment

Request parameters

3ds_initiateRequiredstringdata.3ds_initiate3ds settings. 01. 3ds verification must be enabled;

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

Applies to: obtaining a Token through the YabandPay hosted payment page

YabandPay’s Hosted Payment Page (HPP) is a ready-to-use payment page fully maintained by YabandPay. Merchants can accept payments securely by hosting sensitive PCI data within YabandPay’s system. The form can be embedded in the merchant’s checkout flow as an iframe or a redirect page.

After the payer completes a standard credit card transaction on the YabandPay hosted payment page and gives consent, YabandPay converts sensitive cardholder data into a random string (a Token) to remove identifying information. The Token can be used for the following payments:

  1. Users can pay with one click on the checkout page without entering credit card details.
  2. Merchants can use this Token for recurring payments, subscription charges, and similar purposes.

[!TIP|style:flat] Workflow

  1. Enable Token payments. Contact your account manager to activate the Token payment feature.
  1. Obtain user consent. When enabling express payments (Token payments) for consumers, you must clearly inform users and obtain their consent to avoid potential disputes.
  1. Get a Token. First, initiate a standard credit card transaction. YabandPay returns a payment url. After the user completes payment through that url and gives consent, YabandPay returns the Token in an asynchronous notification using the payment_token_object parameter.
  1. Initiate a Token payment. Include the Token in the 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 initiating another standard credit card transaction to obtain a Token and then initiating payment again.
ParameterTypeDescriptionRequired
userStringCashier account UIDRequired
signStringSignatureRequired
methodStringv3.CreateCardPaymentsRequired
timeLongTimestampRequired
  • Parameters
ParameterTypeDescriptionRequired
pay_methodStringonlineRequired
sub_pay_methodStringCards HPPRequired
operationString10.Create Token only; 11.Token for sales; 12.Token for authorisationRequired
order_idStringMerchant order IDRequired
3ds_initiateString3ds settings. 01. 3ds verification must be enabled;Required
cardinfoStringCard informationTreat the value of cardinfo as a string (fields within cardinfo do not need to be included in sorting)
cardinfo.card_holderstringCardholder nameRequired
cardinfo.card_numberstringCard numberRequired
cardinfo.expiration_monthstringCard expiration month, MMRequired
cardinfo.expiration_yearstringCard expiration year, YYYYRequired
cardinfo.cvcstringCVC (storing the CVC in any form violates PCI DSS requirements)Required
amountStringNumeric amount. For example, € 24.99 must be written as 24.99. If operation is 10, set amount=0Required
currencyStringISO 4217 currency code, for example EUR or CHFRequired
descriptionStringOrder descriptionRequired
form_typeStringType of the returned url. Default: 01. 01.completed, 02.iframeOptional
demoStringCustom fieldOptional
emailstringCardholder emailRequired
timeoutStringExpiration time in minutes (0-1440)Required
redirect_urlStringRedirect URL after paymentOptional
notify_urlStringAsynchronous notification URL after paymentRequired
request_idStringUnique request ID; a combination of digits and letters at least 24 characters is recommendedRequired

Signature example:

Sorted parameters concatenated into a URL-style query string

"3ds_initiate=01&amount=0.1&currency=EUR&description=test&email=JohnSmith@gmail.com&form_type=01&method=v3.CreateCardPayments&notify_url=https://www.yabandpay.com/notify&operation=11&order_id=1725875388&pay_method=online&request_id=dxktqiedfpkswnripi631ppg6fl2uoym&sub_pay_method=Cards HPP&time=1725875388&timeout=30&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": 1725875388,
    "data": {
        "3ds_initiate": "01",
        "description": "test",
        "timeout": "30",
        "pay_method": "online",
        "sub_pay_method": "Cards HPP",
        "operation": "11",
        "form_type": "01",
        "order_id": 1725875388,
        "amount": "0.1",
        "currency": "EUR",
        "email": "JohnSmith@gmail.com",
        "notify_url": "https://www.yabandpay.com/notify",
        "request_id": "dxktqiedfpkswnripi631ppg6fl2uoym"
    }
}

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:
  1. A successful request returns "status": true.

  2. A failed request returns "status": false.

Redirect the customer to the returned url. After entering card details and completing payment at this url, the customer is redirected to redirect_url. We strongly recommend using both Query Order and Asynchronous Notifications to keep payment statuses accurate and up to date.

Returned Token:
  1. After the customer grants authorization and the payment succeeds, YabandPay returns payment_token_object through an asynchronous notification.

  2. 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.

#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-4120No operational permissions