Sale
- Description: Proceed a sale payment with the token
- Path:
/tokenization/sale
- Method:
POST
- Request Header:
Content-Type: application/json
#
Request ParametersParameter | Type | Required/optional | Default | Description |
---|---|---|---|---|
merchantId | string | Required | Merchant identifier | |
userId | string | Required | Merchant's user identifier, value is case insensitive | |
tokenId | number | Required | User's token identifier | |
merchantReference | string | Required | An unique reference to identify this order | |
currency | string | Optional | HKD | 3-Letters ISO currency code, supports HKD , USD |
amount | number | Required | Sale amount | |
string | Optional | Email to receive receipt | ||
callbackUrl | object | Optional | ||
callbackUrl.notify | string | Optional | An API URL in merchant's backend to receive notification | |
isRecurring | boolean | Optional | false | Enable/disable recurring payment |
lineItems | array | Required | ||
lineItems[index].quantity | number | Required | Number of items, must be an integer | |
lineItems[index].priceData | string | Required | Price data object with details | |
lineItems[index].unitAmount | number | Required | Unit amount of the item | |
lineItems[index].name | string | Required | Name of the item |
#
Example:#
Response ParametersParameter | Type | Required/optional | Description |
---|---|---|---|
responseCode | string | Required | Payment Gateway response code |
message | string | Required | Payment Gateway response message |
order | object | Required | |
order.id | number | Required | Order identifier. If it is recurring payment, save this value as next recurring payment's parentOrderId |
order.merchantId | number | Required | Merchant identifier which own this order |
order.merchantReference | string | Required | Your reference for the order |
order.currency | string | Required | 3-Letters ISO currency code of the order |
order.amount | number | Required | Order amount |
order.netAmount | number | Required | Net amount of the order |
order.cardType | string | Required | Card type of the order |
order.createTime | datetime | Required | Timestamp when the order is created. Maintained by the Payment Gateway |
order.updateTime | datetime | Required | Timestamp when the order is last updated. Maintained by the Payment Gateway |
order.status | string | Required | Status of the order. Maintained by the Payment Gateway |
order.recurring | boolean | Required | Flags the order is a recurring order or not |
transaction | object | Required | |
transaction.id | number | Required | Transaction identifier for the refund transaction |
transaction.merchantId | number | Required | Merchant identifier which own this transaction |
transaction.type | string | Required | Transaction type |
transaction.amount | string | Required | Transaction amount |
transaction.status | string | Required | Status of the transaction. Maintained by the Payment Gateway |
transaction.maskedPan | string | Required | Masked card number of the original sale transaction if supported by the payment method |
transaction.stan | string | Required | System trace audit number for the transaction |