Webhooks allow partners to subscribe to billing event notifications from Constant Contact. Partner webhooks eliminate the need for your integration to poll partner API methods for billing changes. Instead, using partner webhooks you can make a single API request to subscribe your application and start receiving automatic billing and account notifications.
A webhook is an HTTP POST callback request sent to a URL of your choice when an event occurs. The POST payload provides the URL from which the details of the event are retrieved. For example:
The following lists webhook topics to which you can subscribe and includes example notification payloads sent by Constant Contact.
|topic_id||Name||Description||Event Type||Retry Priority|
|1||Billing Tier Upgrade||Executes when an account's billing tier is increased.||tier.increase||Critical|
|2||Billing Tier Downgrade||Executes when an account's billing tier is downgraded||tier.decrease||Critical|
|3||Account Cancelled||Executes when an account is cancelled||account.cancel||Critical|
|4||Account Disabled||Executes when an account is disabled (usually due to a request for temporary suspension, compliance or payment issues)||account.disable||Critical|
Configuring Your Network
Webhooks send automated notifications to the URL of your choice. Typical integrations with the Constant Contact APIs involve bidirectional HTTP communication via REST, where a network makes an outbound request and then receives a response from us. Generally, there are no network configuration changes required. However, in some cases, network configuration may be required to receive inbound requests, such as changes to your firewall rules.
To configure webhooks, you need:
- An SSL certificate to allow Constant Contact to POST to your server over SSL (self-signed is acceptable but not preferred).
- A callback URL of your choice configured to handle POST requests and must use
Be sure to Test your configuration.
The Constant Contact v3 API requires the use of SSL with TLS v1.2 and AES encryption or better for all API calls.
Notification Retry Policy
Constant Contact retries all failed webhook notification requests every minute for up to an hour. The retry period is capped at a maximum of 1 hour (3600 seconds).
Workflow for Subscribing to a Webhook
The webhook subscription workflow includes: