Documentation/API Reference

API REFERENCE

Authorization Capture

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

Authorization Capture

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

Request parameters6

Required fields first

Authorization Capture

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

Applies to: capture after authorization

Capture the order after successful authorization. Capture must occur within 30 days of authorization completion; otherwise, the authorization expires automatically.

The capture currency must match the authorization currency, and the amount must not exceed the original authorized amount.

Only one capture is accepted for each authorized transaction. Multiple captures are not supported.

ParameterTypeDescriptionRequired
userStringCashier account UIDRequired
signStringSignatureRequired
methodStringv3.CaptureRequired
timeLongTimestampRequired
  • Parameters
ParameterTypeDescriptionRequired
trade_idStringtrade_id of the authorizationRequired
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
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

"amount=1&currency=EUR&description=test&method=v3.Capture&notify_url=https://www.yabandpay.com/notify&request_id=ca51f2fas3i0f8uiw7efj6oe4i2w1ghj&time=1720684254&trade_id=160899f3-f6d9-a8d8-ab5b-82eacdab9c5b&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.Capture",
    "time": 1720684254,
    "data": {
        "description": "test",
        "trade_id": "160899f3-f6d9-a8d8-ab5b-82eacdab9c5b",
        "amount": "1",
        "currency": "EUR",
        "notify_url": "https://www.yabandpay.com/notify",
        "request_id": "ca51f2fas3i0f8uiw7efj6oe4i2w1ghj"
    }
}

Response example:

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

Additional information:

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

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

We strongly recommend using both Query Order and Asynchronous Notifications to keep payment statuses accurate and up to date.

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-4089Exceed capture window
false-4084The captured amount exceeds the original authorized amount
false-4085The captured currency is different from the original authorization currency
false-4024The original trade ID is incorrect