Create
- API: Create Order
- Description: Create order with hosted checkout url
- Path: /hosted-checkout/create
- Method: POST
- Request Header: Content-Type: application/json
#
Request Parametersparameter | type | require | description |
---|---|---|---|
merchantId | string | Y | |
amount | number | Y | |
merchantReference | string | Y | merchant's reference number, must be unique. |
callbackUrl | object | O | |
callbackUrl.success | string | O | |
callbackUrl.fail | string | O | |
callbackUrl.cancel | string | O | |
callbackUrl.notify | string | O | |
isRecurring | boolean | O | Recurring payment 1:Yes 0:No. Default is 0. |
lineItems | array | Y | |
lineItems[index].quantity | number | Y | |
lineItems[index].priceData | object | Y | |
lineItems[index].priceData.unitAmount | number | Y | |
lineItems[index].priceData.name | string | Y |
Example:
#
Response Parametersparameter | type | require | description |
---|---|---|---|
responseCode | string | Y | |
message | string | Y | |
checkoutUrl | string | Y | |
order | object | Y | |
order.id | number | Y | If it is recurring payment, please save this value as next recurring payment's parentOrderId. |
order.merchantId | number | Y | |
order.merchantReference | string | Y | |
order.currency | string | Y | |
order.amount | number | Y | |
order.itemAmount | number | Y | |
order.netAmount | number | Y | |
order.createTime | dateTime | Y | |
order.updateTime | dateTime | Y | |
order.status | string | Y | |
order.recurring | boolean | Y |
Example: