Recipient Webhooks

Overview

Webhooks are an HTTP POST message sent from the BitPay server to the merchant’s eCommerce server. The primary purpose of a webhook is to alert the merchant’s ecommerce server that the status of a resource (invoice, payout, and now recipients) has changed. The messages are sent to the notificationURL field when creating the invoice or payout request.

Handling

BitPay does not sign webhooks, so the information in the payload should never be trusted outright:

  1. The webhook shall be used by the merchant as a trigger to verify the status of a specific
    recipient. This can be done by retrieving the corresponding recipient object, via the GET
    recipients/recipientId endpoint (recipientId will be provided in the body of the webhook).

  2. Merchants will be waiting for the "active" status for a given recipient before they include them on a payout batch

  3. The BitPay server expects an HTTP 200 response with an empty body to the webhook. Any other response is considered by BitPay as a failed delivery.

  4. Merchants must use HTTPS for the notificationURL.

  5. The BitPay server attempts to send webhooks multiple times until the send is either successful or the BitPay server gives up. (schedule to be defined).

Notification Codes

CodeNamePurpose
4001recipient_invitedTo notify merchants that a recipient has reached the status invited.
4002recipient_unverifiedTo notify merchants that a recipient has reached the status unverified.
4003recipient_verifiedTo notify merchants that a recipient has reached the status verified.
4004recipient_activeTo notify merchants that a recipient has reached the status active.
4005recipient_pausedTo notify merchants that a recipient has reached the status paused.
4006recipient_removedTo notify merchants that a recipient has reached the status removed.
4007recipient_manuallyNotifiedWhenever a merchant request for the last notification to be resent.

Example Webhook

{
    "event":{
        "code":4003,
        "name":"recipient_verified"
    },
    "data":{
        "id":"8Gq174SFAnQpdLDxRZCBPB",
        "shopperId":"5QZnQKyanj8o7qohDf2zC2",
        "email":"[email protected]",
        "label":"updatedLabel",
        "status":"verified"
    }
}