Skip to main content

HF Process with Card Token

Process a payment using a previously saved card token with encrypted secret. This method is ideal for returning customers who have saved their card information.

Endpoint Information

Name: Hosted Fields Process Transaction with Card Token
Method: POST
URL: {{BASE_URL}}/api/v1/payment/hf-process-transaction

Authentication

Type: Basic Auth

  • Username: App Key
  • Password: Secret Key

Request Body

Content-Type: application/json

{
"merchantAccountId": "{{yourMerchantAccountId}}",
"customerToken": "73024c3fd651fea6a5ee404fe49bd0dc",
"cardToken": "6d044049-5c2f-4b25-8eb3-6e1ad20e4578",
"secret": "TzVaa5uSeHNggUJk7Rju6IPM7D1eS7CXwS0TFBgio65bB35wjzw7tHucC7KcWS5s87v6aBRZmt5EBLAD3xk++nBk7Ki0ieWHiytqP+9adTvwzMC+awM5SiLw9e/BQn7cpiFlrlN7eECiDAOIarX4NOOhIshNtVhUfBQuCshIz78vcMft7QsXAAV2OLUaaUqrzwWqJqjYhpUMf4W0Xb9x0tjX/qDpbpOgwilfTyMuhxsd2uSQyPxQBWI+FSPcoBqvk2qowhvXXg6PHfJlCQ7RcX19fLyItk64rdlLwL4+h4DiffJdiYd02HI/YXWdX480Ef70y3sWLas6IPs58Z+Ug==",
"customerBrowserUserAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36",
"customerIP": "92.251.41.84",
"reference": "62617-5378",
"currency": "EUR",
"depositCurrency": null,
"amount": 56,
"ttl": 15,
"tagName": null,
"solutionUniqueId": ["2c032c79-dbb5-47b3-a575-c4098e687226"],
"serverToServer": true,
"successUrl": "https://google.com/success",
"failedUrl": "https://google.com/failed",
"is_hosted_fields_encrypted": true
}

Response

Success Response

{
"success": true,
"message": "Payment processed successfully",
"data": {
"reference": "62617-5378",
"status": "Accepted",
"transactionId": "txn_abc123xyz",
"amount": "56.00",
"currency": "EUR",
"processorReference": "PROC_REF_123456",
"createdAt": "2025-12-28 10:30:45"
}
}
warning

Note: The cardToken can be obtained from the Used Cards by Customer API. The secret must be encrypted using the Hosted Fields encryption library. Set is_hosted_fields_encrypted to true when using encrypted data.