Recurring
- Description: Proceed recurring payment with the token
- Path:
/tokenization/recurring - Method:
POST - Request Header:
Content-Type: application/json
Request Parameters
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| merchantId | String | M | Merchant identifier |
| userId | String(64) | M | Merchant's user identifier, value is case insensitive |
| tokenId | Number | M | Token identifier |
| reason | String | M | Recurring reason |
| amount | Number(9,2) | M | Recurring amount |
| merchantReference | String(64) | M | An unique reference to identify this recurring order, different from the sale merchantReference |
| parentOrderId | Number | M | Order ID which is returned from response of API Sale: /tokenization/sale |
| callbackUrl | Object | O | |
| callbackUrl.success | String | O | An URL to redirect after successful payment |
| callbackUrl.fail | String | O | An URL to redirect after failed payment |
| callbackUrl.cancel | String | O | An URL to redirect when payment is cancelled |
| callbackUrl.notify | String | O | An API URL in merchant's backend to receive notification |
Example:
{
"request": "{\"merchantId\":3,\"userId\":\"user1\",\"tokenId\":\"436\",\"merchantReference\":\"merRef1656991803097\",\"amount\":30,\"parentOrderId\":5798}",
"signature": "uE0rOafPFAf6ILmLQ8/as7ItebeVMH1zqp7bbutzAbw2o1tRS/cL+XVjjAcTiFKHsUzc05CF63DfIhSQNcqKPYRQOjnFk+VqRoecJ9jnu4Ps6fwaHK+FOKCI8PVkkfiu9aLoCksdglYi4O+kG7bbNJ5QFvJyIbQjSr95/wSX9DIRNnJL80cWJtzHttT4apBXyN0ajzTKaZLtpzAuwaMZmixUjS4IS4+d2GIqtSKUL03/PzYNSqkZPvnZE5Sa/3w83fcdDukkLvXUCrOv4VZlHh5GWpNSkcuskmnIosfP0QEDFOnOGdCDtZbhBdQ/FbGbhbJm51MTXG3I1byOLPgddA=="
}
Response Parameters
| Parameter | Type | Require | 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 | String | 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 recurring 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": 5803,
"merchantId": 3,
"merchantReference": "merRef1656991803097",
"currency": "USD",
"amount": 30,
"netAmount": 30,
"cardType": "VISA",
"createTime": "2022-07-05T03:30:03.709+00:00",
"updateTime": "2022-07-05T03:30:03.709+00:00",
"status": "SUCCESS",
"recurring": true
},
"transaction": {
"id": 3974,
"merchantId": 3,
"type": "SALE",
"amount": 30,
"currency": "USD",
"status": "SUCCESS",
"maskedPan": "470534XXXXXX8101",
"stan": "3974"
}
}