Documentation/API Reference

API REFERENCE

Token Payments

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

Token Payments

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

Request parameters12

Required fields first

Token Payments

pay_methodRequiredstringdata.pay_methodonline
sub_pay_methodRequiredstringdata.sub_pay_methodToken
operationRequiredstringdata.operation11.Token for sales 12.Token for authorisation;
amountRequiredstringdata.amountAmount as a numeric string. For example, enter 24.99 for € 24.99.
currencyRequiredstringdata.currencyISO 4217 currency code, for example EUR or CHF
payment_token_objectRequiredstringdata.payment_token_objectPayment Token
descriptionRequiredstringdata.descriptionOrder description
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 1
demoOptionalstringdata.demoCustom field

Request parameters

3ds_initiateRequiredstringdata.3ds_initiate01. Enable 3DS verification; 02. Disable 3DS (requires activation approval); 03. SCA exemption (requires activation approval).

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

Applies to: initiating Token payments - credit cards

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 numeric 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_methodStringTokenRequired
operationString11.Token for sales 12.Token for authorisation;Required
order_idStringMerchant order IDRequired
3ds_initiateString01. Enable 3DS verification; 02. Disable 3DS (requires activation approval); 03. SCA exemption (requires activation approval).Required
sca_exemptionStringLowValue3ds_initiate=03 Required
amountStringAmount as a numeric string. For example, enter 24.99 for € 24.99.Required
currencyStringISO 4217 currency code, for example EUR or CHFRequired
payment_token_objectStringPayment TokenRequired
descriptionStringOrder descriptionRequired
demoStringCustom fieldOptional
timeoutStringExpiration time in minutes (0-1440)Required
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=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 and Asynchronous Notifications 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