- Description: Proceed recurring payment with the token
- Path:
/tokenization/recurring
- Method:
POST
- Request Header:
Content-Type: application/json
Request Parameters
Parameter | Type | Required/optional | Description |
---|
merchantId | string | Required | Merchant identifier |
userId | string | Required | Merchant's user identifier, value is case insensitive |
tokenId | number | Required | Token identifier |
reason | string | Required | Recurring reason |
amount | number | Required | Recurring amount |
merchantReference | string | Required | An unique reference to identify this recurring order, different from the sale merchantReference |
parentOrderId | number | Optional | Order ID which is returned from response of API Sale: /tokenization/sale |
callbackUrl | object | Optional | |
callbackUrl.success | string | Optional | An URL to redirect after successful payment |
callbackUrl.fail | string | Optional | An URL to redirect after failed payment |
callbackUrl.cancel | string | Optional | An URL to redirect when payment is cancelled |
callbackUrl.notify | string | Optional | 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 | 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 | 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 recurring 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": 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"
}
}