Documentatie/API-referentie

API REFERENCE

MobilePay

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

MobilePay

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

Request parameters9

Required fields first

介绍

pay_methodRequiredstringdata.pay_methodonline
sub_pay_methodRequiredstringdata.sub_pay_methodMobilePay
amountRequiredstringdata.amount金额数字。例如 EUR 24.99 应写成 24.99
currencyRequiredstringdata.currencyEUR
descriptionRequiredstringdata.description订单描述
timeoutRequiredstringdata.timeout过期时间单位分钟(0-1440)
notify_urlRequiredstringdata.notify_url支付完成后异步通知地址
Optional parameters 2
demoOptionalstringdata.demo自定义字段
redirect_urlOptionalstringdata.redirect_url支付完成后跳转地址

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

MobilePay ondersteunt het aanmaken van online betaalbestellingen door pay_method in te stellen op online en sub_pay_method op MobilePay.


API-URL:https://mapi.yabandpay.com/Payments

Methode:POST

POST gegevenstype:Json

ParameterTypeBeschrijvingVerplicht
userStringKassiersaccount UIDVerplicht
signStringSignatureVerplicht
methodStringv3.CreatePaymentsVerplicht
timeLongTimestampVerplicht
  • Parameters
ParameterTypeBeschrijvingVerplicht
pay_methodStringonlineVerplicht
sub_pay_methodStringMobilePayVerplicht
order_idStringBestel-ID van de handelaarVerplicht
amountStringNumeriek bedrag. Schrijf bijvoorbeeld EUR 24.99 als 24.99Verplicht
currencyStringEURVerplicht
descriptionStringBestelomschrijvingVerplicht
demoStringAangepast veldOptioneel
timeoutStringVervaltijd in minuten (0-1440)Verplicht
redirect_urlStringOmleidings-URL na betalingOptioneel
notify_urlStringURL voor asynchrone melding na betalingVerplicht

Handtekeningvoorbeeld:

Gesorteerde parameters aaneengevoegd tot een queryreeks in URL-stijl

"amount=1&currency=EUR&demo=test&description=YabandPay test&method=v3.CreatePayments&notify_url=https://www.yabandpay.com/notify&order_id=20240726785412369&pay_method=online&redirect_url=https://www.yabandpay.com&sub_pay_method=MobilePay&time=1646388458&timeout=0&user=YOUR_CASHIER_UID"

Onderteken de resulterende stringA met secret_key.

De resulterende handtekening is:

"YOUR_SIGNATURE"

Aanvraagvoorbeeld:

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

Antwoordvoorbeeld:

{
  "status": true,
  "code": "200",
  "data": {
    "order_id": "YOUR_ORDER_ID",
    "trade_id": "23615e31-75e2-45b8-a8ef-6d4175292b44",
    "amount": "1.00",
    "currency": "EUR",
    "url": "https://pay.yabandpay.com/pay_method/bW9iaWxlcGF5/MjM2MTVlMzEtNzVlMi00NWI4LWE4ZWYtNmQ0MTc1MjkyYjQ0",
    "state": "processing"
  },
  "message": ""
}

Aanvullende informatie:

Resultaat van het antwoord:
  1. Bij een geslaagde aanroep wordt "status": true geretourneerd.

  2. Bij een mislukte aanroep wordt "status": false geretourneerd.

We raden sterk aan zowel Bestelling opvragen als Asynchrone meldingen te gebruiken om de betalingsstatussen actueel en nauwkeurig te houden.

Antwoordcodes:
StatusCodeBericht
true200Success
false-1000Internal error
false-3001Required field is missing
false-403The signature Error
false-4011Not support the payment method