Skip to main content

Integration Best Practices for APMs & Payouts

  1. Integer Identifiers: Ensure your codebase parses X-TW-Merchant-Identifier as an integer to avoid validation errors on the server side.
  2. 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.
  3. Payout Validation: Validate recipient bank details locally before sending the request to avoid FAILED statuses due to invalid IBAN or Account Number.
  4. Webhook Security: Always verify the HMAC signature on incoming webhooks to ensure data integrity and authenticity from Tradex World.
  5. 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.