Step 1: set up budget webhooks
Before we start creating payments, we’re going to subscribe to the three budget-related webhook event types. The first event type to subscribe to isBoxDebited. This event is triggered when a budget is debited in production, whether that’s due to an internal transfer of funds or an external payment. In sandbox, you’ll receive it when you make budget-to-budget transfers and when generating test credits.
Production
BoxCredited. This event is triggered when a budget is credited in production, whether that’s due to an internal transfer of funds or an external inbound payment. In sandbox, you’ll receive it when you make budget-to-budget transfers and when generating test credits.
Production
FeeCreated. This event is triggered when a standalone fee is created in production (e.g., a fee for receiving an inbound credit).
Production
For more information about webhooks and webhook event type structures, see the webhooks guide.