Skip to main content

πŸ“’ Overview

The Capa API provides a webhook-based notification system that allows third-party partners to receive real-time updates whenever specific events occur in our backend systems. This enables partners to stay informed about changes related to their users or transactions and to make necessary updates in their systems accordingly.

πŸ”§ How It Works

  1. πŸ”— Registering a Webhook URL:
    Each partner can register a single URL where they wish to receive webhook notifications. This URL must be provided through the designated endpoint. Set Webhook Settings
  2. πŸ“¬ Receiving Notifications:
    Once a URL is registered, partners will receive notifications whenever an event relevant to them occurs, such as:
    • πŸ“ Updates to a user’s KYC (Know Your Customer) status.
    • πŸ’Έ Transaction status changes
  3. πŸ“‘ Notification Handling:
    If a notification fails to be delivered (e.g., due to network issues or a problem on the partner’s end), the system will automatically retry the delivery up to 5 times with the following delays:
    AttemptDelay
    1st retryImmediate
    2nd retry1 minute
    3rd retry5 minutes
    4th retry10 minutes
    5th retry15 minutes
    If all attempts fail, the notification will be marked as β€œFailed.” There is currently no API endpoint or dashboard feature to replay missed webhook events. As a fallback, use the Get KYC Details or List Transactions endpoints to poll for the latest status.
  4. πŸ§ͺ Mock Testing:
    Webhooks do fire during mock testing in the staging environment, as long as a webhook URL is configured. This allows you to test your webhook handling end-to-end using the Mock Testing Guide.

πŸ’‘ Best Practices

  • πŸ•’ Ensure Availability: Make sure your webhook URL is always available to receive notifications.
  • πŸ€– Handle Retries Gracefully: Implement logic to handle repeated notifications in case of retries.
  • πŸ” Validate Data: Validate all incoming data to ensure it is from a trusted source and in the expected format.
  • βœ… Respond with 2xx: Return a 200 or 2xx status code promptly to acknowledge receipt. A non-2xx response triggers retries.

What’s Next