Webhooks

Webhooks offer a way to quickly find out about changes to your Subscriptions that happen within Chargify. You can subscribe to events of interest, and we’ll post data to the URL you specify when one of those events occurs.

Webhooks are recommended over Post-backs for your integration.

Webhooks are Asynchronous

Webhook events usually get sent quickly, but sometimes there can be a small delay (if you experience a delay longer than a few minutes please contact us).

Webhooks are asynchronous events. We do our best to always send them in a timely manner, but we do not recommend on relying on webhooks for events that are very time sensitive.

A good example of this is your signup path. We do not recommend that you block a user from moving forward with provisioning or signup on your side based on a webhook response. All of our signup paths have synchronous methods of being notified of the event:

  • With hosted page signups, you can use the Return URLs and Return URL Parameters as a hint of the signup. You can use this hint to make a synchronous API fetch to learn more about the subscription
  • With API signups, you can use the response from the subscription creation request to take action without waiting on a webhook

Webhook Contents

Webhooks are sent as HTTP POST requests to your URL with a form-encoded body (Content-Type: application/x-www-form-urlencoded) for easy parsing in almost any programming language. All Webhooks contain the following keys:

id A unique, numeric, identifier for the webhook. You can use this value to record which webhooks you’ve already seen or recorded or acted on
event An identifier for the type of event that occurred. See Events, below
payload A “hash” of pertinent data about the event. Keys and sub-keys in the hash are denoted using square bracket notation in the key. For example, the product name would be included as the following form-encoded key/pair value in the content body of a signup_success webhook: payload[subscription][product][name]=Basic

Test Webhooks are sent with the following body:

id=123456&event=test&payload[chargify]=testing

Examples of payloads for other event types is given in the section on Example Payloads.

Webhook Acknowledgement and Automatic Retries

Upon receipt of a webhook, you should accept it by returning an HTTP “200 OK” response as quickly as possible. Sending any other response (i.e. “500 Internal Server Error”, “404 Not Found”, etc.) OR failing to return a response within approximately 15 seconds will result in automatic retries of the webhooks.

Chargify will attempt to send each webhook 5 times before giving up. The webhook retries will follow a backoff schedule:

Attempt Approximate Timing
1 As soon as possible after the original event
2 10 seconds after most recent failure
3 15 seconds after most recent failure
4 90 seconds after most recent failure
5 180 seconds after most recent failure

If you use the Webhook Replay feature (available via the Webhook API or the Webhook Panel, if available on your plan), please be aware that it is possible to perform a manual replay while automatic replays are still active. Because of this, it is your responsibility to avoid taking duplicate action. Suggestions for avoiding duplicate actions are:

  • Use the unique webhook id to remember which webhooks you’ve already recorded
  • Do not attempt to replay webhooks until the last_attempt_at timestamp (see Metadata) is well outside of the automatic replay intervals

Events

The following events are monitored within Chargify and can generate Webhooks:

Event Key Trigger Payload
signup_success Any successful signup (Subscription created) via the API, admin UI, or hosted pages site, subscription1
signup_failure Any failed signup (Subscription failed to begin) via the API, admin UI, or hosted pages2 site, subscription1
renewal_success A successful periodic renewal3 site, subscription1
renewal_failure A failed periodic renewal, i.e. the credit card is declined3 site, subscription1
payment_success Any successful payment against a credit card4 site, payment
payment_failure Any failed payment attempt against a credit card4 site, payment
billing_date_change Any change to the billing date that is initiated explicitly by altering the billing date via the admin UI or the API. This will not be triggered upon a normal renewal and period advancement, or a migration. site, subscription1 ( with previous_billing_date)
subscription_state_change Any change to the Subscription state. This is the “workhorse” of the events – watching this event can tell you if a Subscription ever moves to a “bad” state, i.e. past_due site, subscription1,5
subscription_product_change A successful change from an old product to a new product within the users Subscription. site, product_change
expiring_card A periodic event sent by Chargify site, subscription1,6
customer_update Any change to the following customer fields: first_name, last_name, organization, email, reference, address, address 2, city, state, zip, country, phone. site, customer
component_allocation_change Any change to a subscription’s quantity-based component allocation or enabled status of an on/off component that is made after signup.

This webhook does not fire if allocations are set as a part of the subscription creation (i.e. signup) – it only fires upon subsequent changes. (We will soon be making component allocations available in the signup_success webhook to cover the sign up case)

previous_allocation and new_allocation give the allocation values before and after the change. These will be either 0 or 1 for On/Off Components to represent off and on, respectively.

timestamp provides the date and time the allocation was recorded and is listed in ISO8601 format in the UTC timezone. Note: this timestamp format differs slightly from the format of existing timestamps in other event types and represents our new direction for webhook timestamps.
site[id]
site[subdomain]
component[id]
component[name]
component[unit_name]
component[kind]
subscription[id]
subscription[name]
product[id]
product[name]
previous_allocation
new_allocation
memo
timestamp
metered_usage Any reported usage for a subscription’s metered components.

This webhook will not fire when the unit balance is reset to 0 at the time of renewal.

timestamp provides the date and time the usage was recorded and is listed in ISO8601 format in the UTC timezone. Note: this timestamp format differs slightly from the format of existing timestamps in other event types and represents our new direction for webhook timestamps.
site[id]
site[subdomain]
component[id]
component[name]
component[unit_name]
component[kind]
subscription[id]
subscription[name]
product[id]
product[name]
previous_unit_balance
new_unit_balance
usage_quantity
memo
timestamp
upgrade_downgrade_success Any successful upgrade/downgrade site, subscription, previous_product
upgrade_downgrade_failure Any failed upgrade/downgrade site, subscription, target_product
refund_success Any successful refund
amount_in_cents
customer_email
customer_name
customer_reference
gateway_transaction_id
gateway_used
masked_card_number
memo
payment_amount_in_cents
payment_id
site
subscription_id
timestamp
refund_failure Any failed refund
amount_in_cents
customer_email
customer_name
customer_reference
gateway_transaction_id
gateway_used
masked_card_number
memo
payment_amount_in_cents
payment_id
site
subscription_id
timestamp
upcoming_renewal_notice A subscription set to renew within 3 days (example payload)
customer
email_sent
estimated_renewal_amount_in_cents
message
payment_profile
product
site
subscription
end_of_trial_notice A trial set to end within 3 days (example payload)
customer
email_sent
estimated_renewal_amount_in_cents
message
payment_profile
product
site
subscription
  • end_of_trial_notice Payload
    1 The subscription object also contains information on the Customer and Product.
    2 This is usually caused by a failure at the payment gateway. This event is not generated for input validation errors (i.e. forgetting to fill in a field).
    3 At the end of every recurring interval, either a renewal_success or a renewal_failure event is triggered once. If a card is declined and a renewal_failure is triggered, a subsequent payment that brings the account current will not generate a renewal_success (although it will generate a payment_success and a subscription_state_change)
    4 payment_success or payment_failure are triggered for every payment attempted, whether it is for a normal renewal, or a One-time Charge, or a retry after failure.
    5 Note that the subscription object you are given contains keys for both previous_state and state so you can track the changes.
    6 The expiring_card webhook is sent on the 1st, 15th and 7 days before the end of the month. This will identify all cards expiring in the next month.

Multiple Webhook events may be triggered by a single system event. For example, the creation of a new Subscription will typically fire both a signup_success and payment_success event (if a payment was necessary to start the Subscription).

Payloads

The resource objects sent as payload typically contain the same information as the corresponding API resource. Site payload objects contain the site’s id and subdomain. Examples of payloads for each type of event are given below under Example Payloads.

Webhook Verification

Using your Site shared key and a “signature” (called signature_hmac_sha_256) that is calculated and sent with the Webhook, you can verify the contents of a Webhook as being authentic and un-tampered.

Deprecation: Previously, the signature was calculated using the MD5 hex digest. This method is now deprecated: do not use it. We include BOTH the old signature (called signature) and the new signature (called signature_hmac_sha_256) to allow for backwards compatibility. Ignore signature. We will stop sending the old MD5 signature after a sufficient period of time has passed to allow everyone to upgrade.

Guard your Site shared key as you would your password, since a hacker with your Site shared key could generate Webhooks with a payload and signature that passes the signature verification test.

Webhooks are signed with a signature generated by taking an HMAC-SHA-256 hex digest of the raw HTTP Body of the Webhook post, using your shared key as the secret. In ruby:

OpenSSL::HMAC.hexdigest(OpenSSL::Digest::Digest.new('sha256'), site.shared_key, webhook.body)

If your site shared key is 123 and the Webhook request body contents are payload[chargify]=testing&event=test, then the signature_hmac_sha_256 for this Webhook is 19826d51b9f866b26eda1f154de192593360f8d0bcb63df8a28540a5dcf733f1.

This signature is sent with the Webhook post in the header X-Chargify-Webhook-Signature-Hmac-Sha-256, and can also be sent as a query param in your URL by using the {signature_hmac_sha_256} replacement variable.

For example, you could give us the following URL as your Webhook target URL:

http://example.com/?signature_hmac_sha_256={signature_hmac_sha_256}

We would post the example Webhook to the following address:

http://example.com/?signature_hmac_sha_256=19826d51b9f866b26eda1f154de192593360f8d0bcb63df8a28540a5dcf733f1

You can thus verify the contents of the POST by taking the same hash yourself and comparing.

We will soon be offering a 2nd layer of verification, wherein you can send the Webhook ID and Signature to Chargify and get back a pass/fail response as to whether it matches one we in fact sent.

When in doubt, you can always verify the information contained in a Webhook by checking current resource state via our API.

Finding Your Site Shared Key

When you create a Site, a shared key is automatically generated for you. You can find its current value, and change it if you choose, by clicking “Edit current Site” from the Site dropdown menu in the utility bar near the top of the screen.

Configuring Webhooks

You can configure your Webhooks from the Settings tab for each Site. You can choose to enable Webhooks, provide a target Webhook URL, and subscribe to individual Webhooks. The target Webhook URL cannot contain any port number except 80 and 443 (which you can specify using http and https protocol).

Webhook Testing

On the Webhook configuration screen on the Settings tab, you can click “Send a test Webhook” to access the Webhook testing panel. There, we will attempt to send a Webhook to your configured URL and show you what we sent and the response we received from you.

Testing Tip: Try using UltraHook or requestb.in to create Webhook test URL’s. That way, you can inspect the Webhook contents and headers while you work out your own Webhook handler.

Webhook Metadata

The Webhook records contain information about the acceptance or non-acceptance by your application, along with information about any error received that indicated non-acceptance.

This data is available via the Webhook API or the Webhook Panel, if that feature is available on your plan.

The webhook metadata attributes are:

  • id The unique identifier for the webhooks (unique across all of Chargify). This is not changed on a retry/replay of the same webhook, so it may be used to avoid duplicate action for the same event.
  • successful A boolean flag describing whether the webhook was accepted by the webhook endpoint for the most recent attempt. (Acceptance is defined by receiving a “200 OK” HTTP response within a reasonable timeframe, i.e. 15 seconds)
  • created_at Timestamp indicating when the Webhook was created
  • accepted_at Timestamp indicating when the Webhook was accepted by the merchant endpoint. When a webhook is explicitly replayed by the merchant, this value will be cleared until it is accepted again.
  • last_sent_at Timestamp indicating when the most recent attempt was made to send the Webhook
  • last_error_at Timestamp indicating when the last non-acceptance occurred. If a webhooks is later resent and accepted, this field will be cleared.
  • last_error Text describing the status code and/or error from the last failed attempt to send the Webhook. When a webhook is retried and accepted, this field will be cleared.

Webhooks also maintain their event and payload data (accessible via the API). For a full listing of attributes available for each webhook, please see the Webhook API documentation.
Once a webhook is accepted, the accepted_at timestamp will be filled (which can be viewed via the Webhooks API or in the Webhooks Panel, if it is available for your plan).

Example Payloads

These example webhooks have been converted from form-encoded format to Ruby hash format for readability.

signup_sucess Payload


{
      "event" => "signup_success",
         "id" => "5",
    "payload" => {
        "subscription" => {
                 "cancellation_message" => "",
                             "customer" => {
                   "last_name" => "Doe",
                   "reference" => "",
                       "phone" => "555-555-1234",
                  "first_name" => "John",
                         "zip" => "12345",
                   "address_2" => "Apt 123",
                     "address" => "123 Main St",
                       "state" => "NC",
                  "updated_at" => "2012-09-09 11:38:32 -0400",
                  "created_at" => "2012-09-09 11:38:32 -0400",
                "organization" => "Acme, Inc.",
                          "id" => "15",
                       "email" => "john@example.com",
                     "country" => "US",
                        "city" => "Pleasantville"
            },
                     "trial_started_at" => "",
                              "product" => {
                                  "handle" => "handle_6a9273b8a",
                "expiration_interval_unit" => "never",
                             "archived_at" => "",
                           "interval_unit" => "month",
                          "product_family" => {
                             "handle" => "acme-online",
                    "accounting_code" => "",
                               "name" => "Acme Online",
                                 "id" => "4",
                        "description" => ""
                },
                         "accounting_code" => "",
                          "price_in_cents" => "9900",
                     "expiration_interval" => "",
                                    "name" => "Pro",
                     "trial_interval_unit" => "month",
                                "interval" => "1",
                           "return_params" => "",
                              "updated_at" => "2012-09-09 11:36:53 -0400",
                              "created_at" => "2012-09-06 10:09:35 -0400",
                                      "id" => "23",
                              "return_url" => "",
                          "trial_interval" => "",
                             "description" => "Vel soluta nihil qui accusamus quidem.  Et qui qui et sit omnis sit.  Veritatis voluptates aut incidunt mollitia corporis labore accusantium.",
                    "trial_price_in_cents" => "",
                       "update_return_url" => "",
                 "initial_charge_in_cents" => "",
                     "require_credit_card" => "true",
                     "request_credit_card" => "true"
            },
                       "trial_ended_at" => "",
                       "previous_state" => "active",
                           "expires_at" => "",
                          "coupon_code" => "",
            "current_period_started_at" => "2012-09-09 11:38:32 -0400",
                          "canceled_at" => "",
                   "next_assessment_at" => "2012-10-09 11:38:32 -0400",
                          "credit_card" => {
                           "last_name" => "Doe",
                           "card_type" => "bogus",
                         "vault_token" => "1",
                          "first_name" => "Jane",
                       "billing_state" => "NC",
                  "masked_card_number" => "XXXX-XXXX-XXXX-1",
                     "expiration_year" => "2016",
                     "billing_country" => "US",
                "customer_vault_token" => "",
                         "customer_id" => "15",
                     "billing_address" => "987 Commerce St",
                    "expiration_month" => "4",
                       "current_vault" => "bogus",
                        "billing_city" => "Greenberg",
                                  "id" => "14",
                   "billing_address_2" => "Suite 789",
                         "billing_zip" => "67890"
            },
                       "signup_revenue" => "99.00",
                    "signup_payment_id" => "30",
                    "delayed_cancel_at" => "",
                                "state" => "active",
              "cancel_at_end_of_period" => "false",
                           "updated_at" => "2012-09-09 11:38:33 -0400",
                           "created_at" => "2012-09-09 11:38:32 -0400",
                                   "id" => "14",
                         "activated_at" => "2012-09-09 11:38:33 -0400",
               "current_period_ends_at" => "2012-10-09 11:38:32 -0400",
                     "balance_in_cents" => "9900",
               "total_revenue_in_cents" => "4200"
        },
                "site" => {
            "subdomain" => "acme-test",
                   "id" => "3"
        }
    }
}

Back to Top

signup_failure Payload


{
      "event" => "signup_failure",
         "id" => "6",
    "payload" => {
        "subscription" => {
                 "cancellation_message" => "",
                             "customer" => {
                   "last_name" => "Joker",
                   "reference" => "",
                       "phone" => "404-555-9876",
                  "first_name" => "Jimmy",
                         "zip" => "02345",
                   "address_2" => "Apt 404",
                     "address" => "500 Fail St",
                       "state" => "MA",
                  "updated_at" => "2012-09-09 11:48:23 -0400",
                  "created_at" => "2012-09-09 11:48:23 -0400",
                "organization" => "JankyCo",
                          "id" => "16",
                       "email" => "jimmy@example.com",
                     "country" => "US",
                        "city" => "Boston"
            },
                     "trial_started_at" => "",
                              "product" => {
                                  "handle" => "handle_6a9273b8a",
                "expiration_interval_unit" => "never",
                             "archived_at" => "",
                           "interval_unit" => "month",
                          "product_family" => {
                             "handle" => "acme-online",
                    "accounting_code" => "",
                               "name" => "Acme Online",
                                 "id" => "4",
                        "description" => ""
                },
                         "accounting_code" => "",
                          "price_in_cents" => "9900",
                     "expiration_interval" => "",
                                    "name" => "Pro",
                     "trial_interval_unit" => "month",
                                "interval" => "1",
                           "return_params" => "",
                              "updated_at" => "2012-09-09 11:36:53 -0400",
                              "created_at" => "2012-09-06 10:09:35 -0400",
                                      "id" => "23",
                              "return_url" => "",
                          "trial_interval" => "",
                             "description" => "Vel soluta nihil qui accusamus quidem.  Et qui qui et sit omnis sit.  Veritatis voluptates aut incidunt mollitia corporis labore accusantium.",
                    "trial_price_in_cents" => "",
                       "update_return_url" => "",
                 "initial_charge_in_cents" => "",
                     "require_credit_card" => "true",
                     "request_credit_card" => "true"
            },
                       "trial_ended_at" => "",
                       "previous_state" => "failed_to_create",
                           "expires_at" => "",
                          "coupon_code" => "",
            "current_period_started_at" => "2012-09-09 11:48:23 -0400",
                          "canceled_at" => "",
                   "next_assessment_at" => "",
                          "credit_card" => {
                           "last_name" => "Joker",
                           "card_type" => "bogus",
                         "vault_token" => "2",
                          "first_name" => "Jimmy",
                       "billing_state" => "MA",
                  "masked_card_number" => "XXXX-XXXX-XXXX-2",
                     "expiration_year" => "2015",
                     "billing_country" => "US",
                "customer_vault_token" => "",
                         "customer_id" => "16",
                     "billing_address" => "500 Fail St",
                    "expiration_month" => "3",
                       "current_vault" => "bogus",
                        "billing_city" => "Boston",
                                  "id" => "15",
                   "billing_address_2" => "Apt 404",
                         "billing_zip" => "02345"
            },
                       "signup_revenue" => "99.00",
                    "signup_payment_id" => "32",
                    "delayed_cancel_at" => "",
                                "state" => "failed_to_create",
              "cancel_at_end_of_period" => "false",
                           "updated_at" => "2012-09-09 11:48:24 -0400",
                           "created_at" => "2012-09-09 11:48:23 -0400",
                                   "id" => "15",
                         "activated_at" => "",
               "current_period_ends_at" => "2012-10-09 11:48:23 -0400",
                     "balance_in_cents" => "9900",
               "total_revenue_in_cents" => "4200"
        },
                "site" => {
            "subdomain" => "acme-test",
                   "id" => "3"
        }
    }
}

Back to Top

renewal_success Payload


{
      "event" => "renewal_success",
         "id" => "7",
    "payload" => {
        "subscription" => {
                 "cancellation_message" => "",
                             "customer" => {
                   "last_name" => "Doe",
                   "reference" => "",
                       "phone" => "555-555-1234",
                  "first_name" => "John",
                         "zip" => "12345",
                   "address_2" => "Apt 123",
                     "address" => "123 Main St",
                       "state" => "NC",
                  "updated_at" => "2012-09-09 11:38:32 -0400",
                  "created_at" => "2012-09-09 11:38:32 -0400",
                "organization" => "Acme, Inc.",
                          "id" => "15",
                       "email" => "john@example.com",
                     "country" => "US",
                        "city" => "Pleasantville"
            },
                     "trial_started_at" => "",
                              "product" => {
                                  "handle" => "handle_6a9273b8a",
                "expiration_interval_unit" => "never",
                             "archived_at" => "",
                           "interval_unit" => "month",
                          "product_family" => {
                             "handle" => "acme-online",
                    "accounting_code" => "",
                               "name" => "Acme Online",
                                 "id" => "4",
                        "description" => ""
                },
                         "accounting_code" => "",
                          "price_in_cents" => "9900",
                     "expiration_interval" => "",
                                    "name" => "Pro",
                     "trial_interval_unit" => "month",
                                "interval" => "1",
                           "return_params" => "",
                              "updated_at" => "2012-09-09 11:36:53 -0400",
                              "created_at" => "2012-09-06 10:09:35 -0400",
                                      "id" => "23",
                              "return_url" => "",
                          "trial_interval" => "",
                             "description" => "Vel soluta nihil qui accusamus quidem.  Et qui qui et sit omnis sit.  Veritatis voluptates aut incidunt mollitia corporis labore accusantium.",
                    "trial_price_in_cents" => "",
                       "update_return_url" => "",
                 "initial_charge_in_cents" => "",
                     "require_credit_card" => "true",
                     "request_credit_card" => "true"
            },
                       "trial_ended_at" => "",
                       "previous_state" => "active",
                           "expires_at" => "",
                          "coupon_code" => "",
            "current_period_started_at" => "2012-09-09 11:49:43 -0400",
                          "canceled_at" => "",
                   "next_assessment_at" => "2012-10-09 11:49:43 -0400",
                          "credit_card" => {
                           "last_name" => "Doe",
                           "card_type" => "bogus",
                         "vault_token" => "1",
                          "first_name" => "Jane",
                       "billing_state" => "NC",
                  "masked_card_number" => "XXXX-XXXX-XXXX-1",
                     "expiration_year" => "2016",
                     "billing_country" => "US",
                "customer_vault_token" => "",
                         "customer_id" => "15",
                     "billing_address" => "987 Commerce St",
                    "expiration_month" => "4",
                       "current_vault" => "bogus",
                        "billing_city" => "Greenberg",
                                  "id" => "14",
                   "billing_address_2" => "Suite 789",
                         "billing_zip" => "67890"
            },
                       "signup_revenue" => "99.00",
                    "signup_payment_id" => "30",
                    "delayed_cancel_at" => "",
                                "state" => "active",
              "cancel_at_end_of_period" => "false",
                           "updated_at" => "2012-09-09 11:49:44 -0400",
                           "created_at" => "2012-09-09 11:38:32 -0400",
                                   "id" => "14",
                         "activated_at" => "2012-09-09 11:38:33 -0400",
               "current_period_ends_at" => "2012-10-09 11:49:43 -0400",
                     "balance_in_cents" => "9900",
               "total_revenue_in_cents" => "4200"
        },
                "site" => {
            "subdomain" => "acme-test",
                   "id" => "3"
        }
    }
}

Back to Top

renewal_failure Payload


{
      "event" => "renewal_failure",
         "id" => "10",
    "payload" => {
        "subscription" => {
                 "cancellation_message" => "",
                             "customer" => {
                   "last_name" => "Doe",
                   "reference" => "",
                       "phone" => "555-555-1234",
                  "first_name" => "John",
                         "zip" => "12345",
                   "address_2" => "Apt 123",
                     "address" => "123 Main St",
                       "state" => "NC",
                  "updated_at" => "2012-09-09 11:38:32 -0400",
                  "created_at" => "2012-09-09 11:38:32 -0400",
                "organization" => "Acme, Inc.",
                          "id" => "15",
                       "email" => "john@example.com",
                     "country" => "US",
                        "city" => "Pleasantville"
            },
                     "trial_started_at" => "",
                              "product" => {
                                  "handle" => "handle_6a9273b8a",
                "expiration_interval_unit" => "never",
                             "archived_at" => "",
                           "interval_unit" => "month",
                          "product_family" => {
                             "handle" => "acme-online",
                    "accounting_code" => "",
                               "name" => "Acme Online",
                                 "id" => "4",
                        "description" => ""
                },
                         "accounting_code" => "",
                          "price_in_cents" => "9900",
                     "expiration_interval" => "",
                                    "name" => "Pro",
                     "trial_interval_unit" => "month",
                                "interval" => "1",
                           "return_params" => "",
                              "updated_at" => "2012-09-09 11:36:53 -0400",
                              "created_at" => "2012-09-06 10:09:35 -0400",
                                      "id" => "23",
                              "return_url" => "",
                          "trial_interval" => "",
                             "description" => "Vel soluta nihil qui accusamus quidem.  Et qui qui et sit omnis sit.  Veritatis voluptates aut incidunt mollitia corporis labore accusantium.",
                    "trial_price_in_cents" => "",
                       "update_return_url" => "",
                 "initial_charge_in_cents" => "",
                     "require_credit_card" => "true",
                     "request_credit_card" => "true"
            },
                       "trial_ended_at" => "",
                       "previous_state" => "active",
                           "expires_at" => "",
                          "coupon_code" => "",
            "current_period_started_at" => "2012-09-09 11:51:10 -0400",
                          "canceled_at" => "",
                   "next_assessment_at" => "2012-09-10 11:51:11 -0400",
                          "credit_card" => {
                           "last_name" => "Doe",
                           "card_type" => "bogus",
                         "vault_token" => "2",
                          "first_name" => "Jane",
                       "billing_state" => "NC",
                  "masked_card_number" => "XXXX-XXXX-XXXX-2",
                     "expiration_year" => "2016",
                     "billing_country" => "US",
                "customer_vault_token" => "",
                         "customer_id" => "15",
                     "billing_address" => "987 Commerce St",
                    "expiration_month" => "4",
                       "current_vault" => "bogus",
                        "billing_city" => "Greenberg",
                                  "id" => "14",
                   "billing_address_2" => "Suite 789",
                         "billing_zip" => "67890"
            },
                       "signup_revenue" => "99.00",
                    "signup_payment_id" => "30",
                    "delayed_cancel_at" => "",
                                "state" => "past_due",
              "cancel_at_end_of_period" => "false",
                           "updated_at" => "2012-09-09 11:51:11 -0400",
                           "created_at" => "2012-09-09 11:38:32 -0400",
                                   "id" => "14",
                         "activated_at" => "2012-09-09 11:38:33 -0400",
               "current_period_ends_at" => "2012-10-09 11:51:10 -0400",
                     "balance_in_cents" => "9900",
               "total_revenue_in_cents" => "4200"

        },
                "site" => {
            "subdomain" => "acme-test",
                   "id" => "3"
        }
    }
}

Back to Top

payment_success Payload


{
      "event" => "payment_success",
         "id" => "4",
    "payload" => {
        "subscription" => {
                 "cancellation_message" => "",
                             "customer" => {
                   "last_name" => "Doe",
                   "reference" => "",
                       "phone" => "555-555-1234",
                  "first_name" => "John",
                         "zip" => "12345",
                   "address_2" => "Apt 123",
                     "address" => "123 Main St",
                       "state" => "NC",
                  "updated_at" => "2012-09-09 11:38:32 -0400",
                  "created_at" => "2012-09-09 11:38:32 -0400",
                "organization" => "Acme, Inc.",
                          "id" => "15",
                       "email" => "john@example.com",
                     "country" => "US",
                        "city" => "Pleasantville"
            },
                     "trial_started_at" => "",
                              "product" => {
                                  "handle" => "handle_6a9273b8a",
                "expiration_interval_unit" => "never",
                             "archived_at" => "",
                           "interval_unit" => "month",
                          "product_family" => {
                             "handle" => "acme-online",
                    "accounting_code" => "",
                               "name" => "Acme Online",
                                 "id" => "4",
                        "description" => ""
                },
                         "accounting_code" => "",
                          "price_in_cents" => "9900",
                     "expiration_interval" => "",
                                    "name" => "Pro",
                     "trial_interval_unit" => "month",
                                "interval" => "1",
                           "return_params" => "",
                              "updated_at" => "2012-09-09 11:36:53 -0400",
                              "created_at" => "2012-09-06 10:09:35 -0400",
                                      "id" => "23",
                              "return_url" => "",
                          "trial_interval" => "",
                             "description" => "Vel soluta nihil qui accusamus quidem.  Et qui qui et sit omnis sit.  Veritatis voluptates aut incidunt mollitia corporis labore accusantium.",
                    "trial_price_in_cents" => "",
                       "update_return_url" => "",
                 "initial_charge_in_cents" => "",
                     "require_credit_card" => "true",
                     "request_credit_card" => "true"
            },
                       "trial_ended_at" => "",
                       "previous_state" => "active",
                           "expires_at" => "",
                          "coupon_code" => "",
            "current_period_started_at" => "2012-09-09 11:38:32 -0400",
                          "canceled_at" => "",
                   "next_assessment_at" => "2012-10-09 11:38:32 -0400",
                          "credit_card" => {
                           "last_name" => "Doe",
                           "card_type" => "bogus",
                         "vault_token" => "1",
                          "first_name" => "Jane",
                       "billing_state" => "NC",
                  "masked_card_number" => "XXXX-XXXX-XXXX-1",
                     "expiration_year" => "2016",
                     "billing_country" => "US",
                "customer_vault_token" => "",
                         "customer_id" => "15",
                     "billing_address" => "987 Commerce St",
                    "expiration_month" => "4",
                       "current_vault" => "bogus",
                        "billing_city" => "Greenberg",
                                  "id" => "14",
                   "billing_address_2" => "Suite 789",
                         "billing_zip" => "67890"
            },
                       "signup_revenue" => "99.00",
                    "signup_payment_id" => "30",
                    "delayed_cancel_at" => "",
                                "state" => "active",
              "cancel_at_end_of_period" => "false",
                           "updated_at" => "2012-09-09 11:38:33 -0400",
                           "created_at" => "2012-09-09 11:38:32 -0400",
                                   "id" => "14",
                         "activated_at" => "2012-09-09 11:38:33 -0400",
               "current_period_ends_at" => "2012-10-09 11:38:32 -0400",
                     "balance_in_cents" => "0",
               "total_revenue_in_cents" => "4200"
         },
                "site" => {
            "subdomain" => "acme-test",
                   "id" => "3"
        },
         "transaction" => {
                    "amount_in_cents" => "9900",
            "ending_balance_in_cents" => "0",
                   "transaction_type" => "payment",
                         "payment_id" => "",
                               "memo" => "John Doe - Pro: Signup payment",
                            "success" => "true",
                               "kind" => "",
                               "type" => "Payment",
             "gateway_transaction_id" => "",
                         "created_at" => "2012-09-09 11:38:33 -0400",
                                 "id" => "30",
                    "subscription_id" => "14",
                         "product_id" => "23"
        }
    }
}

Back to Top

payment_failure Payload


{
      "event" => "payment_failure",
         "id" => "11",
    "payload" => {
        "subscription" => {
                 "cancellation_message" => "",
                             "customer" => {
                   "last_name" => "Doe",
                   "reference" => "",
                       "phone" => "555-555-1234",
                  "first_name" => "John",
                         "zip" => "12345",
                   "address_2" => "Apt 123",
                     "address" => "123 Main St",
                       "state" => "NC",
                  "updated_at" => "2012-09-09 11:38:32 -0400",
                  "created_at" => "2012-09-09 11:38:32 -0400",
                "organization" => "Acme, Inc.",
                          "id" => "15",
                       "email" => "john@example.com",
                     "country" => "US",
                        "city" => "Pleasantville"
            },
                     "trial_started_at" => "",
                              "product" => {
                                  "handle" => "handle_6a9273b8a",
                "expiration_interval_unit" => "never",
                             "archived_at" => "",
                           "interval_unit" => "month",
                          "product_family" => {
                             "handle" => "acme-online",
                    "accounting_code" => "",
                               "name" => "Acme Online",
                                 "id" => "4",
                        "description" => ""
                },
                         "accounting_code" => "",
                          "price_in_cents" => "9900",
                     "expiration_interval" => "",
                                    "name" => "Pro",
                     "trial_interval_unit" => "month",
                                "interval" => "1",
                           "return_params" => "",
                              "updated_at" => "2012-09-09 11:36:53 -0400",
                              "created_at" => "2012-09-06 10:09:35 -0400",
                                      "id" => "23",
                              "return_url" => "",
                          "trial_interval" => "",
                             "description" => "Vel soluta nihil qui accusamus quidem.  Et qui qui et sit omnis sit.  Veritatis voluptates aut incidunt mollitia corporis labore accusantium.",
                    "trial_price_in_cents" => "",
                       "update_return_url" => "",
                 "initial_charge_in_cents" => "",
                     "require_credit_card" => "true",
                     "request_credit_card" => "true"
            },
                       "trial_ended_at" => "",
                       "previous_state" => "past_due",
                           "expires_at" => "",
                          "coupon_code" => "",
            "current_period_started_at" => "2012-09-09 11:51:10 -0400",
                          "canceled_at" => "",
                   "next_assessment_at" => "2012-09-10 11:51:11 -0400",
                          "credit_card" => {
                           "last_name" => "Doe",
                           "card_type" => "bogus",
                         "vault_token" => "2",
                          "first_name" => "Jane",
                       "billing_state" => "NC",
                  "masked_card_number" => "XXXX-XXXX-XXXX-2",
                     "expiration_year" => "2016",
                     "billing_country" => "US",
                "customer_vault_token" => "",
                         "customer_id" => "15",
                     "billing_address" => "987 Commerce St",
                    "expiration_month" => "4",
                       "current_vault" => "bogus",
                        "billing_city" => "Greenberg",
                                  "id" => "14",
                   "billing_address_2" => "Suite 789",
                         "billing_zip" => "67890"
            },
                       "signup_revenue" => "99.00",
                    "signup_payment_id" => "30",
                    "delayed_cancel_at" => "",
                                "state" => "past_due",
              "cancel_at_end_of_period" => "false",
                           "updated_at" => "2012-09-09 11:51:12 -0400",
                           "created_at" => "2012-09-09 11:38:32 -0400",
                                   "id" => "14",
                         "activated_at" => "2012-09-09 11:38:33 -0400",
               "current_period_ends_at" => "2012-10-09 11:51:10 -0400",
                     "balance_in_cents" => "9900",
               "total_revenue_in_cents" => "4200"
        },
                "site" => {
            "subdomain" => "acme-test",
                   "id" => "3"
        },
         "transaction" => {
                    "amount_in_cents" => "9900",
            "ending_balance_in_cents" => "9900",
                   "transaction_type" => "payment",
                         "payment_id" => "",
                               "memo" => "Bogus Gateway: Forced failure",
                            "success" => "false",
                               "kind" => "",
                               "type" => "Payment",
             "gateway_transaction_id" => "",
                         "created_at" => "2012-09-09 11:51:11 -0400",
                                 "id" => "36",
                    "subscription_id" => "14",
                         "product_id" => "23"
        }
    }
}

Back to Top

billing_date_change Payload


{
      "event" => "billing_date_change",
         "id" => "16",
    "payload" => {
        "subscription" => {
                 "cancellation_message" => "",
                             "customer" => {
                   "last_name" => "Doe",
                   "reference" => "",
                       "phone" => "555-555-1234",
                  "first_name" => "John",
                         "zip" => "12345",
                   "address_2" => "Apt 123",
                     "address" => "123 Main St",
                       "state" => "NC",
                  "updated_at" => "2012-09-09 11:38:32 -0400",
                  "created_at" => "2012-09-09 11:38:32 -0400",
                "organization" => "Acme, Inc.",
                          "id" => "15",
                       "email" => "john@example.com",
                     "country" => "US",
                        "city" => "Pleasantville"
            },
                     "trial_started_at" => "",
                              "product" => {
                                  "handle" => "handle_6a9273b8a",
                "expiration_interval_unit" => "never",
                             "archived_at" => "",
                           "interval_unit" => "month",
                          "product_family" => {
                             "handle" => "acme-online",
                    "accounting_code" => "",
                               "name" => "Acme Online",
                                 "id" => "4",
                        "description" => ""
                },
                         "accounting_code" => "",
                          "price_in_cents" => "9900",
                     "expiration_interval" => "",
                                    "name" => "Pro",
                     "trial_interval_unit" => "month",
                                "interval" => "1",
                           "return_params" => "",
                              "updated_at" => "2012-09-09 11:36:53 -0400",
                              "created_at" => "2012-09-06 10:09:35 -0400",
                                      "id" => "23",
                              "return_url" => "",
                          "trial_interval" => "",
                             "description" => "Vel soluta nihil qui accusamus quidem.  Et qui qui et sit omnis sit.  Veritatis voluptates aut incidunt mollitia corporis labore accusantium.",
                    "trial_price_in_cents" => "",
                       "update_return_url" => "",
                 "initial_charge_in_cents" => "",
                     "require_credit_card" => "true",
                     "request_credit_card" => "true"
            },
                       "trial_ended_at" => "",
                       "previous_state" => "active",
                           "expires_at" => "",
                          "coupon_code" => "",
            "current_period_started_at" => "2012-09-09 11:55:02 -0400",
                          "canceled_at" => "",
                   "next_assessment_at" => "2012-10-15 11:55:00 -0400",
                          "credit_card" => {
                           "last_name" => "Doe",
                           "card_type" => "bogus",
                         "vault_token" => "1",
                          "first_name" => "Jane",
                       "billing_state" => "NC",
                  "masked_card_number" => "XXXX-XXXX-XXXX-1",
                     "expiration_year" => "2016",
                     "billing_country" => "US",
                "customer_vault_token" => "",
                         "customer_id" => "15",
                     "billing_address" => "987 Commerce St",
                    "expiration_month" => "4",
                       "current_vault" => "bogus",
                        "billing_city" => "Greenberg",
                                  "id" => "14",
                   "billing_address_2" => "Suite 789",
                         "billing_zip" => "67890"
            },
                       "signup_revenue" => "99.00",
                    "signup_payment_id" => "30",
                    "delayed_cancel_at" => "",
                                "state" => "active",
              "cancel_at_end_of_period" => "false",
                           "updated_at" => "2012-09-09 11:55:27 -0400",
                           "created_at" => "2012-09-09 11:38:32 -0400",
                                   "id" => "14",
                         "activated_at" => "2012-09-09 11:38:33 -0400",
               "current_period_ends_at" => "2012-10-15 11:55:00 -0400",
                     "balance_in_cents" => "0",
               "total_revenue_in_cents" => "4200"
        },
                "site" => {
            "subdomain" => "acme-test",
                   "id" => "3"
        }
    }
}

Back to Top

subscription_state_change Payload


{
      "event" => "subscription_state_change",
         "id" => "9",
    "payload" => {
        "subscription" => {
                 "cancellation_message" => "",
                             "customer" => {
                   "last_name" => "Doe",
                   "reference" => "",
                       "phone" => "555-555-1234",
                  "first_name" => "John",
                         "zip" => "12345",
                   "address_2" => "Apt 123",
                     "address" => "123 Main St",
                       "state" => "NC",
                  "updated_at" => "2012-09-09 11:38:32 -0400",
                  "created_at" => "2012-09-09 11:38:32 -0400",
                "organization" => "Acme, Inc.",
                          "id" => "15",
                       "email" => "john@example.com",
                     "country" => "US",
                        "city" => "Pleasantville"
            },
                     "trial_started_at" => "",
                              "product" => {
                                  "handle" => "handle_6a9273b8a",
                "expiration_interval_unit" => "never",
                             "archived_at" => "",
                           "interval_unit" => "month",
                          "product_family" => {
                             "handle" => "acme-online",
                    "accounting_code" => "",
                               "name" => "Acme Online",
                                 "id" => "4",
                        "description" => ""
                },
                         "accounting_code" => "",
                          "price_in_cents" => "9900",
                     "expiration_interval" => "",
                                    "name" => "Pro",
                     "trial_interval_unit" => "month",
                                "interval" => "1",
                           "return_params" => "",
                              "updated_at" => "2012-09-09 11:36:53 -0400",
                              "created_at" => "2012-09-06 10:09:35 -0400",
                                      "id" => "23",
                              "return_url" => "",
                          "trial_interval" => "",
                             "description" => "Vel soluta nihil qui accusamus quidem.  Et qui qui et sit omnis sit.  Veritatis voluptates aut incidunt mollitia corporis labore accusantium.",
                    "trial_price_in_cents" => "",
                       "update_return_url" => "",
                 "initial_charge_in_cents" => "",
                     "require_credit_card" => "true",
                     "request_credit_card" => "true"
            },
                       "trial_ended_at" => "",
                       "previous_state" => "active",
                           "expires_at" => "",
                          "coupon_code" => "",
            "current_period_started_at" => "2012-09-09 11:51:10 -0400",
                          "canceled_at" => "",
                   "next_assessment_at" => "2012-09-09 11:51:10 -0400",
                          "credit_card" => {
                           "last_name" => "Doe",
                           "card_type" => "bogus",
                         "vault_token" => "2",
                          "first_name" => "Jane",
                       "billing_state" => "NC",
                  "masked_card_number" => "XXXX-XXXX-XXXX-2",
                     "expiration_year" => "2016",
                     "billing_country" => "US",
                "customer_vault_token" => "",
                         "customer_id" => "15",
                     "billing_address" => "987 Commerce St",
                    "expiration_month" => "4",
                       "current_vault" => "bogus",
                        "billing_city" => "Greenberg",
                                  "id" => "14",
                   "billing_address_2" => "Suite 789",
                         "billing_zip" => "67890"
            },
                       "signup_revenue" => "99.00",
                    "signup_payment_id" => "30",
                    "delayed_cancel_at" => "",
                                "state" => "past_due",
              "cancel_at_end_of_period" => "false",
                           "updated_at" => "2012-09-09 11:51:11 -0400",
                           "created_at" => "2012-09-09 11:38:32 -0400",
                                   "id" => "14",
                         "activated_at" => "2012-09-09 11:38:33 -0400",
               "current_period_ends_at" => "2012-10-09 11:51:10 -0400",
                     "balance_in_cents" => "9900",
               "total_revenue_in_cents" => "4200"
        },
                "site" => {
            "subdomain" => "acme-test",
                   "id" => "3"
        }
    }
}

Back to Top

subscription_product_change Payload


{
      "event" => "subscription_product_change",
         "id" => "17",
    "payload" => {
            "subscription" => {
                 "cancellation_message" => "",
                             "customer" => {
                   "last_name" => "Doe",
                   "reference" => "",
                       "phone" => "555-555-1234",
                  "first_name" => "John",
                         "zip" => "12345",
                   "address_2" => "Apt 123",
                     "address" => "123 Main St",
                       "state" => "NC",
                  "updated_at" => "2012-09-09 11:38:32 -0400",
                  "created_at" => "2012-09-09 11:38:32 -0400",
                "organization" => "Acme, Inc.",
                          "id" => "15",
                       "email" => "john@example.com",
                     "country" => "US",
                        "city" => "Pleasantville"
            },
                     "trial_started_at" => "",
                              "product" => {
                                  "handle" => "handle_5b3ae869a",
                "expiration_interval_unit" => "",
                             "archived_at" => "",
                           "interval_unit" => "month",
                          "product_family" => {
                             "handle" => "acme-online",
                    "accounting_code" => "",
                               "name" => "Acme Online",
                                 "id" => "4",
                        "description" => ""
                },
                         "accounting_code" => "",
                          "price_in_cents" => "2400",
                     "expiration_interval" => "",
                                    "name" => "Basic",
                     "trial_interval_unit" => "month",
                                "interval" => "1",
                           "return_params" => "",
                              "updated_at" => "2012-09-06 10:09:35 -0400",
                              "created_at" => "2012-09-06 10:09:35 -0400",
                                      "id" => "22",
                              "return_url" => "",
                          "trial_interval" => "1",
                             "description" => "Est est aut nobis corrupti omnis.  Nam autem et quis est.  Rerum est nihil a animi qui debitis et dolores.",
                    "trial_price_in_cents" => "0",
                       "update_return_url" => "",
                 "initial_charge_in_cents" => "",
                     "require_credit_card" => "true",
                     "request_credit_card" => "true"
            },
                       "trial_ended_at" => "",
                       "previous_state" => "active",
                           "expires_at" => "",
                          "coupon_code" => "",
            "current_period_started_at" => "2012-09-09 11:55:02 -0400",
                          "canceled_at" => "",
                   "next_assessment_at" => "2012-10-15 11:55:00 -0400",
                          "credit_card" => {
                           "last_name" => "Doe",
                           "card_type" => "bogus",
                         "vault_token" => "1",
                          "first_name" => "Jane",
                       "billing_state" => "NC",
                  "masked_card_number" => "XXXX-XXXX-XXXX-1",
                     "expiration_year" => "2016",
                     "billing_country" => "US",
                "customer_vault_token" => "",
                         "customer_id" => "15",
                     "billing_address" => "987 Commerce St",
                    "expiration_month" => "4",
                       "current_vault" => "bogus",
                        "billing_city" => "Greenberg",
                                  "id" => "14",
                   "billing_address_2" => "Suite 789",
                         "billing_zip" => "67890"
            },
                       "signup_revenue" => "99.00",
                    "signup_payment_id" => "30",
                    "delayed_cancel_at" => "",
                                "state" => "active",
              "cancel_at_end_of_period" => "false",
                           "updated_at" => "2012-09-09 12:00:46 -0400",
                           "created_at" => "2012-09-09 11:38:32 -0400",
                                   "id" => "14",
                         "activated_at" => "2012-09-09 11:38:33 -0400",
               "current_period_ends_at" => "2012-10-15 11:55:00 -0400",
                     "balance_in_cents" => "0",
               "total_revenue_in_cents" => "4200"
        },
                    "site" => {
            "subdomain" => "acme-test",
                   "id" => "3"
        },
        "previous_product" => {
                              "handle" => "handle_6a9273b8a",
            "expiration_interval_unit" => "never",
                         "archived_at" => "",
                       "interval_unit" => "month",
                      "product_family" => {
                         "handle" => "acme-online",
                "accounting_code" => "",
                           "name" => "Acme Online",
                             "id" => "4",
                    "description" => ""
            },
                     "accounting_code" => "",
                      "price_in_cents" => "9900",
                 "expiration_interval" => "",
                                "name" => "Pro",
                 "trial_interval_unit" => "month",
                            "interval" => "1",
                       "return_params" => "",
                          "updated_at" => "2012-09-09 11:36:53 -0400",
                          "created_at" => "2012-09-06 10:09:35 -0400",
                                  "id" => "23",
                          "return_url" => "",
                      "trial_interval" => "",
                         "description" => "Vel soluta nihil qui accusamus quidem.  Et qui qui et sit omnis sit.  Veritatis voluptates aut incidunt mollitia corporis labore accusantium.",
                "trial_price_in_cents" => "",
                   "update_return_url" => "",
             "initial_charge_in_cents" => "",
                 "require_credit_card" => "true",
                 "request_credit_card" => "true"
        }
    }
}

Back to Top

expiring_card Payload


{
      "event" => "expiring_card",
         "id" => "19",
    "payload" => {
        "subscription" => {
                     "trial_started_at" => "",
                 "cancellation_message" => "",
                             "customer" => {
                   "last_name" => "Doe",
                   "reference" => "",
                       "phone" => "555-555-1234",
                  "first_name" => "John Changed",
                         "zip" => "12345",
                   "address_2" => "Apt 123",
                     "address" => "123 Main St",
                       "state" => "NC",
                  "updated_at" => "2012-09-09 12:02:31 -0400",
                          "id" => "15",
                  "created_at" => "2012-09-09 11:38:32 -0400",
                "organization" => "Acme, Inc.",
                       "email" => "john@example.com",
                     "country" => "US",
                        "city" => "Pleasantville"
            },
                              "product" => {
                "expiration_interval_unit" => "",
                                  "handle" => "handle_5b3ae869a",
                             "archived_at" => "",
                           "interval_unit" => "month",
                          "price_in_cents" => "2400",
                         "accounting_code" => "",
                          "product_family" => {
                             "handle" => "acme-online",
                    "accounting_code" => "",
                               "name" => "Acme Online",
                                 "id" => "4",
                        "description" => ""
                },
                     "expiration_interval" => "",
                                    "name" => "Basic",
                                "interval" => "1",
                     "trial_interval_unit" => "month",
                           "return_params" => "",
                              "updated_at" => "2012-09-06 10:09:35 -0400",
                                      "id" => "22",
                          "trial_interval" => "1",
                              "created_at" => "2012-09-06 10:09:35 -0400",
                              "return_url" => "",
                             "description" => "Est est aut nobis corrupti omnis.  Nam autem et quis est.  Rerum est nihil a animi qui debitis et dolores.",
                    "trial_price_in_cents" => "0",
                       "update_return_url" => "",
                 "initial_charge_in_cents" => "",
                     "require_credit_card" => "true",
                     "request_credit_card" => "true"
            },
                       "previous_state" => "active",
                           "expires_at" => "",
                       "trial_ended_at" => "",
                   "next_assessment_at" => "2012-10-15 11:55:00 -0400",
                          "coupon_code" => "",
                          "canceled_at" => "",
            "current_period_started_at" => "2012-09-09 11:55:02 -0400",
                          "credit_card" => {
                           "last_name" => "Doe",
                       "billing_state" => "NC",
                         "vault_token" => "1",
                          "first_name" => "Jane",
                           "card_type" => "bogus",
                     "expiration_year" => "2012",
                  "masked_card_number" => "XXXX-XXXX-XXXX-1",
                     "billing_country" => "US",
                     "billing_address" => "987 Commerce St",
                         "customer_id" => "15",
                "customer_vault_token" => "",
                    "expiration_month" => "10",
                       "current_vault" => "bogus",
                                  "id" => "14",
                        "billing_city" => "Greenberg",
                   "billing_address_2" => "Suite 789",
                         "billing_zip" => "67890"
            },
                    "signup_payment_id" => "30",
                       "signup_revenue" => "99.00",
                                "state" => "active",
                    "delayed_cancel_at" => "",
              "cancel_at_end_of_period" => "false",
                           "updated_at" => "2012-09-09 12:00:46 -0400",
                                   "id" => "14",
                           "created_at" => "2012-09-09 11:38:32 -0400",
                         "activated_at" => "2012-09-09 11:38:33 -0400",
               "current_period_ends_at" => "2012-10-15 11:55:00 -0400",
                     "balance_in_cents" => "0",
               "total_revenue_in_cents" => "4200"
        },
                "site" => {
            "subdomain" => "acme-test",
                   "id" => "3"
        }
    }
}

Back to Top

customer_update Payload


{
      "event" => "customer_update",
         "id" => "18",
    "payload" => {
            "site" => {
            "subdomain" => "acme-test",
                   "id" => "3"
        },
        "customer" => {
               "last_name" => "Doe",
               "reference" => "",
                   "phone" => "555-555-1234",
              "first_name" => "John Changed",
                     "zip" => "12345",
               "address_2" => "Apt 123",
                 "address" => "123 Main St",
                   "state" => "NC",
              "updated_at" => "2012-09-09 12:02:31 -0400",
              "created_at" => "2012-09-09 11:38:32 -0400",
            "organization" => "Acme, Inc.",
                      "id" => "15",
                   "email" => "john@example.com",
                 "country" => "US",
                    "city" => "Pleasantville"
        }
    }
}

Back to Top

component_allocation_change Payload


{
  "id" => "68",
  "event" => "component_allocation_change",
  "payload" => {
    "site" => {
      "subdomain" => "acme-test",
      "id" => "3"
    },
    "subscription" => {
      "id" => "25",
      "name" => "Kenyatta Johns"
    },
    "product" => {
      "id" => "23",
      "name" => "Pro"
    },
    "component" => {
      "kind" => "quantity_based_component",
      "id" => "7",
      "name" => "Software Seats",
      "unit_name" => "seat"
    },
    "new_allocation" => "3",
    "previous_allocation" => "0",
    "memo" => "Customer requested 3 seats.",
    "timestamp" => "2012-11-19T16:59:13Z"
  }
}

Back to Top

metered_usage Payload


{
  "id" => "70",
  "event" => "metered_usage",
  "payload" => {
    "site" => {
      "subdomain" => "acme-test",
      "id" => "3"
    },
    "subscription" => {
      "id" => "25",
      "name" => "Kenyatta Johns"
    },
    "product" => {
      "id" => "23",
      "name" => "Pro"
    },
    "component" => {
      "kind" => "metered_component",
      "id" => "8",
      "name" => "Minutes",
      "unit_name" => "minute"
    },
    "usage_quantity" => "17",
    "previous_unit_balance" => "102",
    "new_unit_balance" => "119",
    "memo" => "Push from app",
    "timestamp" => "2012-11-19T17:03:29Z"
  }
}

Back to Top

upcoming_renewal_notice Payload


{
  "id": "1",
  "event": "upcoming_renewal_notice",
  "payload": {
    "site": {
      "id": "2",
      "subdomain": "acme"
    },
    "customer": {
      "id": "0",
      "first_name": "John",
      "last_name": "Doe",
      "reference": "johndoe",
      "organization": "Acme, Inc.",
      "email": "john@example.com"
    },
    "email_sent": "true",
    "estimated_renewal_amount_in_cents": "100",
    "message": "Upcoming renewal notice sent.",
    "payment_profile": {
      "id": "0",
      "first_name": "Jane",
      "last_name": "Doe",
      "card_type": "visa",
      "masked_card_number": "XXXX-XXXX-XXXX-1111",
      "expiration_month": "4",
      "expiration_year": "2016"
    },
    "product": {
      "id": "0",
      "name": "Pro",
      "product_family_id": "0",
      "product_family_name": "Acme Online"
    },
    "subscription": {
      "id": "0",
      "state": "active",
      "current_period_ends_at": "2012-10-09 11:49:43 -0400"
    }
  }
}

Back to Top

end_of_trial_notice Payload


{
  "id": "2",
  "event": "trial_end_notice",
  "payload": {
    "site": {
      "id": "2",
      "subdomain": "acme"
    },
    "customer": {
      "id": "0",
      "first_name": "John",
      "last_name": "Doe",
      "reference": "johndoe",
      "organization": "Acme, Inc.",
      "email": "john@example.com"
    },
    "email_sent": "true",
    "estimated_renewal_amount_in_cents": "200",
    "message": "End of trial notice sent",
    "payment_profile": {
      "id": "0",
      "first_name": "Jane",
      "last_name": "Doe",
      "card_type": "visa",
      "masked_card_number": "XXXX-XXXX-XXXX-1111",
      "expiration_month": "4",
      "expiration_year": "2016"
    },
    "product": {
      "id": "0",
      "name": "Pro",
      "product_family_id": "0",
      "product_family_name": "Acme Online"
    },
    "subscription": {
      "id": "0",
      "state": "active",
      "current_period_ends_at": "2012-10-09 11:49:43 -0400"
    }
  }
}

Back to Top