refund.partially_refund.refund endpoint.The parameters and their order to be used for the hash algorithmare as follows.amount invoice_id merchant_key app_secret
#!/usr/bin/env bash
set -euo pipefail
# Example values. Load your merchant app_secret on your server.
# Use an empty first value if amount is empty. For a marketplace sale, sign invoice_id and merchant_key.
parts=(
"25.50" # amount
"INV-DOCS-001" # invoice_id
"merchant_example" # merchant_key
)
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": "Refund completed successfully",
"order_no": "VP17695816358637973",
"invoice_id": "CPIKQUM29TXMQFF-1769581631",
"ref_no": "602800085396",
"ref_number": "602800085396"
}