Overview
You can now test card scenarios and their webhook events fully end-to-end in Sandbox. Webhook events will be delivered to your external webhook endpoint. This page provides a brief overview of how to set up a webhook endpoint.Testing webhooks
1. Set Up Webhook Endpoint
To create a webhook endpoint, you canPOST to v0/webhooks as you would in production. By default, webhook endpoints receive events of all categories. To receive just card-related events in your endpoint, you could make a request like the following:
You should use a more accurate
event_epoch as your event epoch in your integration.2. Activate the webhook endpoint
To activate the webhook endpoint, you can send aPUT request to v0/webhooks/{webhook\_id} just as you would in production. The webhook_id is the same id returned from the response of the POST request from the previous step.
To activate the endpoint, you set the status with a payload like so:
3. View Webhook Events
Webhook deliveries now work fully in sandbox, so you should be able to see webhook events delivered to your endpoint without manually testing using the
/events endpoint.GET request to https://api.sandbox.bridge.xyz/v0/webhooks/{webhook_id}/events. The webhook_id is the same as per the previous. No payload is required, but in sandbox you can pass in a category query parameter to specify which exact events you would like in the payload.
For example, to see card account specific events, you can GET https://api.sandbox.bridge.xyz/v0/webhooks/{webhook_id}/events?category=card_account. The response will have a format like so:
