Documentation/Référence API

API REFERENCE

Paiement par code QR

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

Paiement par code QR

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

Request parameters10

Required fields first

二维码支付

pay_methodRequiredstringdata.pay_methodoffline
sub_pay_methodRequiredstringdata.sub_pay_methodQRcode
amountRequiredstringdata.amount金额数字。例如 € 24.99 应该写成24.99,CNY金额>=1,欧元金额>=0.1
currencyRequiredstringdata.currency货币代码,ISO 4217,例如EUR,CHF
descriptionRequiredstringdata.description订单描述
timeoutRequiredstringdata.timeout过期时间单位分钟(0-1440)
notify_urlRequiredstringdata.notify_url支付完成后异步通知地址
Optional parameters 3
tip_amountOptionalstringdata.tip_amount总金额中包含的小费,金额数字。例如 1.02
demoOptionalstringdata.demo自定义字段
redirect_urlOptionalstringdata.redirect_url支付完成后跳转地址

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

Paramètres

ParameterTypeDescriptionObligatoire
data.pay_methodstringoffline✓
data.sub_pay_methodstringQRcode✓
data.order_idstring商户的订单ID✓
data.amountstring金额数字。例如 € 24.99 应该写成24.99,CNY金额>=1,欧元金额>=0.1✓
data.tip_amountstring总金额中包含的小费,金额数字。例如 1.02—
data.currencystring货币代码,ISO 4217,例如EUR,CHF✓
data.descriptionstring订单描述✓
data.demostring自定义字段—
data.timeoutstring过期时间单位分钟(0-1440)✓
data.redirect_urlstring支付完成后跳转地址—
data.notify_urlstring支付完成后异步通知地址✓

S’applique aux paiements en magasin

Conseil

Display the returned url (or a QR code generated from the url) and the icons of the available payment methods to the customer.

ParamètreTypeDescriptionObligatoire
userStringCashier account UIDObligatoire
signStringSignatureObligatoire
methodStringv3.QRcodePaymentObligatoire
timeLongTimestampObligatoire
  • Parameters
ParamètreTypeDescriptionObligatoire
pay_methodStringofflineObligatoire
sub_pay_methodStringQRcodeObligatoire
order_idStringMerchant order IDObligatoire
amountStringAmount as a numeric string. For example, enter 24.99 for € 24.99. CNY amount >=1; EUR amount >=0.1.Obligatoire
tip_amountStringTip included in the total amount, as a numeric string; for example 1.02Facultatif
currencyStringISO 4217 currency code, for example EUR or CHFObligatoire
descriptionStringOrder descriptionObligatoire
demoStringCustom fieldFacultatif
timeoutStringExpiration time in minutes (0-1440)Obligatoire
redirect_urlStringRedirect URL after paymentFacultatif
notify_urlStringAsynchronous notification URL after paymentObligatoire

Signature example:

Sorted parameters concatenated into a URL-style query string

 "amount=12.1&currency=EUR&demo=test&description=YabandPay test&method=v3.QRcodePayment&notify_url=https://www.yabandpay.com/notify&order_id=202486556498441613&pay_method=offline&redirect_url=https://www.yabandpay.com&sub_pay_method=QRcode&time=1555498137&timeout=0&tip_amount=0.5&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.QRcodePayment",
  "time": 1555498137,
  "data": {
    "amount": "12.1",
    "currency": "EUR",
    "tip_amount": "0.5",
    "demo": "test",
    "description": "YabandPay test",
    "notify_url": "https://www.yabandpay.com/notify",
    "order_id": "YOUR_ORDER_ID",
    "pay_method": "offline",
    "redirect_url": "https://www.yabandpay.com",
    "sub_pay_method": "QRcode",
    "timeout": "0"
  }
} 

Exemple de réponse:

{
  "status": true,
  "code": "200",
  "data": {
    "order_id": "YOUR_ORDER_ID",
    "trade_id": "4552eeea-1ae8-1e40-3b4b-802dc2f5686a",
    "amount": "12",
    "currency": "EUR",
    "tip_amount": "0.5",
    "url": "https://pay.yabandpay.com/payments/selectpay/order/ODlmYmYyMzQtN2U1Yy00ZDI5LTM5NWMtNGI4NzljYjI4MDlj",
    "available_payment_methods": "Alipay+, Wechat Pay, iDEAL, UnionPay, QuickPass, Bancontact, Visa, Mastercard, ApplePay, GooglePay",
    "state": "processing"
  },
  "message": ""} 

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
true200Success
false-1000Internal error
false-3001Required field is missing
false-403The signature Error
false-4011Not support the payment method