- Description: Make recurring payment form subscribed customer
- Path:
/hosted-checkout/recurring
- Method:
POST
- Request Header:
Content-Type: application/json
Request Parameters
Parameter | Type | Required/optional | Description |
---|
merchantId | string | Required | Merchant identifier |
amount | number | Required | Recurring amount |
merchantReference | string | Required | An unique reference to identify the recurring order, different from the reference of the parent order |
parentOrderId | number | Required | Order ID which is returned from response of PayAPI Create: /hosted-checkout/create |
Example:
{
"request": "{\"merchantId\":3,\"merchantReference\":\"merRef1656607451426\",\"amount\":20,\"parentOrderId\":5583}",
"signature": "gjlsOvmWKy639oOwcrns7TzLeSgjpdddSsdI0/xJQ32p/qdf7Q/vFTopIeAbY+o0lMdP8EjesrcAwxwmeOHvQD0Wj9GaRf3gF3RpiPNZOjbrs8J8YajGuANWg0nyv67ntf9wdK7Y4lsXvwpYEQ1Lw07z5c29RVKJAXjptydontXX3Fi9pRvTaHMWlCsPmSDsj8PSQetKO8CH5Qdf6lKh3188RB96XUF+X+wtOq3Qj3Mzced2egx9/MJjjUr83rKx9b3fCdS1AHN18PEo4d9nsZXKBVYB+JmqRR9hG359/6L9TaWZmEW7ObitNHZ++CgnuZx1UeJPyZaQ58iSoI310g=="
}
Response Parameters
Parameter | 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 |
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.email | string | Required | Customer's email if provided |
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 recurring transaction |
transaction.merchantId | number | Required | Merchant identifier which own this transaction |
transaction.type | string | Required | Transaction type |
transaction.amount | number | 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 transaction if supported by the payment method |
transaction.stan | string | Required | System trace audit number for the transaction |
Example:
{
"responseCode": "0000",
"message": "Success",
"order": {
"id": 5584,
"merchantId": 3,
"merchantReference": "merRef1656607451426",
"currency": "HKD",
"amount": 20,
"netAmount": 20,
"cardType": "MASTER",
"createTime": "2022-06-30T16:44:11.708+00:00",
"updateTime": "2022-06-30T16:44:14.141+00:00",
"status": "SUCCESS",
"recurring": true
},
"transaction": {
"id": 3770,
"merchantId": 3,
"type": "SALE",
"amount": 20,
"status": "SUCCESS",
"maskedPan": "552343XXXXXX9425",
"stan": "3770"
}
}