Step 4: Set up batch payment webhooks

Receive notifications when a batch passes initial validation, when payments are ready to be sent, when the batch begins processing, and when batch processing is complete.

PaymentBatchCreated: this event is triggered when the batch group has successfully passed initial validation, with all recipient details verified. The batch is now ready for approval, and the recipient information is valid.

PaymentBatchCancelled: this event is triggered when the payment batch has been cancelled.

PaymentBatchCompleted: this event is triggered when the payment batch has completed, and all payments within the batch have reached a final status.

PaymentCreated: this event is triggered when the payments have passed the initial checks, and no additional information is needed to proceed with the payout.

PaymentReturned: this event is triggered when the payment has been refunded.

PaymentBatchOrderCreated: this event is triggered when the group has been approved, processing will begin, and funds will be blocked. This is particularly useful for scheduled batches.

PaymentBatchOrderCancelled: this event is triggered when the batch order has been cancelled. This is especially relevant for scheduled batches.

Below are example requests to subscribe to the PaymentBatchCreated:

SandboxProduction
Copy
Copied
curl -i -X POST 'https://api-sandbox.equalsmoney.com/v2/webhooks' \
-H 'Authorization: ApiKey {apiKey}' \ # Your API key
-H 'Content-Type: application/json' \
-d '{
  "webhookEventTypeName": "PaymentBatchCreated",
  "accountId": "{accountId}",
  "url": "{webhookUrl}",
  "enabled": true
}'
Copy
Copied
curl -i -X POST 'https://api.equalsmoney.com/v2/webhooks' \
-H 'Authorization: ApiKey {apiKey}' \ # Your API key
-H 'Content-Type: application/json' \
-d '{
  "webhookEventTypeName": "PaymentBatchCreated",
  "accountId": "{accountId}",
  "url": "{webhookUrl}",
  "enabled": true
}'

Next