Documentation/Référence API

API REFERENCE

Capture d’autorisation

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

Capture d’autorisation

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

Request parameters6

Required fields first

预授权请款

trade_idRequiredstringdata.trade_id对应预授权的trade_id
amountRequiredstringdata.amount金额数字。例如 € 24.99 应该写成24.99
currencyRequiredstringdata.currency货币代码,ISO 4217,例如EUR,CHF
descriptionRequiredstringdata.description订单描述
notify_urlRequiredstringdata.notify_url支付完成后异步通知地址
request_idRequiredstringdata.request_id请求id需保持唯一,建议24以上位数字+字母

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

Paramètres

ParameterTypeDescriptionObligatoire
data.trade_idstring对应预授权的trade_id✓
data.amountstring金额数字。例如 € 24.99 应该写成24.99✓
data.currencystring货币代码,ISO 4217,例如EUR,CHF✓
data.descriptionstring订单描述✓
data.notify_urlstring支付完成后异步通知地址✓
data.request_idstring请求id需保持唯一,建议24以上位数字+字母✓

S’applique à la capture après autorisation

Capturez la commande après l’autorisation réussie. La capture doit avoir lieu dans un délai de 30 jours après la fin de l’autorisation ; passé ce délai, l’autorisation expire automatiquement.

La devise de capture doit correspondre à celle de l’autorisation, et le montant ne doit pas dépasser le montant initialement autorisé.

Une seule capture est acceptée par transaction autorisée. Les captures multiples ne sont pas prises en charge.

ParamètreTypeDescriptionObligatoire
userStringCashier account UIDObligatoire
signStringSignatureObligatoire
methodStringv3.CaptureObligatoire
timeLongTimestampObligatoire
  • Parameters
ParamètreTypeDescriptionObligatoire
trade_idStringtrade_id of the authorizationObligatoire
amountStringAmount as a numeric string. For example, enter 24.99 for € 24.99.Obligatoire
currencyStringISO 4217 currency code, for example EUR or CHFObligatoire
descriptionStringOrder descriptionObligatoire
notify_urlStringAsynchronous notification URL after paymentObligatoire
request_idStringUnique request ID; a combination of digits and letters at least 24 characters is recommendedObligatoire

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

Le champ resulting signature is:

"YOUR_SIGNATURE"

Exemple de requête:

{
    "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"
    }
}

Exemple de réponse:

{
    "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"
}

Informations complémentaires:

Résultat de la réponse:
  1. Une requête réussie renvoie "status": true.

  2. Une requête échouée renvoie "status": false.

Nous recommandons vivement d’utiliser à la fois Query Order and Asynchronous Notifications afin de maintenir les statuts de paiement exacts et à jour.

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