Recurring
- Description: Make recurring payment form subscribed customer
- Path:
/hosted-checkout/recurring
- Method:
POST
- Request Header:
Content-Type: application/json
Request Parameters
Parameter | Type | Mandatory | Description |
---|---|---|---|
merchantId | String | M | Merchant identifier |
amount | Number(9,2) | M | Recurring amount |
merchantReference | String(64) | M | An unique reference to identify the recurring order, different from the reference of the parent order |
parentOrderId | Number | M | 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 | Mandatory | Description |
---|---|---|---|
responseCode | String | M | Payment Gateway response code |
message | String | M | Payment Gateway response message |
order | Object | M | |
order.id | Number | M | Order identifier |
order.merchantId | Number | M | Merchant identifier which own this order |
order.merchantReference | String | M | Your reference for the order |
order.currency | String | M | 3-Letters ISO currency code of the order |
order.amount | Number | M | Order amount |
order.netAmount | Number | M | Net amount of the order |
order.cardType | String | M | Card type of the order |
order.email | String | M | Customer's email if provided |
order.createTime | Datetime | M | Timestamp when the order is created. Maintained by the Payment Gateway |
order.updateTime | Datetime | M | Timestamp when the order is last updated. Maintained by the Payment Gateway |
order.status | String | M | Status of the order. Maintained by the Payment Gateway |
order.recurring | Boolean | M | Flags the order is a recurring order or not |
transaction | Object | M | |
transaction.id | Number | M | Transaction identifier for the recurring transaction |
transaction.merchantId | Number | M | Merchant identifier which own this transaction |
transaction.type | String | M | Transaction type |
transaction.amount | Number | M | Transaction amount |
transaction.status | String | M | Status of the transaction. Maintained by the Payment Gateway |
transaction.maskedPan | String | M | Masked card number of the transaction if supported by the payment method |
transaction.stan | String | M | 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"
}
}