UnionPay E-commerce
Available:UnionPay-Online
API URL:https://mapi.yabandpay.com/Payments
Method:POST
POST data type:Json
| Parameter | Type | Description | Required | 
|---|---|---|---|
| user | String | the UID of cashier account | Required | 
| sign | String | signature | Required | 
| method | String | v3.CreatePayments | Required | 
| time | Long | timestamp | Required | 
- Parameter
| Parameter | Type | Description | Required | 
|---|---|---|---|
| pay_method | String | online | Required | 
| sub_pay_method | String | UnionPayWap | Required | 
| order_id | String | order id from Merchant | Required | 
| amount | String | format in cents: € 24.99 should be 24.99, the min amount is EUR 1.00 | Required | 
| currency | String | ISO 4217, For example EUR, CHF | Required | 
| description | String | order description | Required | 
| demo | String | custom field | Optional | 
| timeout | String | Timeout (minutes) value 0-1440 | Required | 
| redirect_url | String | the redirect URL after payment is completed | Optional | 
| notify_url | String | asynchronous notification url | Required | 
Signature:
Lexicographical sequence and URL key-value format new string
"amount=1¤cy=EUR&demo=test&description=YabandPay test&method=v3.CreatePayments¬ify_url=https://www.yabandpay.com/notify&order_id=20248416516546816541&pay_method=online&redirect_url=https://www.yabandpay.com&sub_pay_method=UnionPayWap&time=1546588959&timeout=0&user=016683"
Use stringA and secret_key to get stringSign
Get Signature:
"de99616b19cd26bcd289c7dffcee95e9e4e0985f7985f10453c45a3b891e78da"
Example Request:
{
    "user": "016683",
    "sign": "de99616b19cd26bcd289c7dffcee95e9e4e0985f7985f10453c45a3b891e78da",
    "method": "v3.CreatePayments",
    "time": 1546588959,
    "data": {
        "description": "YabandPay test",
        "timeout":"0",
        "pay_method": "online",
        "sub_pay_method": "UnionPayWap",
        "order_id": "20248416516546816541",
        "amount": "1",
        "currency": "EUR",
        "redirect_url": "https://www.yabandpay.com",
        "notify_url": "https://www.yabandpay.com/notify",
        "demo": "test"
    }
}
Example Response:
{
    "status": true,
    "code": "200",
    "data": {
        "order_id": "20248416516546816541",
        "trade_id": "d80e6ed6-e5e1-04f2-42b9-6aa18e74c3ea",
        "amount": "1.00",
        "currency": "EUR",
        "settlement_amount": "1.00",
        "settlement_currency": "EUR",
        "exchange_rate": "1",
        "url": "https://pay.yabandpay.com/payments/callback/order/ZDgwZTZlZDYtZTVlMS0wNGYyLTQyYjktNmFhMThlNzRjM2Vh",
        "state": "processing"
    },
    "message": ""
}
More Information:
Return results:
- On a successful API call, the response will be - "status": true.
- On a failed API call, the response will be - "status": false.
We strongly recommend using both Order Query and Asynchronous Notification simultaneously to synchronize and update payment status, ensuring real-time accuracy of payment information.
Result/Error codes:
| Status | Code | Message | 
|---|---|---|
| true | 200 | Success | 
| false | -1000 | Internal error | 
| false | -3001 | Required field is missing | 
| false | -403 | The signature Error | 
| false | -4011 | Not support the payment method |