YabandPay API - English| 中文

Version: 3.1 English

Update Date: 17-04-2019

Payment Method: WeChat Pay and Alipay


1. Signature Algorithm

1.1 Get all payment parameters. Presume all data sent and received is the set M. Set all values in M in ascending alphabetical order (i.e. lexicographical sequence), and join them into string A via the corresponding URL key-value format (e.g. key1=value1&key2=value2…). Notes: Sort parameter names in ascending alphabetical order based on their ASCII encoded names (e.g. lexicographical sequence); Parameter names are case-sensitive; When checking returned data or a YabandPay push notification signature, the transferred sign parameter and 'data' are excluded in this signature as it is compared with the created signature.

1.2 Use stringA and secret_key to get stringSign, perform HMAC-SHA256 arithmetic on stringSign, thus get sign's value (signValue).

For example:

a) Get all payment parameters

array(13) {
  ["description"] => string(27) "YabandPay test"
  ["timeout"] => string(1) "0"
  ["pay_method"] => string(8) "online"
  ["sub_pay_method"] => string(6) "WeChat Pay"
  ["order_id"] => string(17) "20180902014018888"
  ["amount"] => string(3) "0.1"
  ["currency"] => string(3) "EUR"
  ["redirect_url"] => string(49) "https://www.yabandmedia.com/pay/redirectpage.php"
  ["notify_url"] => string(44) "https://www.yabandmedia.com/pay/webhook2.php"
  ["demo"] => string(4) "test"
  ["user"] => string(20) "[email protected]"
  ["method"] => string(17) "v3.CreatePayments"
  ["time"] => int(1555498137)
}

b) Lexicographical sequence

array(13) {
  ["amount"] => string(3) "0.1"
  ["currency"] => string(3) "EUR"
  ["demo"] => string(3) "test"
  ["description"] => string(27) "YabandPay test"
  ["method"] => string(17) "v3.CreatePayments"
  ["notify_url"] => string(44) "https://www.yabandmedia.com/pay/webhook2.php"
  ["order_id"] => string(17) "20180902014018888"
  ["pay_method"] => string(8) "online"
  ["redirect_url"] => string(49) "https://www.yabandmedia.com/pay/redirectpage.php"
  ["sub_pay_method"] => string(6) "WeChat Pay"
  ["time"] => int(1555498137)
  ["timeout"] => string(1) "0"
  ["user"] => string(20) "[email protected]"
}

c) URL key-value format new string


string(326) "amount=0.1&currency=EUR&demo=test&description=YabandPay test&method=v3.CreatePayments&notify_url=https://www.yabandmedia.com/pay/webhook2.php&order_id=20180902014018888&pay_method=online&redirect_url=https://www.yabandmedia.com/pay/redirectpage.php&sub_pay_method=WeChat Pay&time=1555498137&timeout=0&[email protected]"

d) Use stringA and secret_key to get stringSign secret_key in this example is 62184c09df1aeb63239e07079875be81 .

string(64) "d73fdee1125c6b4ca8db381bf0364bc21f90890897a94e4359fba516bdbed922"

2. Test Account

YabandPay provides the following account for testing.

[email protected]

secret_key=62184c09df1aeb63239e07079875be81


3. Quick Payment

Barcode Payment

This payment method is available in store, Merchant scans the barcode of customer on WeChat App or Alipay App to receive the payment.

a) Present payment code. Customer presents Alipay / WeChat payment code to cashier

b) Scan payment code. Cashier scans the payment code

c) Payment successful. Payment complete

Available: WeChat Pay and Alipay

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

Method:POST

POST data type: Json

Parameter Type Description Mark
user String the user account generated by YabandPay Required
sign String signature Required
method String v3.CreatePayments Required
time Long timestamp Required

Signature:

Lexicographical sequence and URL key-value format new string


"amount=0.1&auth_code=134443133735495918&currency=EUR&demo=test&description=YabandPay test&method=v3.CreatePayments&notify_url=https://www.yabandmedia.com/pay/webhook2.php&order_id=2019040865658688&pay_method=in_store&sub_pay_method=WeChat Pay&time=1555499083&timeout=0&[email protected]"

Use stringA and secret_key to get stringSign

Get Signature:

"57bbf12222d7087735a4058a559fe794658eb0572e77354d368750047c1ac2a4"

Parameter:

Parameter Type Description Mark
pay_method String in_store Required
sub_pay_method String WeChat Pay, Alipay, will be obtained through the API of GetSubPay 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 0.10 or CNY 1.00 Required
currency String EUR or CNY Required
demo String custom field Optional
auth_code String the Payment QR Code scanned from customer's WeChat / Alipay Wallet Required
description String order description Required
timeout String value 0 means 1440 minutes Optional
notify_url String asynchronous notification url Optional

Example Request:

{
	"user": "[email protected]",
	"sign": "57bbf12222d7087735a4058a559fe794658eb0572e77354d368750047c1ac2a4",
	"method": "v3.CreatePayments",
	"time": 1555499083,
	"data": {
		"amount": "0.1",
		"auth_code": "134443133735495918",
		"currency": "EUR",
		"demo": "test",
		"description": "YabandPay test",
		"notify_url": "https://www.yabandmedia.com/pay/webhook2.php",
		"order_id": "2019040865658688",
		"pay_method": "in_store",
		"sub_pay_method": "WeChat Pay",
		"timeout": "0"
	}
}

Example Response:


{
    "status": true,
    "code": "200",
    "data": {
        "order_id": "2019040865658688",
        "trade_id": "511444d0-2d91-5396-9e34-f2900e80d715",
        "amount": "0.10",
        "currency": "EUR",
        "settlement_amount": "0.10",
        "settlement_currency": "EUR",
        "exchange_rate": "1",
        "url": "https://partner.yabandpay.com/payments/callback/order/NTExNDQ0ZDAtMmQ5MS01Mzk2LTllMzQtZjI5MDBlODBkNzE1",
        "state": "processing"
    },
    "message": ""
}


4. Get sub_pay_method

This API is only available for Quick Payment. You can use this API to get the value of sub_pay_method after obtaining auth_code to distinguish whether customer use WeChat App or Alipay App.

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

Method:POST

POST data type: Json

Parameter Type Description Mark
user String the user account generated by YabandPay Required
sign String signature Required
method String v3.GetSubPay Required
time Long timestamp Required

Parameter:

Parameter Type Description Mark
auth_code String it will be obtained through scan the QR Code of customer's App Required

Signature:

Lexicographical sequence and URL key-value format new string


"auth_code=135056725249518813&method=v3.GetSubPay&time=1546588959&[email protected]"

Use stringA and secret_key to get stringSign

Get Signature:

"7a3ee5f2a6399ee3ccbb9b673d26e75546e4d948cbf3682f93f4c001bb74bdb7"

Example Request:


{
	"user": "[email protected]",
	"sign": "7a3ee5f2a6399ee3ccbb9b673d26e75546e4d948cbf3682f93f4c001bb74bdb7",
	"method": "v3.GetSubPay",
	"time": 1546588959,
	"data": {
		"auth_code": "135056725249518813"
	}
}

Example Response:


{
    "status": true,
    "code": "200",
    "data": {
        "auth_code": "135056725249518813",
        "sub_pay_method": "WeChat Pay"
    },
    "message": ""
}


5.Unifiedorder Payment

Available: WeChat Pay and Alipay

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

Method:POST

POST data type: Json

Parameter Type Description Mark
user String the user account generated by YabandPay Required
sign String signature Required
method String v3.CreatePayments Required
time Long timestamp Required

Parameter:

Parameter Type Description Mark
pay_method String online Required
sub_pay_method String WeChat Pay,Alipay,YabandPay 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 0.10 or CNY 1.00 Required
currency String EUR or CNY Required
description String order description Required
demo String custom field Optional
timeout String value 0 means 1440 minutes Optional
redirect_url String the redirect URL after payment is completed Required
notify_url String asynchronous notification url Required

Signature:

Lexicographical sequence and URL key-value format new string


"amount=0.1&currency=EUR&demo=test&description=YabandPay test&method=v3.CreatePayments&notify_url=https://www.yabandmedia.com/pay/webhook2.php&order_id=20180902014018888&pay_method=online&redirect_url=https://www.yabandmedia.com/pay/redirectpage.php&sub_pay_method=WeChat Pay&time=1555498137&timeout=0&[email protected]"

Use stringA and secret_key to get stringSign

Get Signature:

"d73fdee1125c6b4ca8db381bf0364bc21f90890897a94e4359fba516bdbed922"

Example Request:

{
	"user": "[email protected]",
	"sign": "d73fdee1125c6b4ca8db381bf0364bc21f90890897a94e4359fba516bdbed922",
	"method": "v3.CreatePayments",
	"time": 1555498137,
	"data": {
		"amount": "0.1",
		"currency": "EUR",
		"demo": "test",
		"description": "YabandPay test",
		"notify_url": "https://www.yabandmedia.com/pay/webhook2.php",
		"order_id": "20180902014018888",
		"pay_method": "online",
		"redirect_url": "https://www.yabandmedia.com/pay/redirectpage.php",
		"sub_pay_method": "WeChat Pay",
		"timeout": "0"
	}
}

Example Response:


{
    "status": true,
    "code": "200",
    "data": {
        "order_id": "20180902014018888",
        "trade_id": "4552eeea-1ae8-1e40-3b4b-802dc2f5686a",
        "amount": "0.10",
        "currency": "EUR",
        "settlement_amount": "0.10",
        "settlement_currency": "EUR",
        "exchange_rate": "1",
        "url": "https://partner.yabandpay.com/payments/callback/order/NDU1MmVlZWEtMWFlOC0xZTQwLTNiNGItODAyZGMyZjU2ODZh",
        "state": "processing"
    },
    "message": ""
}

1. PC browser or ECR System

sub_pay_method

In PC browser or ECR screen, Customer scans the QR Code which is generated from Merchant to complete the payment on WeChat App or Alipay App.

YabandPay supports the original QR Code of WeChat Pay or Alipay, and also integrated QR Code (this QR code support WeChat Pay and Alipay) which is generated by YabandPay itself.

About the integrated QR Code of WeChat Pay or Alipay, Merchant can generate the QR Code based on the return url and display it to customers, then query payment result via the Query Order API, or waiting for the payment result via Notify API.

2. Integrated Payment

Regardless of any browser, include PC, H5, or App etc. YabandPay will call up corresponding payment method based on different occasions.

WeChat Pay Alipay YaBandPay
Mobile browser generate QR Code for WeChat Pay call up Alipay generare intergrated QR Code
H5 browser in App generate QR Code for WeChat Pay call up Alipay generare intergrated QR Code
WeChat browser (in WeChat App) call up WeChat Pay generate QR Code for Alipay call up WeChat Pay
Alipay browser ( in Alipay App) generate QR Code for WeChat Pay call up Alipay call up Alipay
PC browser generate QR Code for WeChat Pay generate QR Code for Alipay generare intergrated QR Code

6. WeChat mini-program Payment

Available: WeChat Pay

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

Method:POST

POST data type: Json

Parameter Type Description Mark
user String the user account generated by YabandPay Required
sign String signature Required
method String v3.CreatePaymentsWechatMiniPay Required
time Long timestamp Required

Parameter:

Parameter Type Description Mark
pay_method String online Required
sub_pay_method String WeChat Pay 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 0.10 or CNY 1.001 Required
currency String EUR or CNY Required
description String order description Required
demo String custom field Optional
timeout String value 0 means 1440 minutes Optional
notify_url String asynchronous notification url Required
sub_app_id String the APPID of WeChat mini-program account Required
sub_open_id String open_id of customer, it will be obtained through the API of WeChat Required

Signature:

Lexicographical sequence and URL key-value format new string


"amount=0.1&currency=EUR&description=YabandPay test&method=v3.CreatePaymentsWechatMiniPay&notify_url=https://www.yabandmedia.com/pay/webhook2.php&order_id=20180902014018888&pay_method=online&sub_app_id=wx54afe855ab7112e8&sub_open_id=o7AXy5CuUQ0exDlZdhb-M7KMsmEg&sub_pay_method=WeChat Pay&time=1546588959&timeout=0&[email protected]"

Use stringA and secret_key to get stringSign

Get Signature:

"438110b44ad0788091854a31c68b9c0fb01d62f3fbb728944b4df8fe0ac017d5"

Example Request:


{
	"user": "[email protected]",
	"sign": "438110b44ad0788091854a31c68b9c0fb01d62f3fbb728944b4df8fe0ac017d5",
	"method": "v3.CreatePaymentsWechatMiniPay",
	"time": 1546588959,
	"data": {
		"description": "YabandPay test",
		"timeout": "0",
		"pay_method": "online",
		"sub_pay_method": "WeChat Pay",
		"order_id": "20180902014018888",
		"amount": "0.1",
		"currency": "EUR",
		"notify_url": "https://www.yabandmedia.com/pay/webhook2.php",
		"sub_app_id": "wx54afe855ab7112e8",
		"sub_open_id": "o7AXy5CuUQ0exDlZdhb-M7KMsmEg"
	}
}

Example Response:


{
    "status": true,
    "code": "200",
    "data": {
        "order_id": "20180902014018888",
        "trade_id": "d6775583-3b68-87af-996a-a1d30a7a3923",
        "amount": "0.10",
        "currency": "EUR",
        "settlement_amount": "0.10",
        "settlement_currency": "EUR",
        "exchange_rate": "1",
        "parameters": {
            "appId": "wx54afe855ab7112e8",
            "package": "prepay_id=wx17192406956168becf712f272061576476",
            "paySign": "5446bec354c4b507e1a1fbeb942f3441c65e3b9f6bb6a9ab4027b9800738c113",
            "nonceStr": "0e3b39a276f97d3d9843edebd44f4d76",
            "signType": "HMAC-SHA256",
            "timeStamp": "1555500247"
        },
        "state": "processing"
    },
    "message": ""
}

Please put the return parameters to mini-program, the parameters inside can allow the mini-prorgam to call up WeChat Pay.

( WeChat mini-prorgam developers know how to do)


7. In-App Payment (WeChat Pay)

When customer make payment in Apps, it will open up WeChat app to process the payment.

Available: WeChat Pay

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

Method:POST

POST data type: Json

Parameter Type Description Mark
user String the user account generated by YabandPay Required
sign String signature Required
method String v3.CreatePaymentsWechatAPPPay Required
time Long timestamp Required

Parameter:

Parameter Type Description Mark
pay_method String online Required
sub_pay_method String WeChat Pay 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 0.10 or CNY 1.001 Required
currency String EUR or CNY Required
description String order description Required
demo String custom field Optional
timeout String value 0 means 1440 minutes Optional
notify_url String asynchronous notification url Required
sub_app_id String the APPID from WeChat Open Platform Required
sub_open_id String open_id of customer, it will be obtained through the API of WeChat Required

Signature:

Lexicographical sequence and URL key-value format new string


"amount=0.1&currency=EUR&description=YabandPay test&method=v3.CreatePaymentsWechatAPPPay&notify_url=https://www.yabandmedia.com/pay/webhook2.php&order_id=20180902014018888&pay_method=online&sub_app_id=wx54afe855ab7112e8&sub_open_id=o7AXy5CuUQ0exDlZdhb-M7KMsmEg&sub_pay_method=WeChat Pay&time=1546588959&timeout=0&[email protected]"

Use stringA and secret_key to get stringSign

Get Signature:

"d121c13c990bdfeaa76508736d7354140e76967539052f69838edaa21b752403"

Example Request:


{
	"user": "[email protected]",
	"sign": "d121c13c990bdfeaa76508736d7354140e76967539052f69838edaa21b752403",
	"method": "v3.CreatePaymentsWechatAPPPay",
	"time": 1546588959,
	"data": {
		"description": "YabandPay test",
		"timeout": "0",
		"pay_method": "online",
		"sub_pay_method": "WeChat Pay",
		"order_id": "20180902014018888",
		"amount": "0.1",
		"currency": "EUR",
		"notify_url": "https://www.yabandmedia.com/pay/webhook2.php",
		"sub_app_id": "wx54afe855ab7112e8",
		"sub_open_id": "o7AXy5CuUQ0exDlZdhb-M7KMsmEg"
	}
}

Example Response:


{
    "status": true,
    "code": "200",
    "data": {
        "order_id": "20180902014018888",
        "trade_id": "d6775583-3b68-87af-996a-a1d30a7a3923",
        "amount": "0.10",
        "currency": "EUR",
        "settlement_amount": "0.10",
        "settlement_currency": "EUR",
        "exchange_rate": "1",
        "parameters": {
            "appId": "wx54afe855ab7112e8",
            "package": "Sign=WXPay",
            "prepay_id":"wx17192406956168becf712f272061576476",
            "paySign": "5446bec354c4b507e1a1fbeb942f3441c65e3b9f6bb6a9ab4027b9800738c113",
            "nonceStr": "0e3b39a276f97d3d9843edebd44f4d76",
            "signType": "HMAC-SHA256",
            "timeStamp": "1555500247"
        },
        "state": "processing"
    },
    "message": ""
}

Please put the return parameters to App, the parameters inside can allow the App to call up WeChat Pay.

( App developers know how to do)


8. Cancel Payment Order

Order can be cancelled before it is completed.

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

Method:POST

POST data type: Json

Parameter Type Description Mark
user String the user account generated by YabandPay Required
sign String signature Required
method String v3.CancelPayOrder Required
time Long timestamp Required

Parameter:

Parameter Type Description Marke
trade_id String the trade_id from YabandPay Required

Signature:

Lexicographical sequence and URL key-value format new string


"method=v3.CancelPayOrder&time=1546588959&trade_id=13be658c-7ebd-5f6d-944f-1761b2b9ff26&[email protected]"

Use stringA and secret_key to get stringSign

Get Signature:

"d13c1996ab16ced2c1b90106699cc032aeba346bd2bccbc53cb93db9498ea0c0"

Example Request:


{
	"user": "[email protected]",
	"sign": "d13c1996ab16ced2c1b90106699cc032aeba346bd2bccbc53cb93db9498ea0c0",
	"method": "v3.CancelPayOrder",
	"time": 1546588959,
	"data": {
		"trade_id": "13be658c-7ebd-5f6d-944f-1761b2b9ff26"
	}
}

Example Response:


{
    "status": true,
    "code": "200",
    "data": {
        "trade_id": "13be658c-7ebd-5f6d-944f-1761b2b9ff26",
        "state": "cancelled"
    },
    "message": ""
}


9. Refund Order

For a period after a payment transaction has been completed and a refund is required by either the Payer or Merchant, the Merchant can refund the Payer via this API. After the YabandPay receives and verifies the refund request successfully, the Payer will be refunded with the request refund amount (less than or equal to the original payment amount) according to the refund rules.

Notes:

  1. For any transaction completed more than 3 months prior, a refund is not supported;

  2. A refund for a transaction can be processed in the form of multiple partial refunds. In this case, the original order number is required . The total refund amount cannot exceed the original payment amount.

  3. Partial refund for one order should be less than 50 times.

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

Method:POST

POST data type: Json

Parameter Type Description Mark
user String the user account generated by YabandPay Required
sign String signature Required
method String v3.CreateRefund Required
time Long timestamp Required

Parameter:

Parameter Type Description Mark
trade_id String the trade_id from YabandPay Required
refund_amount String refund amount,Format in cents: € 1.99 should be 1.99 Required
refund_currency String settlement currency Required
refund_description String refund description Required
notify_url String asynchronous notification url Required

Signature:

Lexicographical sequence and URL key-value format new string


"method=v3.CreateRefund&notify_url=https://www.yabandmedia.com/pay/redirectpage.php&refund_amount=0.1&refund_currency=EUR&refund_description=test&time=1546588959&trade_id=5feb401d-d9a4-776f-211f-882b60f14d9d&[email protected]"

Use stringA and secret_key to get stringSign

Get Signature:

"0deaeca7d174598254bb396c9c8f158a8e07cd9e3f69a024134c4073e30cda63"

Example Request:


{
	"user": "[email protected]",
	"sign": "0deaeca7d174598254bb396c9c8f158a8e07cd9e3f69a024134c4073e30cda63",
	"method": "v3.CreateRefund",
	"time": 1546588959,
	"data": {
		"trade_id": "5feb401d-d9a4-776f-211f-882b60f14d9d",
		"refund_amount": "0.1",
		"refund_currency": "EUR",
		"refund_description": "test",
		"notify_url": "https://www.yabandmedia.com/pay/redirectpage.php"
	}
}

Example Response:


{
    "status": true,
    "code": "200",
    "data": {
        "trade_id": "5feb401d-d9a4-776f-211f-882b60f14d9d",
        "refund_id": "3841510a-4d18-4a61-808d-431a45006de2",
        "refund_amount": "0.10",
        "refund_currency": "EUR",
        "state": "refund processing"
    },
    "message": ""
}


10. Query Order

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

Method:POST

POST data type: Json

Parameter Type Description Mark
user String the user account generated by YabandPay Required
sign String signature Required
method String v3.QueryOrder Required
time Long timestamp Required

Parameter:

Parameter Type Description Mark
trade_id String the trade_id from YabandPay Required

Signature:

Lexicographical sequence and URL key-value format new string


"method=v3.QueryOrder&time=1546588959&trade_id=a8d9be05-8b39-a766-dad0-553b0640d06a&[email protected]"

Use stringA and secret_key to get stringSign

Get Signature:

"788c474dbc7e35900a9498f1f1714cd82344304a85d4e85aab2115436af0c008"

Example Request:


{
    "user": "[email protected]",
	"sign": "788c474dbc7e35900a9498f1f1714cd82344304a85d4e85aab2115436af0c008",
	"method": "v3.QueryOrder",
	"time": 1546588959,
	"data": {
		"trade_id": "a8d9be05-8b39-a766-dad0-553b0640d06a",
    }
}

Example Response:

{
    "status": true,
    "code": "200",
    "data": {
        "transaction_info": 
            {
                "trade_id": "a8d9be05-8b39-a766-dad0-553b0640d06a",
                "merchant_name": "Yaband Telecom B.V.",
                "store_name": "Test",
                "cashier_email": "[email protected]",
                "cashier_name": "H Feng",
                "pay_method": "online",
                "sub_pay_method": "WeChat Pay",
                "order_id": "20180902014018888",
                "amount": "0.10",
                "currency": "EUR",
                "settlement_amount": "0.10",
                "settlement_currency": "EUR",
                "exchange_rate": "1",
                "description": "YabandPay test",
                "created_at": "1555496062",
                "redirect_url": "",
                "notify_url": "https://www.yabandmedia.com/pay/webhook2.php",
                "state": "paid",
                "time_out": "43200",
                "transaction_id": "4200000298201904178716759138",
                "paid_at": "1555496139",
                "refund_info": [
                    {
                        "refund_id": "d04b698f-b2f5-45fc-8d3a-3135f360b452",
                        "refund_time": "1555496301",
                        "state": "Refund Processing",
                        "refund_amount": "0.10",
                        "refund_currency": "EUR",
                        "refund_description": "Yaband Telecom B.V. refund",
                        "notify_url": "https://www.yabandmedia.com/pay/webhook2.php",
                    }
                ]
            }
    },
    "message": ""
}

11. Redirect URL

When the customer completes the payment (success, failed or expired), the page will go back to your redirect url. Along with the payment result, YabandPay will jump to the redirect url that you have set. Result Data is from json data, which is composed of signature and payment state.

Attention: There may be some problems during page redirect process, such as network, hardware, customer close page etc., so the final result should be comfirmed via the Notify API.

Parameter Type Description
sign String signature
type String payment,refund
user String the user account generated by YabandPay
amount String the amount submitted
currency String EUR or CNY, the currency submitted
settlement_amount String the settlement amount
settlement_currency String EUR, the settlement currency
exchange_rate String exchange rate
order_id String order id from Merchant
transaction_id String the order id from WeChat Pay or Alipay
description String order description
createDate String create date
state String processing,cancelled,paid,expired
demo String custom field

Example Response:

{
	"sign": "f8d958062ac0cc4e7952a432e4ac5caa40e246cedb9de0a207be18c1deef889c",
	"data": {
		"type": "payment",
		"user": "[email protected]",
		"order_id": "190510140815",
		"trade_id": "8a8aa7c7-66d7-e2cc-e2a6-fff7c77aaefd",
		"transaction_id": "4200000298201905227377147799",
		"amount": "1.00",
		"currency": "EUR",
		"settlement_amount": "1.00",
		"settlement_currency": "EUR",
		"exchange_rate": "1",
		"description": "yaband test",
		"nonce_string": "fq8qf6q8",
		"createDate": "1558510731",
		"state": "paid",
		"demo": "test"
	}
}

12. Notify

Notify URL is used for receiving the payment status notification. When an order is created, YaBandPay API will deliver the status change to you each time during the payment process. The notification of the delivered status must apply https protocol. The content of the notification is made up of signature.payment status (Note that there is a dot between the signature and the payment status json).

a) The notification of payment

Parameter Type Description
sign String signature
type String payment
user String the user account generated by YabandPay
amount String the amount submitted
currency String EUR or CNY, the currency submitted
settlement_amount String the settlement amount
settlement_currency String EUR,the settlement currency
exchange_rate String exchange rate
order_id String the order id from Merchant
trade_id String the trade id from YabandPay
transaction_id String the order id from WeChat Pay or Alipay
description String order description
createDate String create date
state String processing,cancelled,paid,expired
demo String custom field

Notification information:

{
	"sign": "f8d958062ac0cc4e7952a432e4ac5caa40e246cedb9de0a207be18c1deef889c",
	"data": {
		"type": "payment",
		"user": "[email protected]",
		"order_id": "190510140815",
		"trade_id": "8a8aa7c7-66d7-e2cc-e2a6-fff7c77aaefd",
		"transaction_id": "4200000298201905227377147799",
		"amount": "1.00",
		"currency": "EUR",
		"settlement_amount": "1.00",
		"settlement_currency": "EUR",
		"exchange_rate": "1",
		"description": "yaband test",
		"createDate": "1558510731",
		"state": "paid",
		"demo": "test"
	}
} 

b) The notification of refund

Parameter Type Description
sign String signature
type String refund
user String the user account generated by YabandPay
trade_id String the trade id from YabanadPay
refund_amount String the amount submitted
refund_currency String the settlement currency
order_id String the order id from Merchant
refund_id String the refund id
description String refund description
createDate String create date
state String refund processing,refunded

Notification information:

{
	"sign": "02b85a909ad66b458c7376a6c1157219ad49907f4c06c0e8509a113bf83d384c",
	"data": {
		"type": "payment",
		"user": "[email protected]",
		"refund_amount": "0.10",
		"refund_currency": "EUR",
		"trade_id": "a105be9a-0434-7a56-e58f-1471a5320d64",
		"description": "YabandPay refund test",
		"order_id": "20180902014018888",
		"createDate": "1555496624",		
		"refund_id": "fe3936be-ddcb-42fd-ba5c-2582de637d34",
		"state": "refund processing"
	}
}   

the state is refund processing after refund request

the state is refunded after refund requet completed

Note : The response of notification must return status-code 200, and body must return ok. If ok is not returned, then we will send the notification again.

The frequency of notifications is as follows:

Retry Frequency
1 10s
2 30s
3 60s
4 300s
5 3600s
... 3600s
15 3600s

Yabandpay will not send nocification once more if ok is not returned after 15 times.

13. Logo

You can click here to download the Logos of WeChat Pay and Alipay.