card_token that represents the stored card data.payByCardToken API, eliminating the need to resend sensitive card details. The service helps streamline the payment process, improves user experience for recurring transactions, and ensures that sensitive card information is handled in a secure and compliant manner.The parameters and their order to be used for the hash algorithmare as follows.merchant_key customer_number card_holder_name expiry_month expiry_year app_secret
#!/usr/bin/env bash
set -euo pipefail
# Example values. Load your merchant app_secret on your server.
parts=(
"merchant_example" # merchant_key
"10001" # customer_number
"Test Customer" # card_holder_name
"4111111111111111" # card_number
"9" # expiry_month
"2029" # expiry_year
)
app_secret="example_app_secret"
message=$(IFS='|'; printf '%s' "${parts[*]}")
printf '%s' "$message" | openssl dgst -sha256 -hmac "$app_secret" -r | awk '{print $1}'
{
"status_code": 100,
"status_description": "The card token saved successfully",
"card_token": "3acb729f7341c4fa4971a5b81b76189e"
}