Reports
Webhooks
Availability
This feature is only available if Braintree manages the funding for your merchant account.
Contact us to find out if your account is eligible.
After you're set up to receive webhooks, you
can collect information from them to create reports based on different
triggers. For example,
you could collect the information on notifications for:
- Subscription Canceled to create a report for customer subscription cancelations
- Dispute Opened and compare that to your transactions sales to create a report on your chargeback ratio
- Disbursement to create a funding report
General workflow
- Set up at least one destination URL to receive webhooks from the gateway
- Parse the contents of the webhook notifications
-
Create logic to store the details of the
WebhookNotification
objects for a specific kind of trigger
Disbursements
Disbursement webhooks differ from other webhooks. Each disbursement or disbursement exception webhook includes a disbursement object. Unlike transactions or subscriptions objects, there are no alternative ways for retrieving the disbursement object from the gateway.
Note
Transactions associated with a disbursement
Note
The btSignature and
btPayload variables in the following code
snippets represent parameters received from the webhook POST request. For more information, read
the documentation on parsing webhooks.
- Java
WebhookNotification webhookNotification = gateway.webhookNotification().parse(
btSignature,
btPayload
);
List<String> transactions = webhookNotification.getDisbursement().getTransactionIds();
TransactionSearchRequest request = new TransactionSearchRequest()
.ids().in(transactions);
ResourceCollection<Transaction> collection = gateway.transaction().search(request);