Documentation/API Reference

API REFERENCE

Decrease Authorization

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

Decrease Authorization

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

Request parameters6

Required fields first

Decrease Authorization

trade_idRequiredstringdata.trade_idtrade_id of the authorization to decrease
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
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

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

ParameterTypeDescriptionRequired
userStringCashier account UIDRequired
signStringSignatureRequired
methodStringv3.PreauthDecrementRequired
timeLongTimestampRequired
  • Parameters
ParameterTypeDescriptionRequired
trade_idStringtrade_id of the authorization to decreaseRequired
amountStringNumeric amount. For example, € 24.99 must be written as 24.99Required
currencyStringISO 4217 currency code, such as EUR or CHFRequired
descriptionStringOrder descriptionRequired
notify_urlStringAsynchronous notification URL after payment completionRequired
request_idStringUnique request id; at least 24 alphanumeric characters are recommendedRequired

Signature example:

Sorted parameters concatenated into a URL-style query string

"amount=0.1&currency=EUR&description=test&method=v3.PreauthDecrement&notify_url=https://www.yabandpay.com/notify&request_id=skc5vtsovtetqe09us0jdrqm1vjdeaki&time=1774246236&trade_id=9222e0e1-6ef5-639f-3692-90f1e2a33e68&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.PreauthDecrement",
    "time": 1774246236,
    "data": {
        "description": "test",
        "trade_id": "9222e0e1-6ef5-639f-3692-90f1e2a33e68",
        "amount": "0.1",
        "currency": "EUR",
        "notify_url": "https://www.yabandpay.com/notify",
        "request_id": "skc5vtsovtetqe09us0jdrqm1vjdeaki"
    }
}

Response example:

{
  "status": true,
  "code": "200",
  "data": {
    "order_id": "YOUR_ORDER_ID",
    "trade_id": "160899f3-f6d9-a8d8-ab5b-82eacdab9c5b",
    "amount": "1",
    "currency": "EUR",
    "state": "authorized"
  },
  "message": "",
  "response_id": "202407111550570060848432"
}

Additional information:

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

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

This API decreases the authorization amount. The result is returned synchronously. The decrease must not exceed the authorization amount.

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-4024The original trade ID is incorrect