Webhooks Reference

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

Webhook Limitations

Chargify places two limitations on your site for how webhooks can be used. We limit the data retention (amount of time we store old webhooks) and the amount of endpoints you can have per site. For more information on how webhooks are limited, please view the information published under My Account.

Webhook Timestamps

Webhooks sent from Chargify globally utilize EST as the timezone for all content in the body of the payload. Alternately, API responses from Chargify are sent with the timezone of current Chargify site.

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 event 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), 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.

Inoperative Endpoints

We’ve found often merchants set up a temporary webhook endpoint in order to test or review their integration. It can be easy to forget that these endpoints are active. Unfortunately, webhook endpoints have the potential to generate extremely large amounts of work on the Chargify systems as we build and then try to reliably deliver them to the merchant.

If Chargify experiences multiple failures when trying to get a successful acknowledgement from a configured endpoint, this begins a process of pausing or disabling the inoperative endpoint. There’s many moving parts to the webhook attempt-pause-retry functionality, so please continue onward to fully understand the process.

Earlier in this article, we touched on the backoff schedule for an individual webhook event. For example:

  • A singular webhook event that Chargify attempts to deliver 5 times – has failed 5 times in a row
  • This webhook is now considered to be in the failed state
  • These 5 attempts contribute to the running total of endpoint attempts, which are discussed below.
  • The current endpoint attempt for the example cited about is 5.
  • At this stage, the endpoint is unaffected and webhooks will still be successfully delivered.

Further webhook endpoint failure calculation examples:

  • If you have 5 webhook events that have failed, your failure count is 25
  • If you have 6 webhook events that have failed, your failure count is 30
  • etc.

We do not expose your running total of failure counts in the Chargify application. However, we will promptly alert you to configuration issues with your account. You will be informed of an inoperative endpoint by a notification in your account or email. If you have a paused or disabled endpoint, you simply need to edit the URL to your new URL to re-activate it.

Failure count State System behaviour
1 to 25 Enabled Retries proceed automatically (as above)
26 to 50 Paused Webhooks are generated in the Paused state, and must be sent using the webhooks panel. The endpoint is checked every two hours to see if it has started responding again. If so, it will be re-enabled.
51 and over Disabled Webhooks are no longer generated for this endpoint
If you have deleted an endpoint from your Chargify settings, you will not be able to resend webhooks that are paused that reference the deleted endpoint.

Events

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

Event Key Trigger Payload
billing_date_change Any change to the billing date that is initiated explicitly by altering,the billing date via the application or the API. This will not be triggered,upon a normal renewal and period advancement, or a migration. event_id, site, subscription1 (with previous_billing_date)
component_allocation_change Any change to a subscription’s quantity-based component allocation orenabled 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. 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. event_id, 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
customer_update Any change to the following customer fields: first_name, last_name,,organization, email, reference, address, address 2, city,,state, zip, country, phone. event_id, site, customer
dunning_step_reached When a subscription reaches any step of the dunning process, a webhook will be generated. event_id, site, subscription,product, dunner, current_step, next_step
expiration_date_change Any change to an existing expiration_date for a subscription. event_id, site, subscription, customer, product
expiring_card A periodic event sent by Chargify event_id, site, subscription 1, 6
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. event_id, 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
payment_failure Any failed payment attempt 4 example payload event_id, site, subscription, transaction
payment_success Any successful payment4 example payload event_id, site, subscription, transaction
renewal_failure A failed periodic renewal, i.e. the credit card is declined3 event_id, site, subscription1
renewal_success A successful periodic renewal3 event_id, site, subscription1
signup_success Any successful signup (Subscription created) via the API, application, or Public Pages event_id, site, subscription1,9
signup_failure Any failed signup (Subscription failed to begin) via the API, application, or Public Pages2 event_id, site, subscription1
subscription_card_update Any change to the active credit card type payment profile.7,8 event_id, site, subscription,product, previous_payment_profile, updated_payment_profile
subscription_product_change A successful change from an old product to a new product for a subscription. This webhook will fire for a product version change. event_id, site, previous_product, subscription1
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 event_id, site, subscription1,5
upcoming_renewal_notice A webhook will be generated 3 days before a subscription is set to renew. event_id, site, customer, email_sent, estimated_renewal_amount_in_cents, message, payment_profile, product,,subscription (condensed)
upgrade_downgrade_failure Any failed upgrade/downgrade event_id, site, subscription1, previous_product
upgrade_downgrade_success Any successful upgrade/downgrade event_id, site, subscription1, previous_product

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, a One-time Charge, a retry after failure, or a payment applied to an Invoice
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 current month.
7 Adding a card through the application does not currently generate a subscription_card_update event.
8 Changes to PayPal and Bank Account type payment profiles do not currently generate any webhooks.
9 Component allocations are not currently included in the signup_success webhook.

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

Statement Events

At the end of every period (i.e. at renewal) there will be either a statement_closed or a statement_settled webhook. statement_settled means the statement closed and payment was successfully received simultaneously (or payment was not needed). statement_closed means the statement closed but payment was not successfully received.

For example, if you receive a statement_closed webhook for statement #3, you will also receive a statement_settled webhook for statement #3 at a later time, if the statement becomes paid (i.e. out of dunning retry or card update).

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

Webhook Signature

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

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

The Webhook Testing panel (accessed from the site’s Dashboard) will allow you to send test Webhook data to any of your configured endpoints, and will show you what we sent and the response we received from you.

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

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

Population of webhook data

Each event in Chargify will create a unique webhook payload that contains relevant data for your subscriber. In most cases, not all of the values will be populated in the webhook payload. We ask that you use your best judgement in these cases to understand if the data exists or not.

For example: we will not deliver the data for reason_code in a signup_success webhook. Stay tuned, as we will be populating this section of our documentation for more examples of nil results in a payload data.

Example Payloads

billing_date_change payload

{"site"=>{"id"=>31615, "subdomain"=>"general-goods"},
 "subscription"=>
  {"id"=>16372192,
   "state"=>"active",
   "trial_started_at"=>nil,
   "trial_ended_at"=>nil,
   "activated_at"=>Mon, 13 Feb 2017 11:50:57 EST -05:00,
   "created_at"=>Mon, 13 Feb 2017 11:50:55 EST -05:00,
   "updated_at"=>Mon, 13 Feb 2017 13:39:20 EST -05:00,
   "expires_at"=>nil,
   "balance_in_cents"=>0,
   "current_period_ends_at"=>Thu, 13 Apr 2017 14:28:00 EDT -04:00,
   "next_assessment_at"=>Thu, 13 Apr 2017 14:28:00 EDT -04:00,
   "canceled_at"=>nil,
   "cancellation_message"=>nil,
   "next_product_id"=>nil,
   "cancel_at_end_of_period"=>false,
   "payment_collection_method"=>"automatic",
   "snap_day"=>nil,
   "cancellation_method"=>nil,
   "current_period_started_at"=>Mon, 13 Feb 2017 13:28:05 EST -05:00,
   "previous_state"=>"active",
   "signup_payment_id"=>173961106,
   "signup_revenue"=>"60.00",
   "delayed_cancel_at"=>nil,
   "coupon_code"=>nil,
   "total_revenue_in_cents"=>22000,
   "product_price_in_cents"=>5000,
   "product_version_number"=>1,
   "payment_type"=>"credit_card",
   "referral_code"=>"cz8wdq",
   "coupon_use_count"=>nil,
   "coupon_uses_allowed"=>nil,
   "customer"=>
    {"id"=>15826583,
     "first_name"=>"Doris",
     "last_name"=>"Tester",
     "organization"=>"Acme",
     "email"=>"doris@example.com",
     "created_at"=>Mon, 13 Feb 2017 11:50:55 EST -05:00,
     "updated_at"=>Mon, 13 Feb 2017 11:50:58 EST -05:00,
     "reference"=>"123456789",
     "address"=>"123 Anywhere Street",
     "address_2"=>"",
     "city"=>"Boston",
     "state"=>"MA",
     "zip"=>"02120",
     "country"=>"US",
     "phone"=>"555-555-1212",
     "portal_invite_last_sent_at"=>Mon, 13 Feb 2017 11:50:58 EST -05:00,
     "portal_invite_last_accepted_at"=>nil,
     "verified"=>nil,
     "portal_customer_created_at"=>Mon, 13 Feb 2017 11:50:58 EST -05:00,
     "vat_number"=>"123456789"
     "cc_emails"=>nil,
     "tax_exempt"=>false},
   "product"=>
    {"id"=>4442358,
     "name"=>"Gold Product",
     "handle"=>"gold-product",
     "description"=>"",
     "accounting_code"=>"",
     "request_credit_card"=>true,
     "expiration_interval"=>nil,
     "expiration_interval_unit"=>"never",
     "created_at"=>Thu, 15 Dec 2016 09:32:36 EST -05:00,
     "updated_at"=>Thu, 15 Dec 2016 09:32:36 EST -05:00,
     "price_in_cents"=>5000,
     "interval"=>1,
     "interval_unit"=>"month",
     "initial_charge_in_cents"=>nil,
     "trial_price_in_cents"=>nil,
     "trial_interval"=>nil,
     "trial_interval_unit"=>"month",
     "archived_at"=>nil,
     "require_credit_card"=>true,
     "return_params"=>"",
     "taxable"=>false,
     "update_return_url"=>"http://www.example.com",
     "initial_charge_after_trial"=>false,
     "version_number"=>1,
     "update_return_params"=>"id={subscription_id}&ref={customer_reference}",
     "product_family"=>
      {"id"=>986840,
       "name"=>"Acme Products",
       "description"=>"",
       "handle"=>"acme-products",
       "accounting_code"=>nil},
     "public_signup_pages"=>
      [{"id"=>306012,
        "return_url"=>"",
        "return_params"=>"",
        "url"=>
         "https://general-goods.chargifypay.com/subscribe/7dbsnjd8t8cx/gold-product"},
       {"id"=>310598,
        "return_url"=>"",
        "return_params"=>"",
        "url"=>
         "https://general-goods.chargifypay.com/subscribe/ksjh9py5fn5h/gold-product"},
       {"id"=>311132,
        "return_url"=>"",
        "return_params"=>"",
        "url"=>
         "https://general-goods.chargifypay.com/subscribe/kjmks49g8d3d/gold-product"}]},
   "credit_card"=>
    {"id"=>10914352,
     "first_name"=>"Doris",
     "last_name"=>"Tester",
     "masked_card_number"=>"XXXX-XXXX-XXXX-1111",
     "card_type"=>"visa",
     "expiration_month"=>2,
     "expiration_year"=>2018,
     "customer_id"=>15826583,
     "current_vault"=>"bogus",
     "vault_token"=>"1",
     "billing_address"=>"",
     "billing_city"=>"",
     "billing_state"=>"",
     "billing_zip"=>"",
     "billing_country"=>"",
     "customer_vault_token"=>nil,
     "billing_address_2"=>"",
     "payment_type"=>"credit_card"},
   "previous_billing_date"=>Mon, 13 Mar 2017 14:28:05 EDT -04:00},
 "event_id"=>377604301}

Back to example payloads

component_allocation_change payload

On/Off Component Change

{"site"=>{"id"=>31615, "subdomain"=>"general-goods"},
 "component"=>
  {"id"=>375117,
   "kind"=>"on_off_component",
   "name"=>"Cancellation fee",
   "unit_name"=>"on/off"},
 "subscription"=>{"id"=>16372192, "name"=>"Doris Tester"},
 "product"=>{"id"=>4443536, "name"=>"Business Monthly"},
 "memo"=>"Adding cancellation fee for Doris",
 "timestamp"=>"2017-02-13T18:46:49Z",
 "previous_allocation"=>0,
 "new_allocation"=>1,
 "event_id"=>377608723}

Quantity-based Component Change

{"site"=>{"id"=>31615, "subdomain"=>"general-goods"},
 "component"=>
  {"id"=>375250,
   "kind"=>"quantity_based_component",
   "name"=>"Quantity Component",
   "unit_name"=>"Quantity Component"},
 "subscription"=>{"id"=>16372192, "name"=>"Doris Tester"},
 "product"=>{"id"=>4443536, "name"=>"Business Monthly"},
 "memo"=>"Adding 90 components for Doris",
 "timestamp"=>"2017-02-13T18:49:58Z",
 "previous_allocation"=>10,
 "new_allocation"=>90,
 "event_id"=>377609562}

Back to example payloads

customer_update payload

{"customer"=>
  {"id"=>15826583,
   "first_name"=>"Doris",
   "last_name"=>"Tester",
   "organization"=>"Acme",
   "email"=>"doristester@example.com",
   "created_at"=>Mon, 13 Feb 2017 11:50:55 EST -05:00,
   "updated_at"=>Mon, 13 Feb 2017 13:42:07 EST -05:00,
   "reference"=>"123456789",
   "address"=>"123 Anywhere Street",
   "address_2"=>"",
   "city"=>"Boston",
   "state"=>"MA",
   "zip"=>"02120",
   "country"=>"US",
   "phone"=>"555-555-1212",
   "portal_invite_last_sent_at"=>Mon, 13 Feb 2017 11:50:58 EST -05:00,
   "portal_invite_last_accepted_at"=>nil,
   "verified"=>false,
   "portal_customer_created_at"=>Mon, 13 Feb 2017 11:50:58 EST -05:00,
   "vat_number"=>"123456789"
   "cc_emails"=>"",
   "tax_exempt"=>false},
 "site"=>{"id"=>31615, "subdomain"=>"general-goods"},
 "event_id"=>377607274}

Back to example payloads

dunning_step_reached payload

{
  "site" => {
    "id" => 3,
    "subdomain" => "acme-test"
  },
  "subscription"  =>  {
    "id" => 37,
    "state" => "past_due",
    "trial_started_at" => Wed, 25 Jan 2017 15:48:56 EST -05:00,
    "trial_ended_at" => Wed, 25 Jan 2017 15:49:35 EST -05:00,
    "activated_at" => nil,
    "created_at" => Wed, 25 Jan 2017 15:48:56 EST -05:00,
    "updated_at" => Wed, 25 Jan 2017 15:49:40 EST -05:00,
    "expires_at" => nil,
    "balance_in_cents" => 2400,
    "current_period_ends_at" => Sat, 25 Feb 2017 15:49:35 EST -05:00,
    "next_assessment_at" => Wed, 25 Jan 2017 15:49:35 EST -05:00,
    "canceled_at" => nil,
    "cancellation_message" => nil,
    "next_product_id" => nil,
    "cancel_at_end_of_period" => false,
    "payment_collection_method" => "automatic",
    "snap_day" => nil,
    "cancellation_method" => nil,
    "current_period_started_at" => Wed, 25 Jan 2017 15:49:35 EST -05:00,
    "previous_state" => "past_due",
    "signup_payment_id" => 101,
    "signup_revenue" => "0.00",
    "delayed_cancel_at" => nil,
    "coupon_code" => nil,
    "total_revenue_in_cents" => 0,
    "product_price_in_cents" => 2400,
    "product_version_number" => 1,
    "payment_type" => nil,
    "referral_code" => nil,
    "coupon_use_count" => nil,
    "coupon_uses_allowed" => nil,
    "customer" =>  {
      "id" => 37,
      "first_name" => "Ella",
      "last_name" => "Gertrude",
      "organization" => "",
      "email" => "ella@example.com",
      "created_at" => Wed, 25 Jan 2017 15:48:56 EST -05:00,
      "updated_at" => Wed, 25 Jan 2017 15:48:56 EST -05:00,
      "reference" => nil,
      "address" => "",
      "address_2" => "",
      "city" => "",
      "state" => "",
      "zip" => "",
      "country" => "",
      "phone" => "",
      "portal_invite_last_sent_at" => nil,
      "portal_invite_last_accepted_at" => nil,
      "verified" => false,
      "portal_customer_created_at" => nil,
      "vat_number"=>"123456789"
      "cc_emails" => nil,
      "tax_exempt" => false
    },
    "product" => {
      "id" => 24,
      "name" => "Basic",
      "handle" => "basic",
      "description" => "Magni porro sint iste illum.  Qui aut reiciendis voluptatum.  Est et aut.",
      "accounting_code" => nil,
      "request_credit_card" => true,
      "expiration_interval" => nil,
      "expiration_interval_unit" => nil,
      "created_at" => Mon, 23 Jan 2017 15:33:40 EST -05:00,
      "updated_at" => Mon, 23 Jan 2017 15:33:40 EST -05:00,
      "price_in_cents" => 2400,
      "interval" => 1,
      "interval_unit" => "month",
      "initial_charge_in_cents" => nil,
      "trial_price_in_cents" => 0,
      "trial_interval" => 1,
      "trial_interval_unit" => "month",
      "archived_at" => nil,
      "require_credit_card" => true,
      "return_params" => nil,
      "taxable" => false,
      "update_return_url"=>"http://www.example.com",
      "initial_charge_after_trial" => false,
      "version_number" => 1,
      "update_return_params"=>"id={subscription_id}&ref={customer_reference}",
      "product_family" => {
        "id" => 4,
        "name" => "Acme Online",
        "description" => nil,
        "handle" => "acme-online",
        "accounting_code" => nil
      },
      "public_signup_pages" => [ {
        "id" => 5,
        "return_url" => nil,
        "return_params" => nil,
        "url" => "http://acme-test.chargify.dev/subscribe/y884dzrgd9r9/basic"
      } ]
    }
  },
  "dunner" => {
    "subscription_id" => 37,
    "state" => "active",
    "attempts" => 1,
    "last_attempted_at" => Wed, 25 Jan 2017 15:49:42 EST -05:00,
    "created_at" => Wed, 25 Jan 2017 15:49:42 EST -05:00,
    "revenue_at_risk_in_cents" => nil
  },
  "current_step" => {
    "day_threshold" => 1,
    "action" => "retry",
    "email_body" => "Hello ,\n\nWe just tried to process your current amount due of \nfor , but  there is no credit card on file for this subscription. \n\nPlease use the following link to quickly and easily update your billing information:\n\n\nWe will attempt to retry the card on file prior to cancellation. If we are unable to successfully charge the outstanding balance of , your account will be canceled in 27 days.\n\nThank you for choosing us!\n\nSincerely,\n\n\n",
    "email_subject" => "NOTICE: ",
    "send_email" => true,
    "send_bcc_email" => false,
    "send_sms" => false,
    "sms_body" => nil
  },
  "next_step" => {
    "day_threshold" => 28,
    "action" => "cancel",
    "email_body" => "Hello ,\n\n\nWe've made several attempts to bill you for your  account but you have not yet provided us with a valid credit card profile.\n\nAs a result, your account has been canceled.\n\nIf you did not intend to cancel your account, please contact us to reactivate your account and avoid further interruption of your service.\n\nThank you for choosing us!\n\nSincerely,\n\n\n",
    "email_subject" => "NOTICE:  Account Canceled",
    "send_email" => true,
    "send_bcc_email" => false,
    "send_sms" => false,
    "sms_body" => nil
  },
  "event_id" => 165
}

Back to example payloads

expiring_card payload

{"subscription"=>
  {"id"=>16474328,
   "state"=>"active",
   "trial_started_at"=>nil,
   "trial_ended_at"=>nil,
   "activated_at"=>Mon, 20 Feb 2017 18:28:48 EST -05:00,
   "created_at"=>Mon, 20 Feb 2017 18:28:47 EST -05:00,
   "updated_at"=>Mon, 20 Feb 2017 18:32:14 EST -05:00,
   "expires_at"=>nil,
   "balance_in_cents"=>0,
   "current_period_ends_at"=>Mon, 20 Mar 2017 19:28:47 EDT -04:00,
   "next_assessment_at"=>Mon, 20 Mar 2017 19:28:47 EDT -04:00,
   "canceled_at"=>nil,
   "cancellation_message"=>nil,
   "next_product_id"=>nil,
   "cancel_at_end_of_period"=>false,
   "payment_collection_method"=>"automatic",
   "snap_day"=>nil,
   "cancellation_method"=>nil,
   "current_period_started_at"=>Mon, 20 Feb 2017 18:28:47 EST -05:00,
   "previous_state"=>"active",
   "signup_payment_id"=>174876340,
   "signup_revenue"=>"0.00",
   "delayed_cancel_at"=>nil,
   "coupon_code"=>nil,
   "total_revenue_in_cents"=>0,
   "product_price_in_cents"=>0,
   "product_version_number"=>1,
   "payment_type"=>"credit_card",
   "referral_code"=>"ww6mq5",
   "coupon_use_count"=>nil,
   "coupon_uses_allowed"=>nil,
   "customer"=>
    {"id"=>15102905,
     "first_name"=>"Amelia",
     "last_name"=>"Example",
     "organization"=>"",
     "email"=>"amelia@example.com",
     "created_at"=>Thu, 15 Dec 2016 09:33:15 EST -05:00,
     "updated_at"=>Thu, 15 Dec 2016 09:34:09 EST -05:00,
     "reference"=>nil,
     "address"=>"",
     "address_2"=>"",
     "city"=>"",
     "state"=>"",
     "zip"=>"",
     "country"=>"",
     "phone"=>"",
     "portal_invite_last_sent_at"=>nil,
     "portal_invite_last_accepted_at"=>nil,
     "verified"=>nil,
     "portal_customer_created_at"=>Thu, 15 Dec 2016 09:33:21 EST -05:00,
     "vat_number"=>"123456789"
     "cc_emails"=>nil,
     "tax_exempt"=>false},
   "product"=>
    {"id"=>4461042,
     "name"=>"Gold Product",
     "handle"=>"gold-product",
     "description"=>"",
     "accounting_code"=>"",
     "request_credit_card"=>true,
     "expiration_interval"=>nil,
     "expiration_interval_unit"=>"never",
     "created_at"=>Mon, 20 Feb 2017 18:28:18 EST -05:00,
     "updated_at"=>Mon, 20 Feb 2017 18:28:18 EST -05:00,
     "price_in_cents"=>0,
     "interval"=>1,
     "interval_unit"=>"month",
     "initial_charge_in_cents"=>nil,
     "trial_price_in_cents"=>nil,
     "trial_interval"=>nil,
     "trial_interval_unit"=>"month",
     "archived_at"=>nil,
     "require_credit_card"=>true,
     "return_params"=>"",
     "taxable"=>false,
     "update_return_url"=>"http://www.example.com",
     "initial_charge_after_trial"=>false,
     "version_number"=>1,
     "update_return_params"=>"id={subscription_id}&ref={customer_reference}",
     "product_family"=>
      {"id"=>986840,
       "name"=>"Acme Products",
       "description"=>"",
       "handle"=>"acme-products",
       "accounting_code"=>nil},
     "public_signup_pages"=>
      [{"id"=>312984,
        "return_url"=>nil,
        "return_params"=>"",
        "url"=>
         "https://general-goods.chargifypay.com/subscribe/yt4ybcgk7998/zero-dollar-product"}]},
   "credit_card"=>
    {"id"=>10548239,
     "first_name"=>"Amelia",
     "last_name"=>"Example",
     "masked_card_number"=>"XXXX-XXXX-XXXX-2",
     "card_type"=>"bogus",
     "expiration_month"=>2,
     "expiration_year"=>2017,
     "customer_id"=>15102905,
     "current_vault"=>"bogus",
     "vault_token"=>"2",
     "billing_address"=>"",
     "billing_city"=>"",
     "billing_state"=>"",
     "billing_zip"=>"",
     "billing_country"=>"",
     "customer_vault_token"=>nil,
     "billing_address_2"=>"",
     "payment_type"=>"credit_card"}},
 "site"=>{"id"=>31615, "subdomain"=>"general-goods"},
 "event_id"=>380080310}

Back to example payloads

expiration_date_change payload

{"site"=>{"id"=>31615, "subdomain"=>"general-goods"},
 "subscription"=>
  {"id"=>16945349,
   "state"=>"active",
   "trial_started_at"=>nil,
   "trial_ended_at"=>nil,
   "activated_at"=>Fri, 03 Mar 2017 13:00:08 EST -05:00,
   "created_at"=>Fri, 03 Mar 2017 13:00:02 EST -05:00,
   "updated_at"=>Fri, 03 Mar 2017 13:03:55 EST -05:00,
   "expires_at"=>Sun, 15 Oct 2017 00:00:00 EDT -04:00,
   "balance_in_cents"=>0,
   "current_period_ends_at"=>Sun, 05 Mar 2017 13:00:02 EST -05:00,
   "next_assessment_at"=>Sat, 04 Mar 2017 13:00:02 EST -05:00,
   "canceled_at"=>nil,
   "cancellation_message"=>nil,
   "next_product_id"=>nil,
   "cancel_at_end_of_period"=>false,
   "payment_collection_method"=>"automatic",
   "snap_day"=>nil,
   "cancellation_method"=>nil,
   "current_period_started_at"=>Fri, 03 Mar 2017 13:00:02 EST -05:00,
   "previous_state"=>"active",
   "signup_payment_id"=>176501894,
   "signup_revenue"=>"1.00",
   "delayed_cancel_at"=>nil,
   "coupon_code"=>nil,
   "total_revenue_in_cents"=>100,
   "product_price_in_cents"=>100,
   "product_version_number"=>1,
   "payment_type"=>"credit_card",
   "referral_code"=>"968js9",
   "coupon_use_count"=>nil,
   "coupon_uses_allowed"=>nil,
   "reason_code"=>nil,
   "customer"=>
    {"id"=>16428076,
     "first_name"=>"Expiring ",
     "last_name"=>"Subscription",
     "organization"=>"",
     "email"=>"expiring@example.com",
     "created_at"=>Fri, 03 Mar 2017 13:00:02 EST -05:00,
     "updated_at"=>Fri, 03 Mar 2017 13:00:02 EST -05:00,
     "reference"=>nil,
     "address"=>"",
     "address_2"=>"",
     "city"=>"",
     "state"=>"",
     "zip"=>"",
     "country"=>"",
     "phone"=>"",
     "portal_invite_last_sent_at"=>nil,
     "portal_invite_last_accepted_at"=>nil,
     "verified"=>nil,
     "portal_customer_created_at"=>nil,
     "vat_number"=>"123456789"
     "cc_emails"=>nil,
     "tax_exempt"=>false},
   "product"=>
    {"id"=>4464208,
     "name"=>"Product that expires",
     "handle"=>"product-that-expires",
     "description"=>"",
     "accounting_code"=>"",
     "request_credit_card"=>true,
     "expiration_interval"=>1,
     "expiration_interval_unit"=>"day",
     "created_at"=>Fri, 03 Mar 2017 12:02:38 EST -05:00,
     "updated_at"=>Fri, 03 Mar 2017 12:02:38 EST -05:00,
     "price_in_cents"=>100,
     "interval"=>2,
     "interval_unit"=>"day",
     "initial_charge_in_cents"=>nil,
     "trial_price_in_cents"=>nil,
     "trial_interval"=>nil,
     "trial_interval_unit"=>"month",
     "archived_at"=>nil,
     "require_credit_card"=>true,
     "return_params"=>"",
     "taxable"=>false,
     "update_return_url"=>"http://www.example.com",
     "initial_charge_after_trial"=>false,
     "version_number"=>1,
     "update_return_params"=>"id={subscription_id}&ref={customer_reference}",
     "product_family"=>
      {"id"=>986840,
       "name"=>"Acme Products",
       "description"=>"",
       "handle"=>"acme-products",
       "accounting_code"=>nil},
     "public_signup_pages"=>
      [{"id"=>314126,
        "return_url"=>nil,
        "return_params"=>"",
        "url"=>
         "https://general-goods.chargifypay.com/subscribe/zs8352q9qtyz/product-that-expires"}]},
   "credit_card"=>
    {"id"=>11380641,
     "first_name"=>"Expiring ",
     "last_name"=>"Subscription",
     "masked_card_number"=>"XXXX-XXXX-XXXX-1",
     "card_type"=>"bogus",
     "expiration_month"=>1,
     "expiration_year"=>2027,
     "customer_id"=>16428076,
     "current_vault"=>"bogus",
     "vault_token"=>"1",
     "billing_address"=>"",
     "billing_city"=>"",
     "billing_state"=>"",
     "billing_zip"=>"",
     "billing_country"=>"",
     "customer_vault_token"=>nil,
     "billing_address_2"=>"",
     "payment_type"=>"credit_card"},
   "previous_expires_at"=>Wed, 15 Jul 2015 00:00:00 EDT -04:00},
 "event_id"=>384446169}

Back to example payloads

metered_usage payload

{"site"=>{"id"=>31615, "subdomain"=>"general-goods"},
 "component"=>
  {"id"=>375042,
   "kind"=>"metered_component",
   "name"=>"Test Metered",
   "unit_name"=>"Test Metered"},
 "subscription"=>{"id"=>16372192, "name"=>"Doris Tester"},
 "product"=>{"id"=>4443536, "name"=>"Business Monthly"},
 "memo"=>"Recording Metered Component Usage",
 "timestamp"=>"2017-02-13T18:50:23Z",
 "previous_unit_balance"=>#<BigDecimal:7f097c4b7d28,'0.0',9(18)>,
 "new_unit_balance"=>1000,
 "usage_quantity"=>1000,
 "event_id"=>377609676}

Back to example payloads

payment_failure payload

{"site"=>{"id"=>31615, "subdomain"=>"general-goods"},
 "subscription"=>
  {"id"=>16090357,
   "state"=>"past_due",
   "trial_started_at"=>Mon, 23 Jan 2017 09:59:26 EST -05:00,
   "trial_ended_at"=>Mon, 23 Jan 2017 09:59:49 EST -05:00,
   "activated_at"=>nil,
   "created_at"=>Mon, 23 Jan 2017 09:59:26 EST -05:00,
   "updated_at"=>Mon, 30 Jan 2017 12:07:40 EST -05:00,
   "expires_at"=>nil,
   "balance_in_cents"=>1000,
   "current_period_ends_at"=>Thu, 23 Feb 2017 09:59:49 EST -05:00,
   "next_assessment_at"=>Tue, 31 Jan 2017 12:07:40 EST -05:00,
   "canceled_at"=>nil,
   "cancellation_message"=>nil,
   "next_product_id"=>nil,
   "cancel_at_end_of_period"=>false,
   "payment_collection_method"=>"automatic",
   "snap_day"=>nil,
   "cancellation_method"=>nil,
   "current_period_started_at"=>Mon, 23 Jan 2017 09:59:49 EST -05:00,
   "previous_state"=>"past_due",
   "signup_payment_id"=>171203419,
   "signup_revenue"=>"0.00",
   "delayed_cancel_at"=>nil,
   "coupon_code"=>nil,
   "total_revenue_in_cents"=>0,
   "product_price_in_cents"=>1000,
   "product_version_number"=>1,
   "payment_type"=>"credit_card",
   "referral_code"=>"4nvrr2",
   "coupon_use_count"=>nil,
   "coupon_uses_allowed"=>nil,
   "customer"=>
    {"id"=>15547334,
     "first_name"=>"No obligation",
     "last_name"=>"Bad Card",
     "organization"=>"",
     "email"=>"nobbad@example.com",
     "created_at"=>Mon, 23 Jan 2017 09:59:26 EST -05:00,
     "updated_at"=>Mon, 23 Jan 2017 09:59:28 EST -05:00,
     "reference"=>nil,
     "address"=>"",
     "address_2"=>"",
     "city"=>"",
     "state"=>"",
     "zip"=>"",
     "country"=>"",
     "phone"=>"",
     "portal_invite_last_sent_at"=>Mon, 23 Jan 2017 09:59:28 EST -05:00,
     "portal_invite_last_accepted_at"=>nil,
     "verified"=>nil,
     "portal_customer_created_at"=>Mon, 23 Jan 2017 09:59:28 EST -05:00,
     "vat_number"=>"123456789"
     "cc_emails"=>nil,
     "tax_exempt"=>false},
   "product"=>
    {"id"=>4453830,
     "name"=>"Trial No obligation",
     "handle"=>"trial-no-obligation",
     "description"=>"",
     "accounting_code"=>"",
     "request_credit_card"=>true,
     "expiration_interval"=>nil,
     "expiration_interval_unit"=>"never",
     "created_at"=>Mon, 23 Jan 2017 09:53:23 EST -05:00,
     "updated_at"=>Thu, 26 Jan 2017 13:35:29 EST -05:00,
     "price_in_cents"=>1000,
     "interval"=>1,
     "interval_unit"=>"month",
     "initial_charge_in_cents"=>nil,
     "trial_price_in_cents"=>0,
     "trial_interval"=>1,
     "trial_interval_unit"=>"day",
     "archived_at"=>nil,
     "require_credit_card"=>false,
     "return_params"=>"",
     "taxable"=>false,
     "update_return_url"=>"http://www.example.com",
     "initial_charge_after_trial"=>false,
     "version_number"=>1,
     "update_return_params"=>"id={subscription_id}&ref={customer_reference}",
     "product_family"=>
      {"id"=>986840,
       "name"=>"Acme Products",
       "description"=>"",
       "handle"=>"acme-products",
       "accounting_code"=>nil},
     "public_signup_pages"=>
      [{"id"=>310559,
        "return_url"=>nil,
        "return_params"=>"",
        "url"=>
         "https://general-goods.chargifypay.com/subscribe/ngbsvxv4hq7q/trial-no-obligation"}]},
   "credit_card"=>
    {"id"=>10734525,
     "first_name"=>"Chester",
     "last_name"=>"Tester",
     "masked_card_number"=>"XXXX-XXXX-XXXX-2",
     "card_type"=>"bogus",
     "expiration_month"=>1,
     "expiration_year"=>2027,
     "customer_id"=>15547334,
     "current_vault"=>"bogus",
     "vault_token"=>"2",
     "billing_address"=>"",
     "billing_city"=>"",
     "billing_state"=>"",
     "billing_zip"=>"",
     "billing_country"=>"",
     "customer_vault_token"=>nil,
     "billing_address_2"=>"",
     "payment_type"=>"credit_card"}},
 "transaction"=>
  {"id"=>172084191,
   "subscription_id"=>16090357,
   "type"=>"Payment",
   "kind"=>nil,
   "transaction_type"=>"payment",
   "success"=>false,
   "amount_in_cents"=>1000,
   "memo"=>"Bogus Gateway: Forced failure",
   "created_at"=>Mon, 30 Jan 2017 12:07:39 EST -05:00,
   "starting_balance_in_cents"=>1000,
   "ending_balance_in_cents"=>1000,
   "gateway_used"=>"bogus",
   "gateway_transaction_id"=>nil,
   "gateway_order_id"=>nil,
   "payment_id"=>nil,
   "product_id"=>4453830,
   "tax_id"=>nil,
   "component_id"=>nil,
   "statement_id"=>84491989,
   "customer_id"=>15547334,
   "card_number"=>"XXXX-XXXX-XXXX-2",
   "card_expiration"=>"01/2027",
   "card_type"=>"bogus",
   "refunded_amount_in_cents"=>0,
   "invoice_id"=>nil},
 "event_id"=>372846073}

Back to example payloads

payment_success payload

{"site"=>{"id"=>31615, "subdomain"=>"general-goods"},
 "subscription"=>
  {"id"=>16327080,
   "state"=>"active",
   "trial_started_at"=>nil,
   "trial_ended_at"=>nil,
   "activated_at"=>Thu, 09 Feb 2017 11:42:28 EST -05:00,
   "created_at"=>Thu, 09 Feb 2017 11:42:26 EST -05:00,
   "updated_at"=>Mon, 13 Feb 2017 12:03:41 EST -05:00,
   "expires_at"=>nil,
   "balance_in_cents"=>0,
   "current_period_ends_at"=>Wed, 08 Mar 2017 12:00:00 EST -05:00,
   "next_assessment_at"=>Wed, 08 Mar 2017 12:00:00 EST -05:00,
   "canceled_at"=>nil,
   "cancellation_message"=>nil,
   "next_product_id"=>nil,
   "cancel_at_end_of_period"=>false,
   "payment_collection_method"=>"automatic",
   "snap_day"=>"8",
   "cancellation_method"=>nil,
   "current_period_started_at"=>Mon, 13 Feb 2017 12:00:00 EST -05:00,
   "previous_state"=>"active",
   "signup_payment_id"=>0,
   "signup_revenue"=>"0.00",
   "delayed_cancel_at"=>nil,
   "coupon_code"=>nil,
   "total_revenue_in_cents"=>5667,
   "product_price_in_cents"=>6900,
   "product_version_number"=>1,
   "payment_type"=>"credit_card",
   "referral_code"=>"6zcsxw",
   "coupon_use_count"=>nil,
   "coupon_uses_allowed"=>nil,
   "customer"=>
    {"id"=>15780191,
     "first_name"=>"Test "
     "last_name"=>"Test",                                                                
     "organization"=>"",
     "email"=>"test@example.com",
     "created_at"=>Thu, 09 Feb 2017 11:42:26 EST -05:00,
     "updated_at"=>Thu, 09 Feb 2017 11:42:29 EST -05:00,
     "reference"=>nil,
     "address"=>nil,
     "address_2"=>nil,
     "city"=>nil,
     "state"=>nil,
     "zip"=>nil,
     "country"=>nil,
     "phone"=>"",
     "portal_invite_last_sent_at"=>Thu, 09 Feb 2017 11:42:29 EST -05:00,
     "portal_invite_last_accepted_at"=>nil,
     "verified"=>false,
     "portal_customer_created_at"=>Thu, 09 Feb 2017 11:42:29 EST -05:00,
     "vat_number"=>"123456789"
     "cc_emails"=>nil,
     "tax_exempt"=>false},
   "product"=>
    {"id"=>4458204,
     "name"=>"Monthly product ",
     "handle"=>"monthly-product",
     "description"=>"",
     "accounting_code"=>"",
     "request_credit_card"=>true,
     "expiration_interval"=>nil,
     "expiration_interval_unit"=>"never",
     "created_at"=>Wed, 08 Feb 2017 16:48:54 EST -05:00,
     "updated_at"=>Wed, 08 Feb 2017 16:48:54 EST -05:00,
     "price_in_cents"=>6900,
     "interval"=>1,
     "interval_unit"=>"month",
     "initial_charge_in_cents"=>nil,
     "trial_price_in_cents"=>nil,
     "trial_interval"=>nil,
     "trial_interval_unit"=>"month",
     "archived_at"=>nil,
     "require_credit_card"=>true,
     "return_params"=>"",
     "taxable"=>false,
     "update_return_url"=>"http://www.example.com",
     "initial_charge_after_trial"=>false,
     "version_number"=>1,
     "update_return_params"=>"id={subscription_id}&ref={customer_reference}",
     "product_family"=>
      {"id"=>986840,
       "name"=>"Acme Products",
       "description"=>"",
       "handle"=>"acme-products",
       "accounting_code"=>nil},
     "public_signup_pages"=>
      [{"id"=>312067,
        "return_url"=>nil,
        "return_params"=>"",
        "url"=>
         "https://general-goods.chargifypay.com/subscribe/5x8sbq29vgkn/monthly-product"},
       {"id"=>312068,
        "return_url"=>"",
        "return_params"=>"",
        "url"=>
         "https://general-goods.chargifypay.com/subscribe/vsmzkwvmfqqx/monthly-product"}]},
   "credit_card"=>
    {"id"=>10881632,
     "first_name"=>"Test",
     "last_name"=>"Page",
     "masked_card_number"=>"XXXX-XXXX-XXXX-1",
     "card_type"=>"bogus",
     "expiration_month"=>1,
     "expiration_year"=>2027,
     "customer_id"=>15780191,
     "current_vault"=>"bogus",
     "vault_token"=>"1",
     "billing_address"=>nil,
     "billing_city"=>nil,
     "billing_state"=>nil,
     "billing_zip"=>"",
     "billing_country"=>nil,
     "customer_vault_token"=>nil,
     "billing_address_2"=>nil,
     "payment_type"=>"credit_card"}},
 "transaction"=>
  {"id"=>173963435,
   "subscription_id"=>16327080,
   "type"=>"Payment",
   "kind"=>nil,
   "transaction_type"=>"payment",
   "success"=>true,
   "amount_in_cents"=>5667,
   "memo"=>"Test Monthly - Monthly product : Renewal payment",
   "created_at"=>Mon, 13 Feb 2017 12:03:40 EST -05:00,
   "starting_balance_in_cents"=>5667,
   "ending_balance_in_cents"=>0,
   "gateway_used"=>"bogus",
   "gateway_transaction_id"=>"53433",
   "gateway_order_id"=>nil,
   "payment_id"=>nil,
   "product_id"=>4458204,
   "tax_id"=>nil,
   "component_id"=>nil,
   "statement_id"=>85701746,
   "customer_id"=>15780191,
   "card_number"=>"XXXX-XXXX-XXXX-1",
   "card_expiration"=>"01/2027",
   "card_type"=>"bogus",
   "refunded_amount_in_cents"=>0,
   "invoice_id"=>nil},
 "event_id"=>377575306}

Back to example payloads

refund_failure payload

{"amount_in_cents"=>6000,
 "customer_id"=>15826583,
 "customer_email"=>"doristester@example.com",
 "customer_name"=>"Doris Tester",
 "customer_reference"=>"123456789",
 "errors"=>
  ["Cannot process a refund for a subscription without a payment profile."],
 "gateway_transaction_id"=>nil,
 "gateway_order_id"=>nil,
 "gateway_used"=>"bogus",
 "masked_card_number"=>"XXXX-XXXX-XXXX-1111",
 "memo"=>"Refund for services",
 "payment_amount_in_cents"=>6000,
 "payment_id"=>173961106,
 "site"=>{"id"=>31615, "subdomain"=>"general-goods"},
 "subscription_id"=>16372192,
 "timestamp"=>"2017-02-13T19:57:13Z",
 "event_id"=>377635202}

Back to example payloads

refund_success payload

{"refund_id"=>173982961,
 "amount_in_cents"=>16000,
 "customer_id"=>15826583,
 "customer_email"=>"doristester@example.com",
 "customer_name"=>"Doris Tester",
 "customer_reference"=>"123456789",
 "gateway_transaction_id"=>nil,
 "gateway_order_id"=>nil,
 "gateway_used"=>"bogus",
 "masked_card_number"=>"XXXX-XXXX-XXXX-1111",
 "memo"=>"Refund for services",
 "payment_amount_in_cents"=>16000,
 "payment_id"=>173973102,
 "site"=>{"id"=>31615, "subdomain"=>"general-goods"},
 "subscription_id"=>16372192,
 "timestamp"=>"2017-02-13T19:56:40Z",
 "event_id"=>377635077}

Back to example payloads

renewal_failure payload

{"subscription"=>
  {"id"=>16372192,
   "state"=>"past_due",
   "trial_started_at"=>nil,
   "trial_ended_at"=>nil,
   "activated_at"=>Mon, 13 Feb 2017 11:50:57 EST -05:00,
   "created_at"=>Mon, 13 Feb 2017 11:50:55 EST -05:00,
   "updated_at"=>Mon, 13 Feb 2017 13:28:06 EST -05:00,
   "expires_at"=>nil,
   "balance_in_cents"=>16000,
   "current_period_ends_at"=>Mon, 13 Mar 2017 14:28:05 EDT -04:00,
   "next_assessment_at"=>Tue, 14 Feb 2017 13:28:06 EST -05:00,
   "canceled_at"=>nil,
   "cancellation_message"=>nil,
   "next_product_id"=>nil,
   "cancel_at_end_of_period"=>false,
   "payment_collection_method"=>"automatic",
   "snap_day"=>nil,
   "cancellation_method"=>nil,
   "current_period_started_at"=>Mon, 13 Feb 2017 13:28:05 EST -05:00,
   "previous_state"=>"active",
   "signup_payment_id"=>173961106,
   "signup_revenue"=>"60.00",
   "delayed_cancel_at"=>nil,
   "coupon_code"=>nil,
   "total_revenue_in_cents"=>6000,
   "product_price_in_cents"=>5000,
   "product_version_number"=>1,
   "payment_type"=>nil,
   "referral_code"=>"cz8wdq",
   "coupon_use_count"=>nil,
   "coupon_uses_allowed"=>nil,
   "customer"=>
    {"id"=>15826583,
     "first_name"=>"Doris",
     "last_name"=>"Tester",
     "organization"=>"Acme",
     "email"=>"doris@example.com",
     "created_at"=>Mon, 13 Feb 2017 11:50:55 EST -05:00,
     "updated_at"=>Mon, 13 Feb 2017 11:50:58 EST -05:00,
     "reference"=>"123456789",
     "address"=>"123 Anywhere Street",
     "address_2"=>"",
     "city"=>"Boston",
     "state"=>"MA",
     "zip"=>"02120",
     "country"=>"US",
     "phone"=>"555-555-1212",
     "portal_invite_last_sent_at"=>Mon, 13 Feb 2017 11:50:58 EST -05:00,
     "portal_invite_last_accepted_at"=>nil,
     "verified"=>nil,
     "portal_customer_created_at"=>Mon, 13 Feb 2017 11:50:58 EST -05:00,
     "vat_number"=>"123456789"
     "cc_emails"=>nil,
     "tax_exempt"=>false},
   "product"=>
    {"id"=>4442358,
     "name"=>"Gold Product",
     "handle"=>"gold-product",
     "description"=>"",
     "accounting_code"=>"",
     "request_credit_card"=>true,
     "expiration_interval"=>nil,
     "expiration_interval_unit"=>"never",
     "created_at"=>Thu, 15 Dec 2016 09:32:36 EST -05:00,
     "updated_at"=>Thu, 15 Dec 2016 09:32:36 EST -05:00,
     "price_in_cents"=>5000,
     "interval"=>1,
     "interval_unit"=>"month",
     "initial_charge_in_cents"=>nil,
     "trial_price_in_cents"=>nil,
     "trial_interval"=>nil,
     "trial_interval_unit"=>"month",
     "archived_at"=>nil,
     "require_credit_card"=>true,
     "return_params"=>"",
     "taxable"=>false,
     "update_return_url"=>"http://www.example.com",
     "initial_charge_after_trial"=>false,
     "version_number"=>1,
     "update_return_params"=>"id={subscription_id}&ref={customer_reference}",
     "product_family"=>
      {"id"=>986840,
       "name"=>"Acme Products",
       "description"=>"",
       "handle"=>"acme-products",
       "accounting_code"=>nil},
     "public_signup_pages"=>
      [{"id"=>306012,
        "return_url"=>"",
        "return_params"=>"",
        "url"=>
         "https://general-goods.chargifypay.com/subscribe/7dbsnjd8t8cx/gold-product"},
       {"id"=>310598,
        "return_url"=>"",
        "return_params"=>"",
        "url"=>
         "https://general-goods.chargifypay.com/subscribe/ksjh9py5fn5h/gold-product"},
       {"id"=>311132,
        "return_url"=>"",
        "return_params"=>"",
        "url"=>
         "https://general-goods.chargifypay.com/subscribe/kjmks49g8d3d/gold-product"}]}},
 "site"=>{"id"=>31615, "subdomain"=>"general-goods"},
 "event_id"=>377601653}

Back to example payloads

renewal_success payload

{"subscription"=>
  {"id"=>16327080,
   "state"=>"active",
   "trial_started_at"=>nil,
   "trial_ended_at"=>nil,
   "activated_at"=>Thu, 09 Feb 2017 11:42:28 EST -05:00,
   "created_at"=>Thu, 09 Feb 2017 11:42:26 EST -05:00,
   "updated_at"=>Mon, 13 Feb 2017 12:03:41 EST -05:00,
   "expires_at"=>nil,
   "balance_in_cents"=>5667,
   "current_period_ends_at"=>Wed, 08 Mar 2017 12:00:00 EST -05:00,
   "next_assessment_at"=>Wed, 08 Mar 2017 12:00:00 EST -05:00,
   "canceled_at"=>nil,
   "cancellation_message"=>nil,
   "next_product_id"=>nil,
   "cancel_at_end_of_period"=>false,
   "payment_collection_method"=>"automatic",
   "snap_day"=>"8",
   "cancellation_method"=>nil,
   "current_period_started_at"=>Mon, 13 Feb 2017 12:00:00 EST -05:00,
   "previous_state"=>"active",
   "signup_payment_id"=>0,
   "signup_revenue"=>"0.00",
   "delayed_cancel_at"=>nil,
   "coupon_code"=>nil,
   "total_revenue_in_cents"=>0,
   "product_price_in_cents"=>6900,
   "product_version_number"=>1,
   "payment_type"=>"credit_card",
   "referral_code"=>"6zcsxw",
   "coupon_use_count"=>nil,
   "coupon_uses_allowed"=>nil,
   "customer"=>
    {"id"=>15780191,
     "first_name"=>"Test ",
     "last_name"=>"Monthly",
     "organization"=>"",
     "email"=>"test@example.com",
     "created_at"=>Thu, 09 Feb 2017 11:42:26 EST -05:00,
     "updated_at"=>Thu, 09 Feb 2017 11:42:29 EST -05:00,
     "reference"=>nil,
     "address"=>nil,
     "address_2"=>nil,
     "city"=>nil,
     "state"=>nil,
     "zip"=>nil,
     "country"=>nil,
     "phone"=>"",
     "portal_invite_last_sent_at"=>Thu, 09 Feb 2017 11:42:29 EST -05:00,
     "portal_invite_last_accepted_at"=>nil,
     "verified"=>false,
     "portal_customer_created_at"=>Thu, 09 Feb 2017 11:42:29 EST -05:00,
     "vat_number"=>"123456789"
     "cc_emails"=>nil,
     "tax_exempt"=>false},
   "product"=>
    {"id"=>4458204,
     "name"=>"Monthly product ",
     "handle"=>"monthly-product",
     "description"=>"",
     "accounting_code"=>"",
     "request_credit_card"=>true,
     "expiration_interval"=>nil,
     "expiration_interval_unit"=>"never",
     "created_at"=>Wed, 08 Feb 2017 16:48:54 EST -05:00,
     "updated_at"=>Wed, 08 Feb 2017 16:48:54 EST -05:00,
     "price_in_cents"=>6900,
     "interval"=>1,
     "interval_unit"=>"month",
     "initial_charge_in_cents"=>nil,
     "trial_price_in_cents"=>nil,
     "trial_interval"=>nil,
     "trial_interval_unit"=>"month",
     "archived_at"=>nil,
     "require_credit_card"=>true,
     "return_params"=>"",
     "taxable"=>false,
     "update_return_url"=>"http://www.example.com",
     "initial_charge_after_trial"=>false,
     "version_number"=>1,
     "update_return_params"=>"id={subscription_id}&ref={customer_reference}",
     "product_family"=>
      {"id"=>986840,
       "name"=>"Acme Products",
       "description"=>"",
       "handle"=>"acme-products",
       "accounting_code"=>nil},
     "public_signup_pages"=>
      [{"id"=>312067,
        "return_url"=>nil,
        "return_params"=>"",
        "url"=>
         "https://general-goods.chargifypay.com/subscribe/5x8sbq29vgkn/monthly-product"},
       {"id"=>312068,
        "return_url"=>"",
        "return_params"=>"",
        "url"=>
         "https://general-goods.chargifypay.com/subscribe/vsmzkwvmfqqx/monthly-product"}]},
   "credit_card"=>
    {"id"=>10881632,
     "first_name"=>"Test",
     "last_name"=>"Page",
     "masked_card_number"=>"XXXX-XXXX-XXXX-1",
     "card_type"=>"bogus",
     "expiration_month"=>1,
     "expiration_year"=>2027,
     "customer_id"=>15780191,
     "current_vault"=>"bogus",
     "vault_token"=>"1",
     "billing_address"=>nil,
     "billing_city"=>nil,
     "billing_state"=>nil,
     "billing_zip"=>"",
     "billing_country"=>nil,
     "customer_vault_token"=>nil,
     "billing_address_2"=>nil,
     "payment_type"=>"credit_card"}},
 "site"=>{"id"=>31615, "subdomain"=>"general-goods"},
 "event_id"=>377575304}

Back to example payloads

signup_failure payload

{"subscription"=>
  {"id"=>16374036,
   "state"=>"failed_to_create",
   "trial_started_at"=>nil,
   "trial_ended_at"=>nil,
   "activated_at"=>nil,
   "created_at"=>Mon, 13 Feb 2017 13:08:30 EST -05:00,
   "updated_at"=>Mon, 13 Feb 2017 13:08:31 EST -05:00,
   "expires_at"=>nil,
   "balance_in_cents"=>6900,
   "current_period_ends_at"=>Wed, 08 Mar 2017 12:00:00 EST -05:00,
   "next_assessment_at"=>nil,
   "canceled_at"=>nil,
   "cancellation_message"=>nil,
   "next_product_id"=>nil,
   "cancel_at_end_of_period"=>false,
   "payment_collection_method"=>"automatic",
   "snap_day"=>"8",
   "cancellation_method"=>nil,
   "current_period_started_at"=>Mon, 13 Feb 2017 13:08:30 EST -05:00,
   "previous_state"=>"failed_to_create",
   "signup_payment_id"=>173970546,
   "signup_revenue"=>"69.00",
   "delayed_cancel_at"=>nil,
   "coupon_code"=>nil,
   "total_revenue_in_cents"=>0,
   "product_price_in_cents"=>6900,
   "product_version_number"=>1,
   "payment_type"=>"credit_card",
   "referral_code"=>"k9f3h5",
   "coupon_use_count"=>nil,
   "coupon_uses_allowed"=>nil,
   "customer"=>
    {"id"=>15828506,
     "first_name"=>"Joe",
     "last_name"=>"Tester",
     "organization"=>"Acme",
     "email"=>"joetester@example.com",
     "created_at"=>Mon, 13 Feb 2017 13:08:30 EST -05:00,
     "updated_at"=>Mon, 13 Feb 2017 13:08:30 EST -05:00,
     "reference"=>nil,
     "address"=>nil,
     "address_2"=>nil,
     "city"=>nil,
     "state"=>nil,
     "zip"=>nil,
     "country"=>nil,
     "phone"=>"555-555-1212",
     "portal_invite_last_sent_at"=>nil,
     "portal_invite_last_accepted_at"=>nil,
     "verified"=>false,
     "portal_customer_created_at"=>nil,
     "vat_number"=>"123456789"
     "cc_emails"=>nil,
     "tax_exempt"=>false},
   "product"=>
    {"id"=>4458204,
     "name"=>"Monthly product ",
     "handle"=>"monthly-product",
     "description"=>"",
     "accounting_code"=>"",
     "request_credit_card"=>true,
     "expiration_interval"=>nil,
     "expiration_interval_unit"=>"never",
     "created_at"=>Wed, 08 Feb 2017 16:48:54 EST -05:00,
     "updated_at"=>Wed, 08 Feb 2017 16:48:54 EST -05:00,
     "price_in_cents"=>6900,
     "interval"=>1,
     "interval_unit"=>"month",
     "initial_charge_in_cents"=>nil,
     "trial_price_in_cents"=>nil,
     "trial_interval"=>nil,
     "trial_interval_unit"=>"month",
     "archived_at"=>nil,
     "require_credit_card"=>true,
     "return_params"=>"",
     "taxable"=>false,
     "update_return_url"=>"http://www.example.com",
     "initial_charge_after_trial"=>false,
     "version_number"=>1,
     "update_return_params"=>"id={subscription_id}&ref={customer_reference}",
     "product_family"=>
      {"id"=>986840,
       "name"=>"Acme Products",
       "description"=>"",
       "handle"=>"acme-products",
       "accounting_code"=>nil},
     "public_signup_pages"=>
      [{"id"=>312067,
        "return_url"=>nil,
        "return_params"=>"",
        "url"=>
         "https://general-goods.chargifypay.com/subscribe/5x8sbq29vgkn/monthly-product"},
       {"id"=>312068,
        "return_url"=>"",
        "return_params"=>"",
        "url"=>
         "https://general-goods.chargifypay.com/subscribe/vsmzkwvmfqqx/monthly-product"}]},
   "credit_card"=>
    {"id"=>10913241,
     "first_name"=>"Joe",
     "last_name"=>"Tester",
     "masked_card_number"=>"XXXX-XXXX-XXXX-2",
     "card_type"=>"bogus",
     "expiration_month"=>1,
     "expiration_year"=>2027,
     "customer_id"=>15828506,
     "current_vault"=>"bogus",
     "vault_token"=>"2",
     "billing_address"=>nil,
     "billing_city"=>nil,
     "billing_state"=>nil,
     "billing_zip"=>"02120",
     "billing_country"=>nil,
     "customer_vault_token"=>nil,
     "billing_address_2"=>nil,
     "payment_type"=>"credit_card"}},
 "site"=>{"id"=>31615, "subdomain"=>"general-goods"},
 "event_id"=>377594843}

Back to example payloads

signup_success payload

{"subscription"=>
  {"id"=>16372192,
   "state"=>"active",
   "trial_started_at"=>nil,
   "trial_ended_at"=>nil,
   "activated_at"=>Mon, 13 Feb 2017 11:50:57 EST -05:00,
   "created_at"=>Mon, 13 Feb 2017 11:50:55 EST -05:00,
   "updated_at"=>Mon, 13 Feb 2017 11:50:57 EST -05:00,
   "expires_at"=>nil,
   "balance_in_cents"=>6000,
   "current_period_ends_at"=>Mon, 13 Mar 2017 12:50:55 EDT -04:00,
   "next_assessment_at"=>Mon, 13 Mar 2017 12:50:55 EDT -04:00,
   "canceled_at"=>nil,
   "cancellation_message"=>nil,
   "next_product_id"=>nil,
   "cancel_at_end_of_period"=>false,
   "payment_collection_method"=>"automatic",
   "snap_day"=>nil,
   "cancellation_method"=>nil,
   "current_period_started_at"=>Mon, 13 Feb 2017 11:50:55 EST -05:00,
   "previous_state"=>"active",
   "signup_payment_id"=>173961106,
   "signup_revenue"=>"60.00",
   "delayed_cancel_at"=>nil,
   "coupon_code"=>nil,
   "total_revenue_in_cents"=>0,
   "product_price_in_cents"=>5000,
   "product_version_number"=>1,
   "payment_type"=>"credit_card",
   "referral_code"=>"cz8wdq",
   "coupon_use_count"=>nil,
   "coupon_uses_allowed"=>nil,
   "reason_code"=>nil,
   "automatically_resume_at"=>nil,
   "coupon_codes"=>[],
   "offer_id"=>64,
   "customer"=>
    {"id"=>15826583,
     "first_name"=>"Doris",
     "last_name"=>"Tester",
     "organization"=>"Acme",
     "email"=>"doris@example.com",
     "created_at"=>Mon, 13 Feb 2017 11:50:55 EST -05:00,
     "updated_at"=>Mon, 13 Feb 2017 11:50:55 EST -05:00,
     "reference"=>"123456789",
     "address"=>"123 Anywhere Street",
     "address_2"=>"",
     "city"=>"Boston",
     "state"=>"MA",
     "zip"=>"02120",
     "country"=>"US",
     "phone"=>"555-555-1212",
     "portal_invite_last_sent_at"=>nil,
     "portal_invite_last_accepted_at"=>nil,
     "vat_number"=>"123456789"
     "verified"=>nil,
     "portal_customer_created_at"=>nil,
     "vat_number"=>"123456789"
     "cc_emails"=>nil,
     "tax_exempt"=>false},
   "product"=>
    {"id"=>4442358,
     "name"=>"Gold Product",
     "handle"=>"gold-product",
     "description"=>"",
     "accounting_code"=>"",
     "request_credit_card"=>true,
     "expiration_interval"=>nil,
     "expiration_interval_unit"=>"never",
     "created_at"=>Thu, 15 Dec 2016 09:32:36 EST -05:00,
     "updated_at"=>Thu, 15 Dec 2016 09:32:36 EST -05:00,
     "price_in_cents"=>5000,
     "interval"=>1,
     "interval_unit"=>"month",
     "initial_charge_in_cents"=>nil,
     "trial_price_in_cents"=>nil,
     "trial_interval"=>nil,
     "trial_interval_unit"=>"month",
     "archived_at"=>nil,
     "require_credit_card"=>true,
     "return_params"=>"",
     "taxable"=>false,
     "update_return_url"=>"http://www.example.com",
     "tax_code"=>"PC040100",
     "initial_charge_after_trial"=>false,
     "version_number"=>1,
     "update_return_params"=>"id={subscription_id}&ref={customer_reference}",
     "product_family"=>
      {"id"=>986840,
       "name"=>"Acme Products",
       "description"=>"",
       "handle"=>"acme-products",
       "accounting_code"=>nil},
     "public_signup_pages"=>
      [{"id"=>306012,
        "return_url"=>"",
        "return_params"=>"",
        "url"=>
         "https://general-goods.chargifypay.com/subscribe/7dbsnjd8t8cx/gold-product"},
       {"id"=>310598,
        "return_url"=>"",
        "return_params"=>"",
        "url"=>
         "https://general-goods.chargifypay.com/subscribe/ksjh9py5fn5h/gold-product"},
       {"id"=>311132,
        "return_url"=>"",
        "return_params"=>"",
        "url"=>
         "https://general-goods.chargifypay.com/subscribe/kjmks49g8d3d/gold-product"}]},
   "credit_card"=>
    {"id"=>10911728,
     "first_name"=>"Doris",
     "last_name"=>"Tester",
     "masked_card_number"=>"XXXX-XXXX-XXXX-1111",
     "card_type"=>"visa",
     "expiration_month"=>1,
     "expiration_year"=>2027,
     "customer_id"=>15826583,
     "current_vault"=>"bogus",
     "vault_token"=>"1",
     "billing_address"=>"123 Anywhere Street",
     "billing_city"=>"Boston",
     "billing_state"=>"MA",
     "billing_zip"=>"02120",
     "billing_country"=>"US",
     "customer_vault_token"=>nil,
     "billing_address_2"=>"",
     "payment_type"=>"credit_card"}},
 "site"=>{"id"=>31615, "subdomain"=>"general-goods"},
 "event_id"=>377569865}

Back to example payloads

statement_closed payload

{"site"=>{"id"=>31615, "subdomain"=>"general-goods"},
 "subscription"=>
  {"id"=>16372192, "state"=>"past_due", "balance_in_cents"=>16000},
 "customer"=>
  {"id"=>15826583,
   "first_name"=>"Doris",
   "last_name"=>"Tester",
   "reference"=>"123456789",
   "organization"=>"Acme",
   "address"=>"123 Anywhere Street",
   "address_2"=>"",
   "city"=>"Boston",
   "state"=>"MA",
   "zip"=>"02120",
   "country"=>"US",
   "email"=>"doris@example.com",
   "phone"=>"555-555-1212"},
 "statement"=>
  {"closed_at"=>Mon, 13 Feb 2017 13:28:06 EST -05:00,
   "created_at"=>Mon, 13 Feb 2017 13:15:22 EST -05:00,
   "id"=>85705040,
   "opened_at"=>Mon, 13 Feb 2017 11:50:58 EST -05:00,
   "settled_at"=>nil,
   "subscription_id"=>16372192,
   "updated_at"=>Mon, 13 Feb 2017 13:28:06 EST -05:00,
   "starting_balance_in_cents"=>0,
   "ending_balance_in_cents"=>16000,
   "total_in_cents"=>16000,
   "memo"=>"We thank you for your continued business!",
   "events"=>
    {"0"=>
      {"id"=>377601643,
       "key"=>"billing_date_change",
       "message"=>
        "Billing date changed on Doris Tester's subscription to Gold Product from 03/13/2017 to 02/13/2017"}},
   "transactions"=>
    {"0"=>
      {"id"=>173970824,
       "subscription_id"=>16372192,
       "type"=>"Adjustment",
       "kind"=>nil,
       "transaction_type"=>"adjustment",
       "success"=>true,
       "amount_in_cents"=>10000,
       "memo"=>"100",
       "created_at"=>Mon, 13 Feb 2017 13:15:22 EST -05:00,
       "starting_balance_in_cents"=>0,
       "ending_balance_in_cents"=>10000,
       "gateway_used"=>nil,
       "gateway_transaction_id"=>nil,
       "gateway_order_id"=>nil,
       "payment_id"=>nil,
       "product_id"=>4442358,
       "tax_id"=>nil,
       "component_id"=>nil,
       "statement_id"=>85705040,
       "customer_id"=>15826583},
     "1"=>
      {"id"=>173972839,
       "subscription_id"=>16372192,
       "type"=>"Charge",
       "kind"=>"baseline",
       "transaction_type"=>"charge",
       "success"=>true,
       "amount_in_cents"=>5000,
       "memo"=>"Gold Product (02/13/2017 - 03/13/2017)",
       "created_at"=>Mon, 13 Feb 2017 13:28:06 EST -05:00,
       "starting_balance_in_cents"=>10000,
       "ending_balance_in_cents"=>15000,
       "gateway_used"=>nil,
       "gateway_transaction_id"=>nil,
       "gateway_order_id"=>nil,
       "payment_id"=>nil,
       "product_id"=>4442358,
       "tax_id"=>nil,
       "component_id"=>nil,
       "statement_id"=>85705040,
       "customer_id"=>15826583,
       "original_amount_in_cents"=>nil,
       "discount_amount_in_cents"=>nil,
       "taxable_amount_in_cents"=>nil,
       "taxations"=>{}},
     "2"=>
      {"id"=>173972840,
       "subscription_id"=>16372192,
       "type"=>"Charge",
       "kind"=>"quantity_based_component",
       "transaction_type"=>"charge",
       "success"=>true,
       "amount_in_cents"=>1000,
       "memo"=>"Quantity Component: 10 Quantity Components",
       "created_at"=>Mon, 13 Feb 2017 13:28:06 EST -05:00,
       "starting_balance_in_cents"=>15000,
       "ending_balance_in_cents"=>16000,
       "gateway_used"=>nil,
       "gateway_transaction_id"=>nil,
       "gateway_order_id"=>nil,
       "payment_id"=>nil,
       "product_id"=>4442358,
       "tax_id"=>nil,
       "component_id"=>375250,
       "statement_id"=>85705040,
       "customer_id"=>15826583,
       "original_amount_in_cents"=>nil,
       "discount_amount_in_cents"=>nil,
       "taxable_amount_in_cents"=>nil,
       "taxations"=>{}},
     "3"=>
      {"id"=>173972841,
       "subscription_id"=>16372192,
       "type"=>"InfoTransaction",
       "kind"=>nil,
       "transaction_type"=>"info",
       "success"=>false,
       "amount_in_cents"=>0,
       "memo"=>"No credit card was on file for the $160.00 balance",
       "created_at"=>Mon, 13 Feb 2017 13:28:06 EST -05:00,
       "starting_balance_in_cents"=>16000,
       "ending_balance_in_cents"=>16000,
       "gateway_used"=>nil,
       "gateway_transaction_id"=>nil,
       "gateway_order_id"=>nil,
       "payment_id"=>nil,
       "product_id"=>4442358,
       "tax_id"=>nil,
       "component_id"=>nil,
       "statement_id"=>85705040,
       "customer_id"=>15826583}},
   "future_payments"=>{}},
 "product"=>{"id"=>4442358, "name"=>"Gold Product"},
 "product_family"=>{"id"=>986840, "name"=>"Acme Products"},
 "payment_profile"=>{},
 "event_id"=>377601654}

Back to example payloads

statement_settled payload

{"site"=>{"id"=>31615, "subdomain"=>"general-goods"},
 "subscription"=>{"id"=>16372192, "state"=>"active", "balance_in_cents"=>0},
 "customer"=>
  {"id"=>15826583,
   "first_name"=>"Doris",
   "last_name"=>"Tester",
   "reference"=>"123456789",
   "organization"=>"Acme",
   "address"=>"123 Anywhere Street",
   "address_2"=>"",
   "city"=>"Boston",
   "state"=>"MA",
   "zip"=>"02120",
   "country"=>"US",
   "email"=>"doris@example.com",
   "phone"=>"555-555-1212"},
 "statement"=>
  {"closed_at"=>Mon, 13 Feb 2017 13:28:06 EST -05:00,
   "created_at"=>Mon, 13 Feb 2017 13:15:22 EST -05:00,
   "id"=>85705040,
   "opened_at"=>Mon, 13 Feb 2017 11:50:58 EST -05:00,
   "settled_at"=>Mon, 13 Feb 2017 13:33:13 EST -05:00,
   "subscription_id"=>16372192,
   "updated_at"=>Mon, 13 Feb 2017 13:33:13 EST -05:00,
   "starting_balance_in_cents"=>0,
   "ending_balance_in_cents"=>16000,
   "total_in_cents"=>16000,
   "memo"=>"We thank you for your continued business!",
   "events"=>
    {"0"=>
      {"id"=>377601643,
       "key"=>"billing_date_change",
       "message"=>
        "Billing date changed on Doris Tester's subscription to Gold Product from 03/13/2017 to 02/13/2017"},
     "1"=>
      {"id"=>377601650,
       "key"=>"subscription_state_change",
       "message"=>
        "State changed on Doris Tester's subscription to Gold Product from active to past_due"},
     "2"=>
      {"id"=>377601653,
       "key"=>"renewal_failure",
       "message"=>
        "Failed renewal for Doris Tester's subscription to Gold Product"}},
   "transactions"=>
    {"0"=>
      {"id"=>173970824,
       "subscription_id"=>16372192,
       "type"=>"Adjustment",
       "kind"=>nil,
       "transaction_type"=>"adjustment",
       "success"=>true,
       "amount_in_cents"=>10000,
       "memo"=>"100",
       "created_at"=>Mon, 13 Feb 2017 13:15:22 EST -05:00,
       "starting_balance_in_cents"=>0,
       "ending_balance_in_cents"=>10000,
       "gateway_used"=>nil,
       "gateway_transaction_id"=>nil,
       "gateway_order_id"=>nil,
       "payment_id"=>nil,
       "product_id"=>4442358,
       "tax_id"=>nil,
       "component_id"=>nil,
       "statement_id"=>85705040,
       "customer_id"=>15826583},
     "1"=>
      {"id"=>173972839,
       "subscription_id"=>16372192,
       "type"=>"Charge",
       "kind"=>"baseline",
       "transaction_type"=>"charge",
       "success"=>true,
       "amount_in_cents"=>5000,
       "memo"=>"Gold Product (02/13/2017 - 03/13/2017)",
       "created_at"=>Mon, 13 Feb 2017 13:28:06 EST -05:00,
       "starting_balance_in_cents"=>10000,
       "ending_balance_in_cents"=>15000,
       "gateway_used"=>nil,
       "gateway_transaction_id"=>nil,
       "gateway_order_id"=>nil,
       "payment_id"=>173973102,
       "product_id"=>4442358,
       "tax_id"=>nil,
       "component_id"=>nil,
       "statement_id"=>85705040,
       "customer_id"=>15826583,
       "original_amount_in_cents"=>nil,
       "discount_amount_in_cents"=>nil,
       "taxable_amount_in_cents"=>nil,
       "taxations"=>{}},
     "2"=>
      {"id"=>173972840,
       "subscription_id"=>16372192,
       "type"=>"Charge",
       "kind"=>"quantity_based_component",
       "transaction_type"=>"charge",
       "success"=>true,
       "amount_in_cents"=>1000,
       "memo"=>"Quantity Component: 10 Quantity Components",
       "created_at"=>Mon, 13 Feb 2017 13:28:06 EST -05:00,
       "starting_balance_in_cents"=>15000,
       "ending_balance_in_cents"=>16000,
       "gateway_used"=>nil,
       "gateway_transaction_id"=>nil,
       "gateway_order_id"=>nil,
       "payment_id"=>173973102,
       "product_id"=>4442358,
       "tax_id"=>nil,
       "component_id"=>375250,
       "statement_id"=>85705040,
       "customer_id"=>15826583,
       "original_amount_in_cents"=>nil,
       "discount_amount_in_cents"=>nil,
       "taxable_amount_in_cents"=>nil,
       "taxations"=>{}},
     "3"=>
      {"id"=>173972841,
       "subscription_id"=>16372192,
       "type"=>"InfoTransaction",
       "kind"=>nil,
       "transaction_type"=>"info",
       "success"=>false,
       "amount_in_cents"=>0,
       "memo"=>"No credit card was on file for the $160.00 balance",
       "created_at"=>Mon, 13 Feb 2017 13:28:06 EST -05:00,
       "starting_balance_in_cents"=>16000,
       "ending_balance_in_cents"=>16000,
       "gateway_used"=>nil,
       "gateway_transaction_id"=>nil,
       "gateway_order_id"=>nil,
       "payment_id"=>nil,
       "product_id"=>4442358,
       "tax_id"=>nil,
       "component_id"=>nil,
       "statement_id"=>85705040,
       "customer_id"=>15826583}},
   "future_payments"=>
    {"0"=>
      {"id"=>173973102,
       "subscription_id"=>16372192,
       "type"=>"Payment",
       "kind"=>nil,
       "transaction_type"=>"payment",
       "success"=>true,
       "amount_in_cents"=>16000,
       "memo"=>"Doris Tester - Gold Product: Renewal payment",
       "created_at"=>Mon, 13 Feb 2017 13:33:13 EST -05:00,
       "starting_balance_in_cents"=>16000,
       "ending_balance_in_cents"=>0,
       "gateway_used"=>"bogus",
       "gateway_transaction_id"=>"53433",
       "gateway_order_id"=>nil,
       "payment_id"=>nil,
       "product_id"=>4442358,
       "tax_id"=>nil,
       "component_id"=>nil,
       "statement_id"=>85706001,
       "customer_id"=>15826583,
       "card_number"=>"XXXX-XXXX-XXXX-1111",
       "card_expiration"=>"02/2018",
       "card_type"=>"visa",
       "refunded_amount_in_cents"=>0}}},
 "product"=>{"id"=>4442358, "name"=>"Gold Product"},
 "product_family"=>{"id"=>986840, "name"=>"Acme Products"},
 "payment_profile"=>
  {"id"=>10914352,
   "first_name"=>"Doris",
   "last_name"=>"Tester",
   "billing_address"=>"",
   "billing_address_2"=>"",
   "billing_city"=>"",
   "billing_country"=>"",
   "billing_state"=>"",
   "billing_zip"=>""},
 "event_id"=>377602845}

Back to example payloads

subscription_card_update payload

{"site"=>{"id"=>31615, "subdomain"=>"general-goods"},
 "subscription"=>{"id"=>16372192, "state"=>"active", "balance_in_cents"=>0},
 "product"=>
  {"id"=>4442358,
   "name"=>"Gold Product",
   "product_family_id"=>986840,
   "product_family_name"=>"Acme Products"},
 "customer"=>
  {"id"=>15826583,
   "first_name"=>"Doris",
   "last_name"=>"Tester",
   "reference"=>"123456789",
   "organization"=>"Acme",
   "email"=>"doris@example.com"},
 "previous_payment_profile"=>{},
 "updated_payment_profile"=>
  {"id"=>10914352,
   "first_name"=>"Doris",
   "last_name"=>"Tester",
   "masked_card_number"=>"XXXX-XXXX-XXXX-1111",
   "card_type"=>"visa",
   "expiration_month"=>2,
   "expiration_year"=>2018,
   "current_vault"=>"bogus",
   "vault_token"=>"1",
   "customer_vault_token"=>nil,
   "billing_address"=>"",
   "billing_address_2"=>"",
   "billing_city"=>"",
   "billing_state"=>"",
   "billing_zip"=>"",
   "billing_country"=>""},
 "event_id"=>377602844}

Back to example payloads

subscription_product_change payload

{"subscription"=>
  {"id"=>16372192,
   "state"=>"active",
   "trial_started_at"=>nil,
   "trial_ended_at"=>nil,
   "activated_at"=>Mon, 13 Feb 2017 11:50:57 EST -05:00,
   "created_at"=>Mon, 13 Feb 2017 11:50:55 EST -05:00,
   "updated_at"=>Mon, 13 Feb 2017 13:40:29 EST -05:00,
   "expires_at"=>nil,
   "balance_in_cents"=>0,
   "current_period_ends_at"=>Thu, 13 Apr 2017 14:28:00 EDT -04:00,
   "next_assessment_at"=>Thu, 13 Apr 2017 14:28:00 EDT -04:00,
   "canceled_at"=>nil,
   "cancellation_message"=>nil,
   "next_product_id"=>nil,
   "cancel_at_end_of_period"=>false,
   "payment_collection_method"=>"automatic",
   "snap_day"=>nil,
   "cancellation_method"=>nil,
   "current_period_started_at"=>Mon, 13 Feb 2017 13:28:05 EST -05:00,
   "previous_state"=>"active",
   "signup_payment_id"=>173961106,
   "signup_revenue"=>"60.00",
   "delayed_cancel_at"=>nil,
   "coupon_code"=>nil,
   "total_revenue_in_cents"=>22000,
   "product_price_in_cents"=>4900,
   "product_version_number"=>1,
   "payment_type"=>"credit_card",
   "referral_code"=>"cz8wdq",
   "coupon_use_count"=>nil,
   "coupon_uses_allowed"=>nil,
   "customer"=>
    {"id"=>15826583,
     "first_name"=>"Doris",
     "last_name"=>"Tester",
     "organization"=>"Acme",
     "email"=>"doris@example.com",
     "created_at"=>Mon, 13 Feb 2017 11:50:55 EST -05:00,
     "updated_at"=>Mon, 13 Feb 2017 11:50:58 EST -05:00,
     "reference"=>"123456789",
     "address"=>"123 Anywhere Street",
     "address_2"=>"",
     "city"=>"Boston",
     "state"=>"MA",
     "zip"=>"02120",
     "country"=>"US",
     "phone"=>"555-555-1212",
     "portal_invite_last_sent_at"=>Mon, 13 Feb 2017 11:50:58 EST -05:00,
     "portal_invite_last_accepted_at"=>nil,
     "vat_number"=>"123456789"
     "verified"=>nil,
     "portal_customer_created_at"=>Mon, 13 Feb 2017 11:50:58 EST -05:00,
     "vat_number"=>"123456789"
     "cc_emails"=>nil,
     "tax_exempt"=>false},
   "product"=>
    {"id"=>4443536,
     "name"=>"Business Monthly",
     "handle"=>"pd_plans_v2_business_mn_1_10",
     "description"=>"Business Monthly",
     "accounting_code"=>"",
     "request_credit_card"=>true,
     "expiration_interval"=>nil,
     "expiration_interval_unit"=>"never",
     "created_at"=>Mon, 19 Dec 2016 15:58:09 EST -05:00,
     "updated_at"=>Mon, 19 Dec 2016 15:58:09 EST -05:00,
     "price_in_cents"=>4900,
     "interval"=>1,
     "interval_unit"=>"month",
     "initial_charge_in_cents"=>nil,
     "trial_price_in_cents"=>0,
     "trial_interval"=>1,
     "trial_interval_unit"=>"day",
     "archived_at"=>nil,
     "require_credit_card"=>false,
     "return_params"=>"",
     "taxable"=>false,
     "update_return_url"=>"http://www.example.com",
     "initial_charge_after_trial"=>false,
     "version_number"=>1,
     "update_return_params"=>"id={subscription_id}&ref={customer_reference}",
     "product_family"=>
      {"id"=>986840,
       "name"=>"Acme Products",
       "description"=>"",
       "handle"=>"acme-products",
       "accounting_code"=>nil},
     "public_signup_pages"=>
      [{"id"=>306548,
        "return_url"=>"",
        "return_params"=>"",
        "url"=>
         "https://general-goods.chargifypay.com/subscribe/jtvkftj84jsq/pd_plans_v2_business_mn_1_10"}]},
   "credit_card"=>
    {"id"=>10914352,
     "first_name"=>"Doris",
     "last_name"=>"Tester",
     "masked_card_number"=>"XXXX-XXXX-XXXX-1111",
     "card_type"=>"visa",
     "expiration_month"=>2,
     "expiration_year"=>2018,
     "customer_id"=>15826583,
     "current_vault"=>"bogus",
     "vault_token"=>"1",
     "billing_address"=>"",
     "billing_city"=>"",
     "billing_state"=>"",
     "billing_zip"=>"",
     "billing_country"=>"",
     "customer_vault_token"=>nil,
     "billing_address_2"=>"",
     "payment_type"=>"credit_card"}},
 "previous_product"=>
  {"id"=>4442358,
   "name"=>"Gold Product",
   "handle"=>"gold-product",
   "description"=>"",
   "accounting_code"=>"",
   "request_credit_card"=>true,
   "expiration_interval"=>nil,
   "expiration_interval_unit"=>"never",
   "created_at"=>Thu, 15 Dec 2016 09:32:36 EST -05:00,
   "updated_at"=>Thu, 15 Dec 2016 09:32:36 EST -05:00,
   "price_in_cents"=>5000,
   "interval"=>1,
   "interval_unit"=>"month",
   "initial_charge_in_cents"=>nil,
   "trial_price_in_cents"=>nil,
   "trial_interval"=>nil,
   "trial_interval_unit"=>"month",
   "archived_at"=>nil,
   "require_credit_card"=>true,
   "return_params"=>"",
   "taxable"=>false,
   "update_return_url"=>"http://www.example.com",
   "initial_charge_after_trial"=>false,
   "version_number"=>1,
   "update_return_params"=>"id={subscription_id}&ref={customer_reference}",
   "product_family"=>
    {"id"=>986840,
     "name"=>"Acme Products",
     "description"=>"",
     "handle"=>"acme-products",
     "accounting_code"=>nil},
   "public_signup_pages"=>
    [{"id"=>306012,
      "return_url"=>"",
      "return_params"=>"",
      "url"=>
       "https://general-goods.chargifypay.com/subscribe/7dbsnjd8t8cx/gold-product"},
     {"id"=>310598,
      "return_url"=>"",
      "return_params"=>"",
      "url"=>
       "https://general-goods.chargifypay.com/subscribe/ksjh9py5fn5h/gold-product"},
     {"id"=>311132,
      "return_url"=>"",
      "return_params"=>"",
      "url"=>
       "https://general-goods.chargifypay.com/subscribe/kjmks49g8d3d/gold-product"}]},
 "site"=>{"id"=>31615, "subdomain"=>"general-goods"},
 "event_id"=>377604632}

Back to example payloads

subscription_state_change payload

{"subscription"=>
  {"id"=>16372192,
   "state"=>"active",
   "trial_started_at"=>nil,
   "trial_ended_at"=>nil,
   "activated_at"=>Mon, 13 Feb 2017 11:50:57 EST -05:00,
   "created_at"=>Mon, 13 Feb 2017 11:50:55 EST -05:00,
   "updated_at"=>Mon, 13 Feb 2017 13:33:14 EST -05:00,
   "expires_at"=>nil,
   "balance_in_cents"=>16000,
   "current_period_ends_at"=>Mon, 13 Mar 2017 14:28:05 EDT -04:00,
   "next_assessment_at"=>Tue, 14 Feb 2017 13:28:06 EST -05:00,
   "canceled_at"=>nil,
   "cancellation_message"=>nil,
   "next_product_id"=>nil,
   "cancel_at_end_of_period"=>false,
   "payment_collection_method"=>"automatic",
   "snap_day"=>nil,
   "cancellation_method"=>nil,
   "current_period_started_at"=>Mon, 13 Feb 2017 13:28:05 EST -05:00,
   "previous_state"=>"past_due",
   "signup_payment_id"=>173961106,
   "signup_revenue"=>"60.00",
   "delayed_cancel_at"=>nil,
   "coupon_code"=>nil,
   "total_revenue_in_cents"=>6000,
   "product_price_in_cents"=>5000,
   "product_version_number"=>1,
   "payment_type"=>"credit_card",
   "referral_code"=>"cz8wdq",
   "coupon_use_count"=>nil,
   "coupon_uses_allowed"=>nil,
   "customer"=>
    {"id"=>15826583,
     "first_name"=>"Doris",
     "last_name"=>"Tester",
     "organization"=>"Acme",
     "email"=>"doris@example.com",
     "created_at"=>Mon, 13 Feb 2017 11:50:55 EST -05:00,
     "updated_at"=>Mon, 13 Feb 2017 11:50:58 EST -05:00,
     "reference"=>"123456789",
     "address"=>"123 Anywhere Street",
     "address_2"=>"",
     "city"=>"Boston",
     "state"=>"MA",
     "zip"=>"02120",
     "country"=>"US",
     "phone"=>"555-555-1212",
     "portal_invite_last_sent_at"=>Mon, 13 Feb 2017 11:50:58 EST -05:00,
     "portal_invite_last_accepted_at"=>nil,
     "vat_number"=>"123456789"
     "verified"=>nil,
     "portal_customer_created_at"=>Mon, 13 Feb 2017 11:50:58 EST -05:00,
     "vat_number"=>"123456789"
     "cc_emails"=>nil,
     "tax_exempt"=>false},
   "product"=>
    {"id"=>4442358,
     "name"=>"Gold Product",
     "handle"=>"gold-product",
     "description"=>"",
     "accounting_code"=>"",
     "request_credit_card"=>true,
     "expiration_interval"=>nil,
     "expiration_interval_unit"=>"never",
     "created_at"=>Thu, 15 Dec 2016 09:32:36 EST -05:00,
     "updated_at"=>Thu, 15 Dec 2016 09:32:36 EST -05:00,
     "price_in_cents"=>5000,
     "interval"=>1,
     "interval_unit"=>"month",
     "initial_charge_in_cents"=>nil,
     "trial_price_in_cents"=>nil,
     "trial_interval"=>nil,
     "trial_interval_unit"=>"month",
     "archived_at"=>nil,
     "require_credit_card"=>true,
     "return_params"=>"",
     "taxable"=>false,
     "update_return_url"=>"http://www.example.com",
     "initial_charge_after_trial"=>false,
     "version_number"=>1,
     "update_return_params"=>"id={subscription_id}&ref={customer_reference}",
     "product_family"=>
      {"id"=>986840,
       "name"=>"Acme Products",
       "description"=>"",
       "handle"=>"acme-products",
       "accounting_code"=>nil},
     "public_signup_pages"=>
      [{"id"=>306012,
        "return_url"=>"",
        "return_params"=>"",
        "url"=>
         "https://general-goods.chargifypay.com/subscribe/7dbsnjd8t8cx/gold-product"},
       {"id"=>310598,
        "return_url"=>"",
        "return_params"=>"",
        "url"=>
         "https://general-goods.chargifypay.com/subscribe/ksjh9py5fn5h/gold-product"},
       {"id"=>311132,
        "return_url"=>"",
        "return_params"=>"",
        "url"=>
         "https://general-goods.chargifypay.com/subscribe/kjmks49g8d3d/gold-product"}]},
   "credit_card"=>
    {"id"=>10914352,
     "first_name"=>"Doris",
     "last_name"=>"Tester",
     "masked_card_number"=>"XXXX-XXXX-XXXX-1111",
     "card_type"=>"visa",
     "expiration_month"=>2,
     "expiration_year"=>2018,
     "customer_id"=>15826583,
     "current_vault"=>"bogus",
     "vault_token"=>"1",
     "billing_address"=>"",
     "billing_city"=>"",
     "billing_state"=>"",
     "billing_zip"=>"",
     "billing_country"=>"",
     "customer_vault_token"=>nil,
     "billing_address_2"=>"",
     "payment_type"=>"credit_card"}},
 "site"=>{"id"=>31615, "subdomain"=>"general-goods"},
 "event_id"=>377602840}

Back to example payloads

trial_end_notice payload

{"site"=>{"id"=>12345, "subdomain"=>"general-goods"},
 "customer"=>
  {"id"=>16609933,
   "first_name"=>"Chester",
   "last_name"=>"Tester",
   "reference"=>"4363421",
   "organization"=>nil,
   "email"=>"chester.tester@example.com"},
 "email_sent"=>false,
 "estimated_renewal_amount_in_cents"=>2995,
 "message"=>
  "End of trial for trial ending on 03/23/2017 for Chester Tester's subscription to Monthly Plan",
 "payment_profile"=>
  {"id"=>12345678,
   "first_name"=>"Chester",
   "last_name"=>"Tester",
   "card_type"=>"master",
   "masked_card_number"=>"XXXX-XXXX-XXXX-6404",
   "expiration_month"=>10,
   "expiration_year"=>2019},
 "product"=>
  {"id"=>3768589,
   "name"=>"Monthly Plan",
   "product_family_id"=>453572,
   "product_family_name"=>"Forms"},
 "subscription"=>
  {"id"=>17127660,
   "state"=>"trialing",
   "current_period_ends_at"=>Thu, 23 Mar 2017 13:58:14 EDT -04:00},
 "event_id"=>390281866}

Back to example payloads

upcoming_renewal_notice payload

{
    "site" => {
        "id" => 31615, "subdomain" => "general-goods"
    },
    "customer" => {
        "id" => 15146757,
        "first_name" => "Katharine",
        "last_name" => "Ross",
        "reference" => nil,
        "organization" => "",
        "email" => "kross@example.com"
    },
    "email_sent" => true,
    "estimated_renewal_amount_in_cents" => 5000,
    "message" =>
    "Upcoming renewal notice sent for period ending on 02/20/2017 for Katharine Ross's subscription to Gold Product",
    "payment_profile" => {
        "id" => 10485399,
        "first_name" => "Katharine",
        "last_name" => "Ross",
        "card_type" => "bogus",
        "masked_card_number" => "XXXX-XXXX-XXXX-1",
        "expiration_month" => 1,
        "expiration_year" => 2026
    },
    "product" => {
        "id" => 4442358,
        "name" => "Gold Product",
        "product_family_id" => 986840,
        "product_family_name" => "Acme Products"
    },
    "subscription" => {
        "id" => 15690494,
        "state" => "active",
        "current_period_ends_at" => Mon, 20 Feb 2017 12: 00: 00 EST - 05: 00
    },
    "event_id" => 378968302
}

Back to example payloads

upgrade_downgrade_failure payload

{"subscription"=>
  {"id"=>16372192,
   "state"=>"active",
   "trial_started_at"=>nil,
   "trial_ended_at"=>nil,
   "activated_at"=>Mon, 13 Feb 2017 11:50:57 EST -05:00,
   "created_at"=>Mon, 13 Feb 2017 11:50:55 EST -05:00,
   "updated_at"=>Mon, 13 Feb 2017 14:59:39 EST -05:00,
   "expires_at"=>nil,
   "balance_in_cents"=>0,
   "current_period_ends_at"=>Fri, 17 Feb 2017 14:28:00 EST -05:00,
   "next_assessment_at"=>Fri, 17 Feb 2017 14:28:00 EST -05:00,
   "canceled_at"=>nil,
   "cancellation_message"=>nil,
   "next_product_id"=>nil,
   "cancel_at_end_of_period"=>false,
   "payment_collection_method"=>"automatic",
   "snap_day"=>nil,
   "cancellation_method"=>nil,
   "current_period_started_at"=>Mon, 13 Feb 2017 13:28:05 EST -05:00,
   "previous_state"=>"active",
   "signup_payment_id"=>173961106,
   "signup_revenue"=>"60.00",
   "delayed_cancel_at"=>nil,
   "coupon_code"=>nil,
   "total_revenue_in_cents"=>6000,
   "product_price_in_cents"=>4900,
   "product_version_number"=>1,
   "payment_type"=>nil,
   "referral_code"=>"cz8wdq",
   "coupon_use_count"=>nil,
   "coupon_uses_allowed"=>nil,
   "customer"=>
    {"id"=>15826583,
     "first_name"=>"Doris",
     "last_name"=>"Tester",
     "organization"=>"Acme",
     "email"=>"doristester@example.com",
     "created_at"=>Mon, 13 Feb 2017 11:50:55 EST -05:00,
     "updated_at"=>Mon, 13 Feb 2017 13:42:07 EST -05:00,
     "reference"=>"123456789",
     "address"=>"123 Anywhere Street",
     "address_2"=>"",
     "city"=>"Boston",
     "state"=>"MA",
     "zip"=>"02120",
     "country"=>"US",
     "phone"=>"555-555-1212",
     "portal_invite_last_sent_at"=>Mon, 13 Feb 2017 11:50:58 EST -05:00,
     "portal_invite_last_accepted_at"=>nil,
     "verified"=>false,
     "portal_customer_created_at"=>Mon, 13 Feb 2017 11:50:58 EST -05:00,
     "vat_number"=>"123456789"
     "cc_emails"=>"",
     "tax_exempt"=>false},
   "product"=>
    {"id"=>4443536,
     "name"=>"Business Monthly",
     "handle"=>"pd_plans_v2_business_mn_1_10",
     "description"=>"Business Monthly",
     "accounting_code"=>"",
     "request_credit_card"=>true,
     "expiration_interval"=>nil,
     "expiration_interval_unit"=>"never",
     "created_at"=>Mon, 19 Dec 2016 15:58:09 EST -05:00,
     "updated_at"=>Mon, 19 Dec 2016 15:58:09 EST -05:00,
     "price_in_cents"=>4900,
     "interval"=>1,
     "interval_unit"=>"month",
     "initial_charge_in_cents"=>nil,
     "trial_price_in_cents"=>0,
     "trial_interval"=>1,
     "trial_interval_unit"=>"day",
     "archived_at"=>nil,
     "require_credit_card"=>false,
     "return_params"=>"",
     "taxable"=>false,
     "update_return_url"=>"http://www.example.com",
     "initial_charge_after_trial"=>false,
     "version_number"=>1,
     "update_return_params"=>"id={subscription_id}&ref={customer_reference}",
     "product_family"=>
      {"id"=>986840,
       "name"=>"Acme Products",
       "description"=>"",
       "handle"=>"acme-products",
       "accounting_code"=>nil},
     "public_signup_pages"=>
      [{"id"=>306548,
        "return_url"=>"",
        "return_params"=>"",
        "url"=>
         "https://general-goods.chargifypay.com/subscribe/jtvkftj84jsq/pd_plans_v2_business_mn_1_10"}]}},
 "site"=>{"id"=>31615, "subdomain"=>"general-goods"},
 "target_product"=>
  {"id"=>4458204,
   "name"=>"Monthly product ",
   "handle"=>"monthly-product",
   "description"=>"",
   "accounting_code"=>"",
   "request_credit_card"=>true,
   "expiration_interval"=>nil,
   "expiration_interval_unit"=>"never",
   "created_at"=>Wed, 08 Feb 2017 16:48:54 EST -05:00,
   "updated_at"=>Wed, 08 Feb 2017 16:48:54 EST -05:00,
   "price_in_cents"=>6900,
   "interval"=>1,
   "interval_unit"=>"month",
   "initial_charge_in_cents"=>nil,
   "trial_price_in_cents"=>nil,
   "trial_interval"=>nil,
   "trial_interval_unit"=>"month",
   "archived_at"=>nil,
   "require_credit_card"=>true,
   "return_params"=>"",
   "taxable"=>false,
   "update_return_url"=>"http://www.example.com",
   "initial_charge_after_trial"=>false,
   "version_number"=>1,
   "update_return_params"=>"id={subscription_id}&ref={customer_reference}",
   "product_family"=>
    {"id"=>986840,
     "name"=>"Acme Products",
     "description"=>"",
     "handle"=>"acme-products",
     "accounting_code"=>nil},
   "public_signup_pages"=>
    [{"id"=>312067,
      "return_url"=>nil,
      "return_params"=>"",
      "url"=>
       "https://general-goods.chargifypay.com/subscribe/5x8sbq29vgkn/monthly-product"},
     {"id"=>312068,
      "return_url"=>"",
      "return_params"=>"",
      "url"=>
       "https://general-goods.chargifypay.com/subscribe/vsmzkwvmfqqx/monthly-product"}]},
 "event_id"=>377635953}

Back to example payloads

upgrade_downgrade_success payload

{"subscription"=>
  {"id"=>16297395,
   "state"=>"trialing",
   "trial_started_at"=>Mon, 13 Feb 2017 15:00:02 EST -05:00,
   "trial_ended_at"=>Tue, 14 Feb 2017 15:00:02 EST -05:00,
   "activated_at"=>Wed, 08 Feb 2017 16:23:22 EST -05:00,
   "created_at"=>Tue, 07 Feb 2017 16:06:06 EST -05:00,
   "updated_at"=>Mon, 13 Feb 2017 15:00:02 EST -05:00,
   "expires_at"=>nil,
   "balance_in_cents"=>177,
   "current_period_ends_at"=>Tue, 14 Feb 2017 15:00:02 EST -05:00,
   "next_assessment_at"=>Tue, 14 Feb 2017 15:00:02 EST -05:00,
   "canceled_at"=>nil,
   "cancellation_message"=>nil,
   "next_product_id"=>nil,
   "cancel_at_end_of_period"=>false,
   "payment_collection_method"=>"invoice",
   "snap_day"=>nil,
   "cancellation_method"=>nil,
   "current_period_started_at"=>Mon, 13 Feb 2017 15:00:01 EST -05:00,
   "previous_state"=>"active",
   "signup_payment_id"=>173249657,
   "signup_revenue"=>"0.00",
   "delayed_cancel_at"=>nil,
   "coupon_code"=>nil,
   "total_revenue_in_cents"=>0,
   "product_price_in_cents"=>4900,
   "product_version_number"=>1,
   "payment_type"=>"credit_card",
   "referral_code"=>"j63942",
   "coupon_use_count"=>nil,
   "coupon_uses_allowed"=>nil,
   "customer"=>
    {"id"=>15751842,
     "first_name"=>"Steve",
     "last_name"=>"Test",
     "organization"=>"",
     "email"=>"steve@example.com",
     "created_at"=>Tue, 07 Feb 2017 16:06:06 EST -05:00,
     "updated_at"=>Tue, 07 Feb 2017 16:06:10 EST -05:00,
     "reference"=>nil,
     "address"=>nil,
     "address_2"=>nil,
     "city"=>nil,
     "state"=>nil,
     "zip"=>nil,
     "country"=>nil,
     "phone"=>"",
     "portal_invite_last_sent_at"=>Tue, 07 Feb 2017 16:06:10 EST -05:00,
     "portal_invite_last_accepted_at"=>nil,
     "verified"=>false,
     "portal_customer_created_at"=>Tue, 07 Feb 2017 16:06:10 EST -05:00,
     "cc_emails"=>nil,
     "tax_exempt"=>false},
   "product"=>
    {"id"=>4443536,
     "name"=>"Business Monthly",
     "handle"=>"pd_plans_v2_business_mn_1_10",
     "description"=>"Business Monthly",
     "accounting_code"=>"",
     "request_credit_card"=>true,
     "expiration_interval"=>nil,
     "expiration_interval_unit"=>"never",
     "created_at"=>Mon, 19 Dec 2016 15:58:09 EST -05:00,
     "updated_at"=>Mon, 19 Dec 2016 15:58:09 EST -05:00,
     "price_in_cents"=>4900,
     "interval"=>1,
     "interval_unit"=>"month",
     "initial_charge_in_cents"=>nil,
     "trial_price_in_cents"=>0,
     "trial_interval"=>1,
     "trial_interval_unit"=>"day",
     "archived_at"=>nil,
     "require_credit_card"=>false,
     "return_params"=>"",
     "taxable"=>false,
     "update_return_url"=>"http://www.example.com",
     "initial_charge_after_trial"=>false,
     "version_number"=>1,
     "update_return_params"=>"id={subscription_id}&ref={customer_reference}",
     "product_family"=>
      {"id"=>986840,
       "name"=>"Acme Products",
       "description"=>"",
       "handle"=>"acme-products",
       "accounting_code"=>nil},
     "public_signup_pages"=>
      [{"id"=>306548,
        "return_url"=>"",
        "return_params"=>"",
        "url"=>
         "https://general-goods.chargifypay.com/subscribe/jtvkftj84jsq/pd_plans_v2_business_mn_1_10"}]},
   "credit_card"=>
    {"id"=>10865912,
     "first_name"=>"Steve",
     "last_name"=>"Test",
     "masked_card_number"=>"XXXX-XXXX-XXXX-1",
     "card_type"=>"bogus",
     "expiration_month"=>1,
     "expiration_year"=>2027,
     "customer_id"=>15751842,
     "current_vault"=>"bogus",
     "vault_token"=>"1",
     "billing_address"=>nil,
     "billing_city"=>nil,
     "billing_state"=>nil,
     "billing_zip"=>"",
     "billing_country"=>nil,
     "customer_vault_token"=>nil,
     "billing_address_2"=>nil,
     "payment_type"=>"credit_card"}},
 "site"=>{"id"=>31615, "subdomain"=>"general-goods"},
 "previous_product"=>
  {"id"=>4453830,
   "name"=>"Trial No obligation",
   "handle"=>"trial-no-obligation",
   "description"=>"",
   "accounting_code"=>"",
   "request_credit_card"=>true,
   "expiration_interval"=>nil,
   "expiration_interval_unit"=>"never",
   "created_at"=>Mon, 23 Jan 2017 09:53:23 EST -05:00,
   "updated_at"=>Thu, 26 Jan 2017 13:35:29 EST -05:00,
   "price_in_cents"=>1000,
   "interval"=>1,
   "interval_unit"=>"month",
   "initial_charge_in_cents"=>nil,
   "trial_price_in_cents"=>0,
   "trial_interval"=>1,
   "trial_interval_unit"=>"day",
   "archived_at"=>nil,
   "require_credit_card"=>false,
   "return_params"=>"",
   "taxable"=>false,
   "update_return_url"=>"http://www.example.com",
   "initial_charge_after_trial"=>false,
   "version_number"=>1,
   "update_return_params"=>"id={subscription_id}&ref={customer_reference}",
   "product_family"=>
    {"id"=>986840,
     "name"=>"Acme Products",
     "description"=>"",
     "handle"=>"acme-products",
     "accounting_code"=>nil},
   "public_signup_pages"=>
    [{"id"=>310559,
      "return_url"=>"",
      "return_params"=>"",
      "url"=>
       "https://general-goods.chargifypay.com/subscribe/ngbsvxv4hq7q/trial-no-obligation"}]},
 "event_id"=>377636059}

Back to example payloads