Card Token for Tokenized & Recurring Payments

API Explorer
loading...
POST
  • Get Hosted Payment Page API allows merchants to get a response of card token value/string to use it for further transactions like Sale & Recurring Payments.
  • In Sale transaction type request payload, if requestCardToken is set to true, iPOS-HPP will respond with card token value as cardToken & consumer id as consumerId. if requestCardToken is set to false, iPOS-HPP will respond, none.

Header Parameters

token*string

Authentication token generated using the API Key and Secret Key. Required for all API requests.

Request Body

application/json

Response Body

application/json

curl -X POST "https://example.com/card-token" \  -H "token: string" \  -H "Content-Type: application/json" \  -d '{    "merchantAuthentication": {      "merchantId": "567025324141",      "transactionReferenceId": "TXNId00111223334571666"    },    "transactionRequest": {      "transactionType": 2,      "amount": "0",      "calculateFee": true,      "calculateTax": true,      "tipsInputPrompt": true,      "expiry": 7,      "feeRemoved": false,      "invoiceTxn": true,      "requestCardToken": true    },    "notificationOption": {      "postAPI": "https://example.com/post-notification-endpoint",      "failureUrl": "https://example.com/payment-failure",      "returnUrl": "https://example.com/payment-return",      "notifyByRedirect": true,      "notifyBySMS": false,      "notifyByPOST": true,      "authHeader": "",      "cancelUrl": "",      "mobileNumber": ""    },    "preferences": {      "eReceipt": true,      "avsVerification": true,      "integrationType": 1,      "customerName": "",      "customerMobile": "+14242424243",      "customerEmail": "",      "sendPaymentLink": true,      "integrationVersion": "v2",      "requestCardToken": true    },    "personalization": {      "merchantName": "",      "logoUrl": "",      "themeColor": "",      "description": "",      "payNowButtonText": "",      "buttonColor": "",      "cancelButtonText": "",      "disclaimer": ""    }  }'

{
  "iposHPResponse": {
    "responseCode": "200",
    "responseMessage": "Successful",
    "errResponseCode": "",
    "errResponseMessage": "",
    "transactionReferenceId": "TXNId00111223334571666",
    "transactionType": "1-sale/2-card validation",
    "transactionId": "HPP-TXN-20251112",
    "transactionNumber": "1234",
    "batchNumber": "001",
    "cardType": "VISA",
    "cardLast4Digit": "4242",
    "amount": "1500",
    "tips": "0",
    "customFee": "0",
    "localTax": "0",
    "stateTax": "0",
    "totalAmount": "1500",
    "responseApprovalCode": "TAS164",
    "rrn": "219313501821",
    "cardToken": "card-token-value",
    "consumerId": "12412313"
  }
}