confirm_payment endpoint is used to confirm the payment.confirm endpoint must be triggered to complete and capture the PreAuth transaction.Join the request values with |in this order. Use your merchantapp_secretas the HMAC-SHA256 key.merchant_keyinvoice_idstatus
#!/usr/bin/env bash
set -euo pipefail
# Example values. Load your merchant app_secret on your server.
parts=(
"merchant_example" # merchant_key
"INV-DOCS-001" # invoice_id
"1" # status
)
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 transaction has been Approved",
"transaction_status": "Completed",
"order_id": "VP17697652077026116",
"invoice_id": "VUONVW35PWK2TDY-1769765203"
}