Integer Identifiers: Ensure your codebase parses X-TW-Merchant-Identifier as an integer to avoid validation errors on the server side.
Decline Handling: On receiving a FAILED status (either via polling API or Webhook), check the decline_reason. If it is INSUFFICIENT_FUNDS, prompt the user for an alternative payment method rather than retrying the same one.
Payout Validation: Validate recipient bank details locally before sending the request to avoid FAILED statuses due to invalid IBAN or Account Number.
Webhook Security: Always verify the HMAC signature on incoming webhooks to ensure data integrity and authenticity from Tradex World.
H2H Confirmation Flow: For Host-to-Host flows, implement a UI that captures the Transfer Reference ID after the user clicks "I have paid". Send this immediately via POST /payments/{transaction_id}/confirm to reduce latency in status updates.