Skip to main content

Recurring


  • Description: Proceed recurring payment with the token
  • Path: /tokenization/recurring
  • Method: POST
  • Request Header: Content-Type: application/json

Request Parameters

ParameterTypeRequired/optionalDescription
merchantIdstringRequiredMerchant identifier
userIdstringRequiredMerchant's user identifier, value is case insensitive
tokenIdnumberRequiredToken identifier
reasonstringRequiredRecurring reason
amountnumberRequiredRecurring amount
merchantReferencestringRequiredAn unique reference to identify this recurring order, different from the sale merchantReference
parentOrderIdnumberOptionalOrder ID which is returned from response of API Sale: /tokenization/sale
callbackUrlobjectOptional 
callbackUrl.successstringOptionalAn URL to redirect after successful payment
callbackUrl.failstringOptionalAn URL to redirect after failed payment
callbackUrl.cancelstringOptionalAn URL to redirect when payment is cancelled
callbackUrl.notifystringOptionalAn 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

ParameterTypeRequireDescription
responseCodestringRequiredPayment Gateway response code
messagestringRequiredPayment Gateway response message
orderobjectRequired 
order.idnumberRequiredOrder identifier
order.merchantIdnumberRequiredMerchant identifier which own this order
order.merchantReferencestringRequiredYour reference for the order
order.currencystringRequired3-Letters ISO currency code of the order
order.amountnumberRequiredOrder amount
order.netAmountnumberRequiredNet amount of the order
order.cardTypestringRequiredCard type of the order
order.emailstringRequiredCustomer's email if provided
order.createTimedatetimeRequiredTimestamp when the order is created. Maintained by the Payment Gateway
order.updateTimedatetimeRequiredTimestamp when the order is last updated. Maintained by the Payment Gateway
order.statusstringRequiredStatus of the order. Maintained by the Payment Gateway
order.recurringbooleanRequiredFlags the order is a recurring order or not
transactionobjectRequired 
transaction.idnumberRequiredTransaction identifier for the recurring transaction
transaction.merchantIdnumberRequiredMerchant identifier which own this transaction
transaction.typestringRequiredTransaction type
transaction.amountstringRequiredTransaction amount
transaction.statusstringRequiredStatus of the transaction. Maintained by the Payment Gateway
transaction.maskedPanstringRequiredMasked card number of the recurring transaction if supported by the payment method
transaction.stanstringRequiredSystem 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"
  }
}