Documentation/API Reference

API REFERENCE

Card Payment

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

Card Payment

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

Request parameters15

Required fields first

Card Payment

pay_methodRequiredstringdata.pay_methodonline
sub_pay_methodRequiredstringdata.sub_pay_methodCard
operationRequiredstringdata.operation1.Sales 2.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
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
payment_token_objectChoose onestringdata.payment_token_objectString obtained from the YabandPay payment pluginProvide either cardinfo or payment_token_object
cardinfoChoose onestringdata.cardinfoCard informationProvide either cardinfo or payment_token_object. Treat cardinfo as a string (do not include the fields inside cardinfo in the parameter sorting).
demoOptionalstringdata.demoCustom field
redirect_urlOptionalstringdata.redirect_urlRedirect URL after payment

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.

For card authorizations and direct purchases

This API is for customers who enter card details on the merchant’s page rather than on a redirected YabandPay hosted page. Please note:

  1. Merchants with PCI DSS certification and the ability to handle cardholder data securely can build their own card details form and submit the data through cardinfo.

  2. If the merchant collects card details using YabandPay’s frontend plugin (contact YabandPay for integration instructions), the plugin returns a one-time encrypted payment_token_object for the subsequent payment request.

Tip

Authorizations are valid for 30 days. Authorization orders expire automatically after 30 days.

ParameterTypeDescriptionRequired
userStringCashier account UIDRequired
signStringSignatureRequired
methodStringv3.CreateCardPaymentsRequired
timeLongTimestampRequired
  • Parameters
ParameterTypeDescriptionRequired
pay_methodStringonlineRequired
sub_pay_methodStringCardRequired
operationString1.Sales 2.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_exemptionStringLowValueRequired when 3ds_initiate=03
payment_token_objectStringString obtained from the YabandPay payment pluginProvide either cardinfo or payment_token_object
cardinfoStringCard informationProvide either cardinfo or payment_token_object. Treat cardinfo as a string (do not include the fields inside cardinfo in the parameter 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
amountStringAmount as a numeric string. For example, enter 24.99 for € 24.99.Required
currencyStringISO 4217 currency code, for example EUR or CHFRequired
descriptionStringOrder descriptionRequired
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&cardinfo={"card_holder":"John Smith","card_number":"4356789012345670","expiration_month":"01","expiration_year":"2023","cvc":"123"}&currency=EUR&description=test&email=JohnSmith@gmail.com&method=v3.CreateCardPayments&notify_url=https://www.yabandpay.com/notify&operation=1&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“

Request example using cardinfo:


{
	"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": "1",
		"order_id": 1756878556,
		"cardinfo": "{\"card_holder\":\"John Smith\",\"card_number\":\"4356789012345670\",\"expiration_month\":\"01\",\"expiration_year\":\"2023\",\"cvc\":\"123\"}",
		"sca_exemption": "LowValue",
        "email": "JohnSmith@gmail.com",
		"amount": "0.1",
		"currency": "EUR",
        "redirect_url": "https://www.yabandpay.com/redirect_url",
        "notify_url": "https://www.yabandpay.com/notify",
		"request_id": "a7z1lox4l6z6mdx1udgn5gtezasze1x0"
	}
}

Request example using payment_token_object:

{
    "user": "YOUR_CASHIER_UID",
    "sign": "YOUR_SIGNATURE",
    "method": "v3.CreateCardPayments",
    "time": 1720680417,
    "data": {
        "payment_token_object": "4564sf65as4f5awe4ft65awe4gt65ewaa4t65ew4t65ew4t65rew4t",
        "description": "test",
        "3ds_initiate": "01",
        "timeout": "0",
        "pay_method": "online",
        "sub_pay_method": "Card",
        "operation": "1",
        "order_id": "YOUR_ORDER_ID",
        "amount": "1",
        "currency": "EUR",
        "redirect_url": "https://www.yabandpay.com/redirect_url",
        "notify_url": "https://www.yabandpay.com/notify",
        "request_id": "tscqf7ki76o7aem4z1yl1xs72f89fptl"
    }
}

Response example:

{
    "status": true,
    "code": "200",
    "data": {
        "order_id": "YOUR_ORDER_ID",
        "trade_id": "160899f3-f6d9-a8d8-ab5b-82eacdab9c5b",
        "amount": "1.00",
        "currency": "EUR",
        "url": "https://pay.yabandpay.com/payments/callback/order/MTYwODk5ZjMtZjZkOS1hOGQ4LWFiNWItODJlYWNkYWI5YzVi",
        "state": "processing"
    },
    "message": "",
    "response_id": "202407111544200649155078"
}

Additional information:

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

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

Redirect the customer to the returned url. After completing 3DS there, 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. a) An order state of paid indicates a successful payment. b) An order state of authorized indicates a successful authorization. To capture an authorized payment, call the Capture Authorization API.

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