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.
To create a webhook endpoint, you can POST 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:
To activate the webhook endpoint, you can send a PUT 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:
Copy
Ask AI
...{ "status": "active"}...
In a successful response, you should see a payload like the following:
Copy
Ask AI
{ "id": "wep_tir8iiYS3khF4TqEe7jpKje", "url": "https://example.com/api/webhooks/bridge_webhook_event_testing", "status": "active", "public_key": "-----BEGIN PUBLIC KEY-----<KEY>-----END PUBLIC KEY-----\n", "created_at": "2025-02-11T00:42:08.581Z", "updated_at": "2025-02-11T03:03:30.918Z"}
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.
To view events that would be sent to an endpoint, you can send a 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: