Dokumentation/API-Referenz

API REFERENCE

Gutschein

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

Gutschein

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

Request parameters11

Required fields first

介绍

pay_methodRequiredstringdata.pay_methodonline
sub_pay_methodRequiredstringdata.sub_pay_methodVoucher
amountRequiredstringdata.amount金额数字。例如 € 24.99 应该写成24.99,欧元金额>=1
currencyRequiredstringdata.currencyEUR
descriptionRequiredstringdata.description订单描述
timeoutRequiredstringdata.timeout过期时间单位分钟(0-1440)
notify_urlRequiredstringdata.notify_url支付完成后异步通知地址
Optional parameters 4
demoOptionalstringdata.demo自定义字段
redirect_urlOptionalstringdata.redirect_url如果使用托管页面,支付完成后跳转地址
cardnumberOptionalstringdata.cardnumber礼品卡卡号(如使用页面跳转托管方式非必填)
pincodeOptionalstringdata.pincode礼品卡密码(如传cardnumber该字段必填)

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

Gilt für: Geschenkkarten

Bei dieser Zahlungsmethode wird eine Bestellung mit dem Guthaben einer Geschenkkarte bezahlt. Geschenkkarten müssen an der Verkaufsstelle aktiviert werden.

ParameterTypBeschreibungErforderlich
userStringKassiererkonauf UIDErforderlich
signStringSignatureErforderlich
methodStringv3.CreatePaymentsVoucherErforderlich
timeLongTimestampErforderlich
  • Parameter
ParameterTypBeschreibungErforderlich
pay_methodStringonlineErforderlich
sub_pay_methodStringVoucherErforderlich
order_idStringHändlerbestellnummerErforderlich
amountStringNumerischer Betrag. Zum Beispiel € 24.99 muss angegeben werden als 24.99; Euro-Betrag >=1Erforderlich
currencyStringEURErforderlich
descriptionStringBestellbeschreibungErforderlich
demoStringBenutzerdefiniertes FeldOptional
timeoutStringAblaufzeit in Minuten (0-1440)Erforderlich
redirect_urlStringWeiterleitungs-URL nach der Zahlung bei Verwendung der gehosteten SeiteOptional
notify_urlStringURL für asynchrone Benachrichtigung nach der ZahlungErforderlich
cardnumberStringGift card number (not required when redirecting auf the hosted page)Optional
pincodeStringGift card PIN (required if cardnumber is provided)Optional

Signaturbeispiel:

Nach Parametern sortierte Werte, verkettet zu einer URL-ähnlichen Abfragezeichenfolge

"amount=0.01&cardnumber=6064364245787814896&currency=EUR&demo=test&description=YabandPay test VVV&method=v3.CreatePaymentsVoucher&notify_url=https://www.yabandpay.com/notify&order_id=202405110140188881&pay_method=online&pincode=568971&redirect_url=https://www.yabandpay.com&sub_pay_method=Voucher&time=1546588959&timeout=0&user=YOUR_CASHIER_UID"

Signieren Sie die Zeichenfolge A mit secret_key

Die resultierende Signatur lautet:

"YOUR_SIGNATURE"

Anfragebeispiel:

{
    "user": "YOUR_CASHIER_UID",
    "sign": "YOUR_SIGNATURE",
    "method": "v3.CreatePaymentsVoucher",
    "time": 1546588959,
    "data": {
        "description": "YabandPay test VVV",
        "timeout": "0",
        "pay_method": "online",
        "sub_pay_method": "Voucher",
        "order_id": "YOUR_ORDER_ID",
        "amount": "0.01",
        "currency": "EUR",
        "redirect_url": "https://www.yabandpay.com",
        "notify_url": "https://www.yabandpay.com/notify",
        "demo": "test",
        "cardnumber": "6064364245787814896",
        "pincode": "568971"
    }
}

Antwortbeispiel:

{
    "status": true,
    "code": "200",
    "data": {
        "order_id": "YOUR_ORDER_ID",
        "trade_id": "535ea4a1-917a-bc14-58e2-d1565720af90",
        "amount": "0.01",
        "currency": "EUR",
        "settlement_amount": "0.01",
        "settlement_currency": "EUR",
        "exchange_rate": "1",
        "url": "",
        "state": "processing"
    },
    "message": ""
}

Hosted page integration:

Use this method auf verify the gift card number und PIN on the YabundPay hosted page. In this case, do not pass cardnumber or pincode. After the API call, redirect auf the returned url auf continue the payment flow.

Anfragebeispiel:

{
    "user": "YOUR_CASHIER_UID",
    "sign": "YOUR_SIGNATURE",
    "method": "v3.CreatePaymentsVoucher",
    "time": 1546588959,
    "data": {
        "description": "YabandPay test VVV",
        "timeout": "0",
        "pay_method": "online",
        "sub_pay_method": "Voucher",
        "order_id": "YOUR_ORDER_ID",
        "amount": "0.01",
        "currency": "EUR",
        "redirect_url": "https://www.yabandpay.com",
        "notify_url": "https://www.yabandpay.com/notify",
        "demo": "test"
    }
}

Antwortbeispiel:

{
    "status": true,
    "code": "200",
    "data": {
        "order_id": "YOUR_ORDER_ID",
        "trade_id": "c0d9c0bb-0b40-1cb6-7373-fd1a97c7124e",
        "amount": "0.01",
        "currency": "EUR",
        "url": "https://pay.yabandpay.com/payments/callback/order/YzBkOWMwYmItMGI0MC0xY2I2LTczNzMtZmQxYTk3YzcxMjRl",
        "state": "processing"
    },
    "message": ""
}

Zusätzliche Informationen:

Antwortergebnis:
  1. Eine erfolgreiche Anfrage gibt "status": true.

  2. Eine fehlgeschlagene Anfrage gibt "status": false.

Wir empfehlen dringend, sowohl Bestellabfrage und Asynchrone Benachrichtigungen um Zahlungsstatus korrekt und aktuell zu halten.

Antwortcodes:
StatusCodeMessage
true200
false-1000Internal error
false-104000You have entered an invalid amount
false-104221The voucher has insufficient funds
false-104222Invaild PinCode
false-104223This is an invalid giftcard, we are unable to find the giftcard brand