Partner webhooks overview and prerequistes.

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:

{"url":"https://api.cc.email/v3/partner/accounts/a07e1my9tbxo/plan","api_key":"40a0b12-342b-436d-97c3-000000000000","event_type":"tier.increase"}

Webhook Topics

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
 {
    "url":"https://api.constantcontact.com/v3/partner/accounts/{account_id}/plan",
   "api_key":"{api key}",
   "event_type":"tier.increase"
 }
2 Billing Tier Downgrade Executes when an account's billing tier is downgraded tier.decrease Critical
 {
   "url":"https://api.constantcontact.com/v3/partner/accounts/{account_id}/plan",
   "api_key":"{api key}",
   "event_type":"tier.decrease"
 }
3 Account Cancelled Executes when an account is cancelled account.cancel Critical
 {
   "url":"https://api.constantcontact.com/v3/partner/accounts/{account_id}/plan",
   "api_key":"{api key}",
   "event_type":"account.cancel"
 }
4 Account Disabled Executes when an account is disabled (usually due to a request for temporary suspension, compliance or payment issues) account.disable Critical
 {
   "url":"https://api.constantcontact.com/v3/partner/accounts/{account_id}/plan",
   "api_key":"{api key}",
   "event_type":"account.disable"
 }

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 https.

Be sure to Test your configuration.

Security

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:

Step 1: Identify which topic you want to subscribe to.
Step 2: Make a PUT call to subscribe to the topic.
Step 3: Test your subscription.