Sale
- Description: Create sale payment
- Path:
/direct/sale
- Request Header: Content-Type: application/json
#
Request ParametersParameter | Type | Required | Description |
---|---|---|---|
merchantId | string | Required | Merchant identifier |
amount | number | Required | The payment amount |
merchantReference | string | Required | A reference for you to identify this payment, must be unique |
paymentType | string | Required | Payment type. Value can be ALIPAY , ALIPAYHK , WECHAT |
paymentTerminal | string | Required | Payment terminal type. Value can be SDK , WAP , PCWEB |
notifyUrl | string | Optional | Merchant backend listening endpoint, to receive notification |
lineItems | array | Required | |
lineItems[index].quantity | number | Required | Number of items |
lineItems[index].priceData | object | Required | Price data object with details |
lineItems[index].priceData.unitAmount | number | Required | Unit amount of the item |
lineItems[index].priceData.name | string | Required | Name of the item |
Example request:
#
Response ParametersParameter | Type | Required | Description |
---|---|---|---|
responseCode | string | Required | Payment Gateway response code |
message | string | Required | Payment Gateway response message |
wechatOrder | object | Optional | |
wechatOrder.appId | string | Optional | This identifier is issued after vendors apply for official account supporting WeChat payment |
wechatOrder.partnerId | string | Optional | Specifies vendor ID assigned by WeChat Payment. It is the sub mch_id when calling the unified order API |
wechatOrder.packageValue | string | Optional | Wechat package value |
wechatOrder.nonceStr | string | Optional | Random string to ensure unpredictability for signatures |
wechatOrder.timeStamp | string | Optional | Specifies the current time |
wechatOrder.sign | string | Optional | Specifies a signature |
alipayData | string | Optional | Alipay response data |
#
Example:Wechat response:
Alipay response:
- Alipay
- Please follow https://global.alipay.com/docs/ac/app/client_integration to finish the SDK integration.
- After get above response from BBMSL, please call below method to invoke Alipay to finish payment.
- Wechatpay
- Before you can start accepting WeChat Pay in-app payments, you need to:
- 2.1 Create a developer account on the WeChat Open Platform. https://open.weixin.qq.com/
- 2.2 Register your mobile app on WeChat Open Platform. After you get the appId, please contact BBMSL technical support and send the appId to technical support.
- 2.3 Integrate WeChat's mobile SDKs. https://developers.weixin.qq.com/doc/oplatform/Downloads/iOS_Resource.html
- After get above response from BBMSL, please call below method to invoke Wechatpay to finish payment.