Tokenize Charge

Use the Tokenize Charge API to process a transaction using a saved card token. This enables secure and seamless repeat payments for returning customers without collecting card details again.


👍 Good to Know

To initiate a tokenize charge:

  • Include your secret API key in the api-key header
  • Ensure the cardToken is obtained from the Save Card API

🛠️ Endpoint Details

MethodURL
POSThttps://payment-api-service.transactpay.ai/payment/tokenize/charge

Headers

api-key: YOUR_SECRET_API_KEY
Content-Type: application/json

📦 Sample Payload

{
  "customer": {
    "firstname": "ideos",
    "lastname": "pay",
    "mobile": "+23481582333444",
    "country": "NG",
    "email": "[email protected]"
  },
  "order": {
    "amount": 2,
    "reference": "{{reference}}",
    "description": "Pay",
    "currency": "NGN"
  },
  "payment": {
    "RedirectUrl": "https://www.hi.com"
  },
  "authorization": {
    "cardToken": "TKNMDU4MzU4NzUwNTk0Mjg5NzQwMzgwNDA0NzQ1ODkz2173"
  }
}

📌 Important Notes

⚠️

Security Tip

Never expose your secret API key in frontend or public code repositories.

🧾

Reference Best Practice

Always generate a uniquereference per transaction to prevent duplicates and ensure proper tracking.


✅ Next Steps

  1. Get the card token using the Save Card API
  2. Initiate the charge using the token via this API
  3. Verify the result using the Verify Order API
{
    "customer": {
        "firstname": "ideos",
        "lastname": "pay",
        "mobile": "+23481582333444",
        "country": "NG",
        "email": "[email protected]"
    },
    "order": {
        "amount": 2,
        "reference": "{{reference}}",
        "description": "Pay",
        "currency": "NGN"
    },
    "payment": {
        "RedirectUrl": "https://www.hi.com"
    },
    "authorization": {
        "cardToken": "TKNMDU4MzU4NzUwNTk0Mjg5NzQwMzgwNDA0NzQ1ODkz2173"
    }
}