Vendor auto-pay notification payloads
IMPORTANT
At this time, the vendor auto-pay webhook notifications are available only for select BILL partners. We will provide more information for when vendor auto-pay webhook notifications will be available to all BILL v3 API users.
When you subscribe to a BILL event and the event triggers, BILL sends a notification to your provided notificationUrl
. You can subscribe to the autopay.failed
event to get a notification with an error response from the vendor auto-pay feature.
You can set up the bill auto-pay feature for a vendor with the Create a vendor (POST /v3/vendors
) or Update a vendor (PATCH /v3/vendors
) endpoint. When this feature is enabled for a vendor, BILL automatically pays the vendor when a bill is created for the vendor.
See /v3/vendors in the API reference for more information about the request and response fields.
Sample autopay.failed
payload
autopay.failed
payloadIn this sample unescaped JSON payload, the details of a vendor auto-pay failure notification are available. The notification includes the vendor
and fundingAccount
information. In addition, the errors
array provides details about the error from the vendor auto-pay feature. All the fields are included in each autopay.failed
payload.
Error code | Message |
---|---|
1 | User is inactive. |
2 | User is unauthorized. |
3 | Bank account is inactive. |
4 | Bill not ready to be paid. |
5 | Bill has existing payment. |
6 | Cannot pay offline vendor. |
{
"metadata": {
"eventId": "{event_id}",
"subscriptionId": "{subscription_id}",
"organizationId": "{organization_id}",
"eventType": "autopay.failed",
"version": "1"
},
"autopay": {
"vendor": {
"name": "Happy Music Supplies",
"id": "{vendor_id}"
},
"createdBy": "{user_id}",
"updatedTime": "2024-12-15T22:34:07.000+00:00",
"fundingAccount": {
"id": "bac02TGHZUVNZYAK9phj",
"type": "BANK_ACCOUNT"
}
},
"errors": [
{
"code": "3",
"message": "Bank account is inactive.",
"timestamp": "2024-12-15T22:35:06.000+00:00"
}
]
}
Updated 24 days ago