• Content

Webhooks

Configuration

Please see our webhooks documentation for more information.

Account Notifications

New Account

Sent when a new account is created.

<?xml version="1.0" encoding="UTF-8"?>
<new_account_notification>
  <account>
    <account_code>1</account_code>
    <username nil="true"></username>
    <email>verena@example.com</email>
    <first_name>Verena</first_name>
    <last_name>Example</last_name>
    <company_name nil="true"></company_name>
  </account>
</new_account_notification>

Updated Account

Sent when an account is updated. Specifically attributes in the account information, not the billing information, shipping addresses, or account acquisition. See the Update Account API call for a list of attributes.

<?xml version="1.0" encoding="UTF-8"?>
<updated_account_notification>
  <account>
    <account_code>1</account_code>
    <username nil="true"></username>
    <email>verena@example.com</email>
    <first_name>Verena</first_name>
    <last_name>Example</last_name>
    <company_name nil="true"></company_name>
  </account>
</updated_account_notification>

Closed Account

Sent when an account is closed.

<?xml version="1.0" encoding="UTF-8"?>
<canceled_account_notification>
  <account>
    <account_code>1</account_code>
    <username nil="true"></username>
    <email>verena@example.com</email>
    <first_name>Verena</first_name>
    <last_name>Example</last_name>
    <company_name nil="true"></company_name>
  </account>
</canceled_account_notification>

Updated Billing Information

Sent when billing information is successfully created with a credit card or updated with a credit card or token.

<?xml version="1.0" encoding="UTF-8"?>
<billing_info_updated_notification>
  <account>
    <account_code>1</account_code>
    <username nil="true"></username>
    <email>verena@example.com</email>
    <first_name>Verena</first_name>
    <last_name>Example</last_name>
    <company_name nil="true"></company_name>
  </account>
</billing_info_updated_notification>

Failed Billing Information Update

Sent when an existing account unsuccessfully tries to update the billing information.

<?xml version="1.0" encoding="UTF-8"?>
<billing_info_update_failed_notification>
  <account>
    <account_code>1</account_code>
    <username nil="true"></username>
    <email>verena@example.com</email>
    <first_name>Verena</first_name>
    <last_name>Example</last_name>
    <company_name nil="true"></company_name>
  </account>
</billing_info_update_failed_notification>

A new shipping address is created

<?xml version="1.0" encoding="UTF-8"?>
<new_shipping_address_notification>
  <account>
    <account_code>SamSmith</account_code>
    <username></username>
    <email></email>
    <first_name>Sam</first_name>
    <last_name>Smith</last_name>
    <company_name>Smith Co</company_name>
    <phone></phone>
  </account>
  <shipping_address>
    <id type="integer">2019760742762202549</id>
    <nickname>Steven</nickname>
    <first_name>Steven</first_name>
    <last_name>Smith</last_name>
    <company_name></company_name>
    <vat_number></vat_number>
    <street1>231 Oregon Street</street1>
    <street2></street2>
    <city>Portland</city>
    <state>OR</state>
    <zip>97201</zip>
    <country>US</country>
    <email>stevensmith@example.com</email>
    <phone></phone>
  </shipping_address>
</new_shipping_address_notification>

An existing shipping address is edited

<?xml version="1.0" encoding="UTF-8"?>
<updated_shipping_address_notification>
  <account>
    <account_code>SamSmith</account_code>
    <username></username>
    <email></email>
    <first_name>Sam</first_name>
    <last_name>Smith</last_name>
    <company_name>Smith Co</company_name>
    <phone></phone>
  </account>
  <shipping_address>
    <id type="integer">2019760742762202549</id>
    <nickname>Steven</nickname>
    <first_name>Steven</first_name>
    <last_name>Smith</last_name>
    <company_name></company_name>
    <vat_number></vat_number>
    <street1>231 Oregon Street</street1>
    <street2></street2>
    <city>Portland</city>
    <state>OR</state>
    <zip>97201</zip>
    <country>US</country>
    <email>stevensmith@example.com</email>
    <phone></phone>
  </shipping_address>
</updated_shipping_address_notification>

An existing shipping address is deleted

<?xml version="1.0" encoding="UTF-8"?>
<deleted_shipping_address_notification>
  <account>
    <account_code>SamSmith</account_code>
    <username></username>
    <email></email>
    <first_name>Sam</first_name>
    <last_name>Smith</last_name>
    <company_name>Smith Co</company_name>
    <phone></phone>
  </account>
  <shipping_address>
    <id type="integer">2019760742762202549</id>
    <nickname>Steven</nickname>
    <first_name>Steven</first_name>
    <last_name>Smith</last_name>
    <company_name></company_name>
    <vat_number></vat_number>
    <street1>231 Oregon Street</street1>
    <street2></street2>
    <city>Portland</city>
    <state>OR</state>
    <zip>97201</zip>
    <country>US</country>
    <email>stevensmith@example.com</email>
    <phone></phone>
  </shipping_address>
</deleted_shipping_address_notification>

Subscription Notifications

Subscriptions will return an array of add-ons if the subscription includes add-ons. If you have a plan on your site with a usage-based add-on, you will start seeing these additional add-on attributes when add-ons are returned:

  • add_on_type
  • usage_percentage
  • measured_unit_id

In addition, Subscription notifications will include information about shipping addresses when applicable:

  • id
  • nickname
  • first_name
  • last_name
  • company_name
  • vat_number
  • street1
  • street2
  • city
  • state
  • zip
  • country
  • email
  • phone

New Subscription

Sent when a new subscription is created.

<?xml version="1.0" encoding="UTF-8"?>
<new_subscription_notification>
  <account>
    <account_code>1</account_code>
    <username nil="true">verena</username>
    <email>verena@example.com</email>
    <first_name>Verena</first_name>
    <last_name>Example</last_name>
    <company_name nil="true">Company, Inc.</company_name>
  </account>
  <subscription>
    <plan>
      <plan_code>bronze</plan_code>
      <name>Bronze Plan</name>
    </plan>
    <uuid>8047cb4fd5f874b14d713d785436ebd3</uuid>
    <state>active</state>
    <quantity type="integer">2</quantity>
    <total_amount_in_cents type="integer">17000</total_amount_in_cents>
    <subscription_add_ons type="array">
      <subscription_add_on>
        <add_on_code>premium_support</add_on_code>
        <name>Premium Support</name>
        <quantity type="integer">1</quantity>
        <unit_amount_in_cents type="integer">15000</unit_amount_in_cents>
        <add_on_type>fixed</add_on_type>
        <usage_percentage nil="true"></usage_percentage>
        <measured_unit_id nil="true"></measured_unit_id>
      </subscription_add_on>
      <subscription_add_on>
        <add_on_code>email_blasts</add_on_code>
        <name>Email Blasts</name>
        <quantity type="integer">1</quantity>
        <unit_amount_in_cents type="integer">50</unit_amount_in_cents>
        <add_on_type>usage</add_on_type>
        <usage_percentage nil="true"></usage_percentage>
        <measured_unit_id type="integer">394681687402874853</measured_unit_id>
      </subscription_add_on>
      <subscription_add_on>
        <add_on_code>donations</add_on_code>
        <name>Donations</name>
        <quantity type="integer">1</quantity>
        <unit_amount_in_cents nil="true"></unit_amount_in_cents>
        <add_on_type>usage</add_on_type>
        <usage_percentage>0.6</usage_percentage>
        <measured_unit_id type="integer">394681920153192422</measured_unit_id>
      </subscription_add_on>
    </subscription_add_ons>
    <activated_at type="datetime">2009-11-22T13:10:38Z</activated_at>
    <canceled_at type="datetime"></canceled_at>
    <expires_at type="datetime"></expires_at>
    <current_period_started_at type="datetime">2009-11-22T13:10:38Z</current_period_started_at>
    <current_period_ends_at type="datetime">2009-11-29T13:10:38Z</current_period_ends_at>
    <trial_started_at type="datetime">2009-11-22T13:10:38Z</trial_started_at>
    <trial_ends_at type="datetime">2009-11-29T13:10:38Z</trial_ends_at>
    <collection_method>automatic</collection_method>
  </subscription>
</new_subscription_notification>

Updated Subscription

When a subscription is upgraded or downgraded, Recurly will send an updated_subscription_notification. The notification is sent after the modification is performed. If you modify a subscription and it takes place immediately, the notification will also be sent immediately. If the subscription change takes effect at renewal, then the notification will be sent when the subscription renews. Therefore, if you receive an updated_subscription_notification, it contains the latest subscription information.

<?xml version="1.0" encoding="UTF-8"?>
<updated_subscription_notification>
  <account>
    <account_code>1</account_code>
    <username nil="true"></username>
    <email>verena@example.com</email>
    <first_name>Verena</first_name>
    <last_name>Example</last_name>
    <company_name nil="true"></company_name>
  </account>
  <subscription>
    <plan>
      <plan_code>1dpt</plan_code>
      <name>Subscription One</name>
    </plan>
    <uuid>292332928954ca62fa48048be5ac98ec</uuid>
    <state>active</state>
    <quantity type="integer">1</quantity>
    <total_amount_in_cents type="integer">200</total_amount_in_cents>
    <subscription_add_ons type="array"/>
    <activated_at type="datetime">2010-09-23T22:12:39Z</activated_at>
    <canceled_at nil="true" type="datetime"></canceled_at>
    <expires_at nil="true" type="datetime"></expires_at>
    <current_period_started_at type="datetime">2010-09-23T22:03:30Z</current_period_started_at>
    <current_period_ends_at type="datetime">2010-09-24T22:03:30Z</current_period_ends_at>
    <trial_started_at nil="true" type="datetime">
    </trial_started_at>
    <trial_ends_at nil="true" type="datetime">
    </trial_ends_at>
  </subscription>
</updated_subscription_notification>

Canceled Subscription

The canceled_subscription_notification is sent when a subscription is canceled. This means the subscription will not renew. The subscription state is set to canceled but the subscription is still valid until the expires_at date. The next notification is sent when the subscription is completely terminated.

<?xml version="1.0" encoding="UTF-8"?>
<canceled_subscription_notification>
  <account>
    <account_code>1</account_code>
    <username nil="true"></username>
    <email>verena@example.com</email>
    <first_name>Verena</first_name>
    <last_name>Example</last_name>
    <company_name nil="true"></company_name>
  </account>
  <subscription>
    <plan>
      <plan_code>1dpt</plan_code>
      <name>Subscription One</name>
    </plan>
    <uuid>dccd742f4710e78515714d275839f891</uuid>
    <state>canceled</state>
    <quantity type="integer">1</quantity>
    <total_amount_in_cents type="integer">200</total_amount_in_cents>
    <subscription_add_ons type="array"/>
    <activated_at type="datetime">2010-09-23T22:05:03Z</activated_at>
    <canceled_at type="datetime">2010-09-23T22:05:43Z</canceled_at>
    <expires_at type="datetime">2010-09-24T22:05:03Z</expires_at>
    <current_period_started_at type="datetime">2010-09-23T22:05:03Z</current_period_started_at>
    <current_period_ends_at type="datetime">2010-09-24T22:05:03Z</current_period_ends_at>
    <trial_started_at nil="true" type="datetime"></trial_started_at>
    <trial_ends_at nil="true" type="datetime"></trial_ends_at>
  </subscription>
</canceled_subscription_notification>

Expired Subscription

The expired_subscription_notification is sent when a subscription is no longer valid. This can happen if a canceled subscription expires or if an active subscription is refunded (and terminated immediately). If you receive this message, the account no longer has a subscription.

<?xml version="1.0" encoding="UTF-8"?>
<expired_subscription_notification>
  <account>
    <account_code>1</account_code>
    <username nil="true"></username>
    <email>verena@example.com</email>
    <first_name>Verena</first_name>
    <last_name>Example</last_name>
    <company_name nil="true"></company_name>
  </account>
  <subscription>
    <plan>
      <plan_code>1dpt</plan_code>
      <name>Subscription One</name>
    </plan>
    <uuid>d1b6d359a01ded71caed78eaa0fedf8e</uuid>
    <state>expired</state>
    <quantity type="integer">1</quantity>
    <total_amount_in_cents type="integer">200</total_amount_in_cents>
    <subscription_add_ons type="array"/>
    <activated_at type="datetime">2010-09-23T22:05:03Z</activated_at>
    <canceled_at type="datetime">2010-09-23T22:05:43Z</canceled_at>
    <expires_at type="datetime">2010-09-24T22:05:03Z</expires_at>
    <current_period_started_at type="datetime">2010-09-23T22:05:03Z</current_period_started_at>
    <current_period_ends_at type="datetime">2010-09-24T22:05:03Z</current_period_ends_at>
    <trial_started_at nil="true" type="datetime">
    </trial_started_at><trial_ends_at nil="true" type="datetime"></trial_ends_at>
  </subscription>
</expired_subscription_notification>

Renewed Subscription

The renewed_subscription_notification is sent whenever a subscription renews. This notification is sent regardless of a successful payment being applied to the subscription—it indicates the previous term is over and the subscription is now in a new term. If you are performing metered or usage-based billing, use this notification to reset your usage stats for the current billing term.

<?xml version="1.0" encoding="UTF-8"?>
<renewed_subscription_notification>
  <account>
    <account_code>1</account_code>
    <username nil="true"></username>
    <email>verena@example.com</email>
    <first_name>Verena</first_name>
    <last_name>Example</last_name>
    <company_name nil="true"></company_name>
  </account>
  <subscription>
    <plan>
      <plan_code>bootstrap</plan_code>
      <name>Bootstrap</name>
    </plan>
    <uuid>6ab458a887d38070807ebb3bed7ac1e5</uuid>
    <state>active</state>
    <quantity type="integer">1</quantity>
    <total_amount_in_cents type="integer">9900</total_amount_in_cents>
    <subscription_add_ons type="array"/>
    <activated_at type="datetime">2010-07-22T20:42:05Z</activated_at>
    <canceled_at nil="true" type="datetime"></canceled_at>
    <expires_at nil="true" type="datetime"></expires_at>
    <current_period_started_at type="datetime">2010-09-22T20:42:05Z</current_period_started_at>
    <current_period_ends_at type="datetime">2010-10-22T20:42:05Z</current_period_ends_at>
    <trial_started_at nil="true" type="datetime"></trial_started_at>
    <trial_ends_at nil="true" type="datetime"></trial_ends_at>

  </subscription>
</renewed_subscription_notification>

Reactivated Subscription

Sent when a subscription is reactivated after having been canceled. Note that while the webhooks is called the “reactivated_account_notification” this is actually sent when a subscription is reactivated.

<?xml version="1.0" encoding="UTF-8"?>
<reactivated_account_notification>
  <account>
    <account_code>1</account_code>
    <username nil="true"></username>
    <email>verena@example.com</email>
    <first_name>Verena</first_name>
    <last_name>Example</last_name>
    <company_name nil="true"></company_name>
  </account>
  <subscription>
    <plan>
      <plan_code>bootstrap</plan_code>
      <name>Bootstrap</name>
    </plan>
    <uuid>6ab458a887d38070807ebb3bed7ac1e5</uuid>
    <state>active</state>
    <quantity type="integer">1</quantity>
    <total_amount_in_cents type="integer">9900</total_amount_in_cents>
    <subscription_add_ons type="array"/>
    <activated_at type="datetime">2010-07-22T20:42:05Z</activated_at>
    <canceled_at nil="true" type="datetime"></canceled_at>
    <expires_at nil="true" type="datetime"></expires_at>
    <current_period_started_at type="datetime">2010-09-22T20:42:05Z</current_period_started_at>
    <current_period_ends_at type="datetime">2010-10-22T20:42:05Z</current_period_ends_at>
    <trial_started_at nil="true" type="datetime"></trial_started_at>
    <trial_ends_at nil="true" type="datetime"></trial_ends_at>
  </subscription>
</reactivated_account_notification>

Paused Subscription

The subscription_paused webhook is sent when a subscription moves from state of active to paused, meaning that the subscription is now paused. This webhook will be available when this feature is released in late April 2018.

<?xml version="1.0" encoding="UTF-8"?>
<subscription_paused_notification>
  <account>
    <account_code>1</account_code>
    <username>test-user</username>
    <email>test+2605@recurly.com</email>
    <first_name>test</first_name>
    <last_name>test-last</last_name>
    <company_name>Recurly, Inc.</company_name>
    <phone>555-1212</phone>
  </account>
  <subscription>
    <plan>
      <plan_code>daily_plan</plan_code>
      <name>daily_plan</name>
    </plan>
    <uuid>437a818b9dba81065e444448de931842</uuid>
    <state>paused</state>
    <quantity type="integer">10</quantity>
    <total_amount_in_cents type="integer">10000</total_amount_in_cents>
    <subscription_add_ons type="array"/>
    <activated_at type="datetime">2018-03-09T17:01:59Z</activated_at>
    <canceled_at type="datetime" nil="true"></canceled_at>
    <expires_at type="datetime" nil="true"></expires_at>
    <current_period_started_at type="datetime">2018-03-10T22:12:08Z</current_period_started_at>
    <current_period_ends_at type="datetime">2018-03-11T22:12:08Z</current_period_ends_at>
    <trial_started_at type="datetime" nil="true"></trial_started_at>
    <trial_ends_at type="datetime" nil="true"></trial_ends_at>
    <paused_at type="datetime">2018-03-10T22:12:08Z</paused_at>
    <resume_at type="datetime">2018-03-20T22:12:08Z</resume_at>
    <remaining_pause_cycles type="integer">9</remaining_pause_cycles>
  </subscription>
</subscription_paused_notification>

Resumed Subscription

The subscription_resumed webhook is sent when a subscription moves from state of paused to active, meaning that the subscription is successfully renewed and a new billing cycle has started. This webhook will be available when this feature is released in late April 2018.

<?xml version="1.0" encoding="UTF-8"?>
<subscription_resumed_notification>
  <account>
    <account_code>1</account_code>
    <username>test-user</username>
    <email>test+2605@recurly.com</email>
    <first_name>test</first_name>
    <last_name>test-last</last_name>
    <company_name>Recurly, Inc.</company_name>
    <phone>555-1212</phone>
  </account>
  <subscription>
    <plan>
      <plan_code>daily_plan</plan_code>
      <name>daily_plan</name>
    </plan>
    <uuid>437a818b9dba81065e444448de931842</uuid>
    <state>active</state>
    <quantity type="integer">10</quantity>
    <total_amount_in_cents type="integer">10000</total_amount_in_cents>
    <subscription_add_ons type="array"/>
    <activated_at type="datetime">2018-03-09T17:01:59Z</activated_at>
    <canceled_at type="datetime" nil="true"></canceled_at>
    <expires_at type="datetime" nil="true"></expires_at>
    <current_period_started_at type="datetime">2018-03-20T17:50:27Z</current_period_started_at>
    <current_period_ends_at type="datetime">2018-03-21T17:50:27Z</current_period_ends_at>
    <trial_started_at type="datetime" nil="true"></trial_started_at>
    <trial_ends_at type="datetime" nil="true"></trial_ends_at>
    <paused_at type="datetime" nil="true"></paused_at>
    <resume_at type="datetime" nil="true"></resume_at>
    <remaining_pause_cycles nil="true"></remaining_pause_cycles>
  </subscription>
</subscription_resumed_notification>

Scheduled Subscription Pause

The scheduled_subscription_pause webhook is sent when an active and eligible subscription is scheduled to pause using the API or through the Admin UI. The paused_at, resumed_at and remaining_pause_cycles fields will now contain information on when the subscription will become paused, when it will resume, and how many pause cycles are left respectively. This webhook will be available when this feature is released in late April 2018.

<?xml version="1.0" encoding="UTF-8"?>
<scheduled_subscription_pause_notification>
  <account>
    <account_code>1</account_code>
    <username>test-user</username>
    <email>test+2605@recurly.com</email>
    <first_name>test</first_name>
    <last_name>test-last</last_name>
    <company_name>Recurly, Inc.</company_name>
    <phone>555-1212</phone>
  </account>
  <subscription>
    <plan>
      <plan_code>4ec9adacbc37be072f0d6e2d1affc538</plan_code>
      <name>Aut Fugiat Officia 6eae19a51 plan</name>
    </plan>
    <uuid>437b9def1c442e659f90f4416086dd66</uuid>
    <state>active</state>
    <quantity type="integer">1</quantity>
    <total_amount_in_cents type="integer">709</total_amount_in_cents>
    <subscription_add_ons type="array"/>
    <activated_at type="datetime">2018-03-09T22:12:36Z</activated_at>
    <canceled_at type="datetime" nil="true"></canceled_at>
    <expires_at type="datetime" nil="true"></expires_at>
    <current_period_started_at type="datetime">2018-03-09T22:12:36Z</current_period_started_at>
    <current_period_ends_at type="datetime">2019-03-09T22:12:36Z</current_period_ends_at>
    <trial_started_at type="datetime" nil="true"></trial_started_at>
    <trial_ends_at type="datetime" nil="true"></trial_ends_at>
    <paused_at type="datetime">2019-03-09T22:12:36Z</paused_at>
    <resume_at type="datetime">2024-03-09T22:12:36Z</resume_at>
    <remaining_pause_cycles type="integer">5</remaining_pause_cycles>
  </subscription>
</scheduled_subscription_pause_notification>

Subscription Paused Modified

The subscription_paused_modified webhook is sent when a subscription’s pause duration is modified. The resume_at and remaining_pause_cycles fields will change to reflect the new date at which the subscription will resume and how many pause cycles are left. This webhook will be available when this feature is released in late April 2018.

<?xml version="1.0" encoding="UTF-8"?>
<subscription_pause_modified_notification>
  <account>
    <account_code>1</account_code>
    <username>test-user</username>
    <email>test+2605@recurly.com</email>
    <first_name>test</first_name>
    <last_name>test-last</last_name>
    <company_name>Recurly, Inc.</company_name>
    <phone>555-1212</phone>
  </account>
  <subscription>
    <plan>
      <plan_code>4ec9adacbc37be072f0d6e2d1affc538</plan_code>
      <name>Aut Fugiat Officia 6eae19a51 plan</name>
    </plan>
    <uuid>437a818b9dba81065e444448de931842</uuid>
    <state>active</state>
    <quantity type="integer">1</quantity>
    <total_amount_in_cents type="integer">709</total_amount_in_cents>
    <subscription_add_ons type="array"/>
    <activated_at type="datetime">2018-03-09T17:01:59Z</activated_at>
    <canceled_at type="datetime" nil="true"></canceled_at>
    <expires_at type="datetime" nil="true"></expires_at>
    <current_period_started_at type="datetime">2018-03-09T13:33:09Z</current_period_started_at>
    <current_period_ends_at type="datetime">2018-03-09T13:38:22Z</current_period_ends_at>
    <trial_started_at type="datetime" nil="true"></trial_started_at>
    <trial_ends_at type="datetime" nil="true"></trial_ends_at>
    <paused_at type="datetime">2018-03-09T13:38:22Z</paused_at>
    <resume_at type="datetime">2023-03-09T13:38:22Z</resume_at>
    <remaining_pause_cycles type="integer">5</remaining_pause_cycles>
  </subscription>
</subscription_pause_modified_notification>

Paused Subscription Renewal

The paused_subscription_renewal webhook is sent when a subscription’s renewal/billing cycle is skipped because it is paused. The remaining_pause_cycles value will decrement by 1 after each pause cycle. This webhook will be available when this feature is released in late April 2018.

<?xml version="1.0" encoding="UTF-8"?>
<paused_subscription_renewal_notification>
  <account>
    <account_code>1</account_code>
    <username>test-user</username>
    <email>test+2605@recurly.com</email>
    <first_name>test</first_name>
    <last_name>test-last</last_name>
    <company_name>Recurly, Inc.</company_name>
    <phone>555-1212</phone>
  </account>
  <subscription>
    <plan>
      <plan_code>daily_plan</plan_code>
      <name>daily_plan</name>
    </plan>
    <uuid>437a818b9dba81065e444448de931842</uuid>
    <state>paused</state>
    <quantity type="integer">10</quantity>
    <total_amount_in_cents type="integer">10000</total_amount_in_cents>
    <subscription_add_ons type="array"/>
    <activated_at type="datetime">2018-03-09T17:01:59Z</activated_at>
    <canceled_at type="datetime" nil="true"></canceled_at>
    <expires_at type="datetime" nil="true"></expires_at>
    <current_period_started_at type="datetime">2018-03-18T17:50:27Z</current_period_started_at>
    <current_period_ends_at type="datetime">2018-03-19T17:50:27Z</current_period_ends_at>
    <trial_started_at type="datetime" nil="true"></trial_started_at>
    <trial_ends_at type="datetime" nil="true"></trial_ends_at>
    <paused_at type="datetime">2018-03-10T22:12:08Z</paused_at>
    <resume_at type="datetime">2018-03-20T17:50:27Z</resume_at>
    <remaining_pause_cycles type="integer">1</remaining_pause_cycles>
  </subscription>
</paused_subscription_renewal_notification>

Subscription Pause Canceled

The subscription_pause_canceled webhook is sent whenever a scheduled to pause is canceled. The paused_at, resume_at and remaining_pause_cycles will now be nil as the pause has been canceled. This webhook will be available when this feature is released in late April 2018.

<?xml version="1.0" encoding="UTF-8"?>
<subscription_pause_canceled_notification>
  <account>
    <account_code>1</account_code>
    <username>test-user</username>
    <email>test+2605@recurly.com</email>
    <first_name>test</first_name>
    <last_name>test-last</last_name>
    <company_name>Recurly, Inc.</company_name>
    <phone>555-1212</phone>
  </account>
  <subscription>
    <plan>
      <plan_code>4ec9adacbc37be072f0d6e2d1affc538</plan_code>
      <name>Aut Fugiat Officia 6eae19a51 plan</name>
    </plan>
    <uuid>437b9def1c442e659f90f4416086dd66</uuid>
    <state>active</state>
    <quantity type="integer">1</quantity>
    <total_amount_in_cents type="integer">2000</total_amount_in_cents>
    <subscription_add_ons type="array"/>
    <activated_at type="datetime">2018-03-09T22:12:36Z</activated_at>
    <canceled_at type="datetime" nil="true"></canceled_at>
    <expires_at type="datetime" nil="true"></expires_at>
    <current_period_started_at type="datetime">2018-03-09T22:12:36Z</current_period_started_at>
    <current_period_ends_at type="datetime">2019-03-09T22:12:36Z</current_period_ends_at>
    <trial_started_at type="datetime" nil="true"></trial_started_at>
    <trial_ends_at type="datetime" nil="true"></trial_ends_at>
    <paused_at type="datetime" nil="true"></paused_at>
    <resume_at type="datetime" nil="true"></resume_at>
    <remaining_pause_cycles nil="true"></remaining_pause_cycles>
  </subscription>
</subscription_pause_canceled_notification>

Usage Notifications

New Usage

A new_usage_notification is sent when we create a usage record on your behalf in a refund or terminate scenario.

<?xml version="1.0" encoding="UTF-8"?>
<new_usage_notification>
  <account>
    <account_code>923845792374</account_code>
    <username></username>
    <email></email>
    <first_name></first_name>
    <last_name></last_name>
    <company_name></company_name>
  </account>
  <usage>
    <id type="integer">394729929104688227</id>
    <subscription_id>35cda8d4ae0a214f69779e4ddbbc2ebd</subscription_id>
    <add_on_code>video_storage</add_on_code>
    <measured_unit_id type="integer">394681920153192422</measured_unit_id>
    <amount type="integer">-40</amount>
    <merchant_tag nil="true"></merchant_tag>
    <recording_timestamp type="datetime">2016-04-28T21:57:53+00:00</recording_timestamp>
    <usage_timestamp type="datetime">2016-04-28T21:57:53+00:00</usage_timestamp>
    <created_at type="datetime">2016-04-28T21:57:54+00:00</created_at>
    <modified_at type="datetime" nil="true"></modified_at>
    <billed_at type="datetime">2016-04-28T21:57:54+00:00</billed_at>
    <usage_type>PRICE</usage_type>
    <unit_amount_in_cents nil="true">50</unit_amount_in_cents>
    <usage_percentage type="float"></usage_percentage>
  </usage>
</new_usage_notification>

Gift Card Notifications

Purchased Gift Card

A purchased_gift_card_notification is sent when a gift card is purchased by a gifter.

<?xml version="1.0" encoding="UTF-8"?>
<purchased_gift_card_notification>
  <gift_card>
    <redemption_code>1A5069E266AED435</redemption_code>
    <id type="integer">2008976331180115114</id>
    <product_code>gift_card</product_code>
    <unit_amount_in_cents type="integer">1000</unit_amount_in_cents>
    <currency>USD</currency>
    <gifter_account_code>84395</gifter_account_code>
    <recipient_account_code nil="true"></recipient_account_code>
    <invoice_number type="integer">1105</invoice_number>
    <delivery>
      <method>email</method>
      <email_address>john@example.com</email_address>
      <deliver_at nil="true"></deliver_at>
      <first_name>John</first_name>
      <last_name>Smith</last_name>
      <address>
        <address1 nil="true"></address1>
        <address2 nil="true"></address2>
        <city nil="true"></city>
        <state nil="true"></state>
        <zip nil="true"></zip>
        <country nil="true"></country>
        <phone nil="true"></phone>
      </address>
      <gifter_name>Sally</gifter_name>
      <personal_message>
        Hi John, Happy Birthday! I hope you have a great day! Love, Sally</personal_message>
    </delivery>
    <created_at type="datetime">2016-08-03T20:37:21Z</created_at>
    <updated_at type="datetime">2016-08-03T20:37:21Z</updated_at>
    <delivered_at type="datetime" nil="true"></delivered_at>
    <redeemed_at type="datetime" nil="true"></redeemed_at>
    <canceled_at type="datetime" nil="true"></canceled_at>
  </gift_card>
</purchased_gift_card_notification>

Canceled Gift Card

A canceled_gift_card_notification is sent when you cancel a gift card from the Admin Console.

<?xml version="1.0" encoding="UTF-8"?>
<canceled_gift_card_notification>
  <gift_card>
    <redemption_code>1A5069E266AED435</redemption_code>
    <id type="integer">2008976331180115114</id>
    <product_code>gift_card</product_code>
    <unit_amount_in_cents type="integer">1000</unit_amount_in_cents>
    <currency>USD</currency>
    <gifter_account_code>84395</gifter_account_code>
    <recipient_account_code nil="true"></recipient_account_code>
    <invoice_number type="integer">1105</invoice_number>
    <delivery>
      <method>email</method>
      <email_address>john@example.com</email_address>
      <deliver_at nil="true"></deliver_at>
      <first_name>John</first_name>
      <last_name>Smith</last_name>
      <address>
        <address1 nil="true"></address1>
        <address2 nil="true"></address2>
        <city nil="true"></city>
        <state nil="true"></state>
        <zip nil="true"></zip>
        <country nil="true"></country>
        <phone nil="true"></phone>
      </address>
      <gifter_name>Sally</gifter_name>
      <personal_message>
        Hi John, Happy Birthday! I hope you have a great day! Love, Sally</personal_message>
    </delivery>
    <created_at type="datetime">2016-08-03T20:37:21Z</created_at>
    <updated_at type="datetime">2016-08-03T22:00:00Z</updated_at>
    <delivered_at type="datetime">2016-08-03T20:37:22Z</delivered_at>
    <redeemed_at type="datetime" nil="true"></redeemed_at>
    <canceled_at type="datetime">2016-08-04T20:30:22Z</canceled_at>
  </gift_card>
</canceled_gift_card_notification>

Updated Gift Card

An updated_gift_card_notification is sent when you edit a gift card’s delivery information from the Admin Console.

<?xml version="1.0" encoding="UTF-8"?>
<updated_gift_card_notification>
  <gift_card>
    <redemption_code>1A5069E266AED435</redemption_code>
    <id type="integer">2008976331180115114</id>
    <product_code>gift_card</product_code>
    <unit_amount_in_cents type="integer">1000</unit_amount_in_cents>
    <currency>USD</currency>
    <gifter_account_code>84395</gifter_account_code>
    <recipient_account_code nil="true"></recipient_account_code>
    <invoice_number type="integer">1105</invoice_number>
    <delivery>
      <method>email</method>
      <email_address>john@example.com</email_address>
      <deliver_at nil="true"></deliver_at>
      <first_name>John</first_name>
      <last_name>Smith</last_name>
      <address>
        <address1 nil="true"></address1>
        <address2 nil="true"></address2>
        <city nil="true"></city>
        <state nil="true"></state>
        <zip nil="true"></zip>
        <country nil="true"></country>
        <phone nil="true"></phone>
      </address>
      <gifter_name>Sally</gifter_name>
      <personal_message>
        Hi John, Happy Birthday! I hope you have a great day! Love, Sally</personal_message>
    </delivery>
    <created_at type="datetime">2016-08-03T20:37:21Z</created_at>
    <updated_at type="datetime">2016-08-03T22:00:00Z</updated_at>
    <delivered_at type="datetime">2016-08-03T20:37:22Z</delivered_at>
    <redeemed_at type="datetime" nil="true"></redeemed_at>
    <canceled_at type="datetime" nil="true"></canceled_at>
  </gift_card>
</updated_gift_card_notification>

Regenerated Gift Card

A regenerated_gift_card_notification is sent when you regenerate a gift card’s redemption code from the Admin Console.

<?xml version="1.0" encoding="UTF-8"?>
<regenerated_gift_card_notification>
  <gift_card>
    <redemption_code>1A5069E266AED435</redemption_code>
    <id type="integer">2008976331180115114</id>
    <product_code>gift_card</product_code>
    <unit_amount_in_cents type="integer">1000</unit_amount_in_cents>
    <currency>USD</currency>
    <gifter_account_code>84395</gifter_account_code>
    <recipient_account_code nil="true"></recipient_account_code>
    <invoice_number type="integer">1105</invoice_number>
    <delivery>
      <method>email</method>
      <email_address>john@example.com</email_address>
      <deliver_at nil="true"></deliver_at>
      <first_name>John</first_name>
      <last_name>Smith</last_name>
      <address>
        <address1 nil="true"></address1>
        <address2 nil="true"></address2>
        <city nil="true"></city>
        <state nil="true"></state>
        <zip nil="true"></zip>
        <country nil="true"></country>
        <phone nil="true"></phone>
      </address>
      <gifter_name>Sally</gifter_name>
      <personal_message>
        Hi John, Happy Birthday! I hope you have a great day! Love, Sally</personal_message>
    </delivery>
    <created_at type="datetime">2016-08-03T20:37:21Z</created_at>
    <updated_at type="datetime">2016-08-03T22:00:00Z</updated_at>
    <delivered_at type="datetime">2016-08-03T20:37:22Z</delivered_at>
    <redeemed_at type="datetime" nil="true"></redeemed_at>
    <canceled_at type="datetime" nil="true"></canceled_at>
  </gift_card>
</regenerated_gift_card_notification>

Redeemed Gift Card

A redeemed_gift_card_notification is sent when a gift card is redeemed by a recipient.

<?xml version="1.0" encoding="UTF-8"?>
<redeemed_gift_card_notification>
  <gift_card>
    <redemption_code>AB54200960E33C93</redemption_code>
    <id type="integer">2005384587788419212</id>
    <product_code>gift_card</product_code>
    <unit_amount_in_cents type="integer">1000</unit_amount_in_cents>
    <currency>USD</currency>
    <gifter_account_code>3543456</gifter_account_code>
    <recipient_account_code>3547000</recipient_account_code>
    <invoice_number type="integer">1099</invoice_number>
    <delivery>
      <method>email</method>
      <email_address nil="true"></email_address>
      <deliver_at nil="true"></deliver_at>
      <first_name>John</first_name>
      <last_name>Smith</last_name>
      <address>
        <address1 nil="true"></address1>
        <address2 nil="true"></address2>
        <city nil="true"></city>
        <state nil="true"></state>
        <zip nil="true"></zip>
        <country nil="true"></country>
        <phone nil="true"></phone>
      </address>
      <gifter_name>Sally</gifter_name>
      <personal_message>
        Hi John, Happy Birthday! I hope you have a great day! Love, Sally</personal_message>
    </delivery>
    <created_at type="datetime">2016-07-29T21:41:11Z</created_at>
    <updated_at type="datetime">2016-07-29T21:50:38Z</updated_at>
    <delivered_at type="datetime">2016-07-29T21:50:38Z</delivered_at>
    <redeemed_at type="datetime">2016-07-29T21:50:38Z</redeemed_at>
    <canceled_at type="datetime" nil="true"></canceled_at>
  </gift_card>
</redeemed_gift_card_notification>

Updated Balance Gift Card

An updated_balance_gift_card_notification is sent when the gift card’s balance decreases from use on an invoice or increases if credit is returned to the account from a failed invoice.

<?xml version="1.0" encoding="UTF-8"?>
<updated_balance_gift_card_notification>
  <gift_card>
    <redemption_code>AB54200960E33C93</redemption_code>
    <id type="integer">2005384587788419212</id>
    <product_code>gift_card</product_code>
    <unit_amount_in_cents type="integer">1000</unit_amount_in_cents>
    <currency>USD</currency>
    <gifter_account_code>3543456</gifter_account_code>
    <recipient_account_code>3547000</recipient_account_code>
    <invoice_number type="integer">1099</invoice_number>
    <delivery>
      <method>email</method>
      <email_address nil="true"></email_address>
      <deliver_at nil="true"></deliver_at>
      <first_name>John</first_name>
      <last_name>Smith</last_name>
      <address>
        <address1 nil="true"></address1>
        <address2 nil="true"></address2>
        <city nil="true"></city>
        <state nil="true"></state>
        <zip nil="true"></zip>
        <country nil="true"></country>
        <phone nil="true"></phone>
      </address>
      <gifter_name>Sally</gifter_name>
      <personal_message>
        Hi John, Happy Birthday! I hope you have a great day! Love, Sally</personal_message>
    </delivery>
    <created_at type="datetime">2016-07-29T21:41:11Z</created_at>
    <updated_at type="datetime">2016-08-02T23:50:38Z</updated_at>
    <delivered_at type="datetime">2016-07-29T21:50:38Z</delivered_at>
    <redeemed_at type="datetime">2016-07-29T21:50:38Z</redeemed_at>
    <canceled_at type="datetime" nil="true"></canceled_at>
    <balance_in_cents type="integer">200</balance_in_cents>
  </gift_card>
</updated_balance_gift_card_notification>

Charge Invoice Notifications

Only sent once the Credit Invoices feature is enabled on your Recurly site. Recurly sites created after May 8, 2018 UTC (May 7, 2018 5pm PT) automatically have the Credit Invoices feature. <a href="https://docs.recurly.com/docs/credit-invoices-release">Learn more</a>

New Charge Invoice

The new_charge_invoice_notification is sent when a charge invoice is created. This could be a subscription purchase, renewal, immediate subscription change, final usage invoice, or one-off invoice.

Processing Charge Invoice

The processing_charge_invoice_notification is sent when a charge invoice moves into a processing state due to a processing bank account (ACH) payment.

Past Due Charge Invoice

The past_due_charge_invoice_notification is sent when a charge invoice moves into a past due state due to a transaction decline or reaching the manual net-terms.

The paid_charge_invoice_notification is sent when a charge invoice moves to a paid state due to payment by transactions and or credit payments, or forced paid without a transaction.

Failed Charge Invoice

The failed_charge_invoice_notification is sent when a charge invoice moves to a failed state due to being failed directly or at the end of the dunning cycle.

Reopened Charge Invoice

The reopened_charge_invoice_notification is sent when a charge invoice is reopened. Only manual collection charge invoices can be reopened, and now with Credit Invoices, only paid manual collection charge invoices can be reopened. Failed manual collection charge invoices can no longer be reopened.

Updated Charge Invoice

The updated_charge_invoice_notification is sent when a charge invoice is edited.

Charge Invoice Schema

<?xml version="1.0" encoding="UTF-8"?>
<new_charge_invoice_notification>
  <account>
    <account_code>1234</account_code>
    <username></username>
    <email></email>
    <first_name></first_name>
    <last_name></last_name>
    <company_name></company_name>
    <phone></phone>
  </account>
  <invoice>
    <uuid>42feb03ce368c0e1ead35d4bfa89b82e</uuid>
    <state>pending</state>
    <origin>renewal</origin>
    <invoice_number_prefix></invoice_number_prefix>
    <invoice_number type="integer">2405</invoice_number>
    <address>
      <address1></address1>
      <address2></address2>
      <city></city>
      <state></state>
      <zip></zip>
      <country></country>
      <phone></phone>
    </address>
    <vat_number></vat_number>
    <currency>USD</currency>
    <balance_in_cents type="integer">100000</balance_in_cents>
    <total_in_cents type="integer">100000</total_in_cents>
    <tax_in_cents type="integer">0</tax_in_cents>
    <subtotal_in_cents type="integer">100000</subtotal_in_cents>
    <subtotal_before_discount_in_cents type="integer">100000</subtotal_before_discount_in_cents>
    <discount_in_cents type="integer">0</discount_in_cents>
    <subscription_ids type="array">
      <subscription_id>40b8f5e99df03b8684b99d4993b6e089</subscription_id>
    </subscription_ids>
    <customer_notes>Thanks for your business!</customer_notes>
    <created_at type="datetime">2018-02-13T16:00:04Z</created_at>
    <updated_at type="datetime">2018-02-13T16:00:04Z</updated_at>
    <closed_at type="datetime" nil="true"></closed_at>
    <po_number></po_number>
    <terms_and_conditions>Payment can be made out to Acme, Co.</terms_and_conditions>
    <due_on type="dateTime">2018-03-16T15:00:04Z</due_on>
    <net_terms type="integer">30</net_terms>
    <collection_method>manual</collection_method>
  </invoice>
</new_charge_invoice_notification>

Credit Invoice Notifications

Only sent once the Credit Invoices feature is enabled on your Recurly site. Recurly sites created after May 8, 2018 UTC (May 7, 2018 5pm PT) automatically have the Credit Invoices feature. <a href="https://docs.recurly.com/docs/credit-invoices-release">Learn more</a>

New Credit Invoice

The new_credit_invoice_notification is sent when a credit invoice is created. This could be a one-off custom credit, refund, subscription downgrade, refund at subscription termination, write-off, or gift card redemption.

Processing Credit Invoice

The processing_credit_invoice_notification is sent when a refund credit invoice enters a processing state due to a processing bank account (ACH) refund. Since only the new_credit_invoice notification is sent when a refund invoice is created, you will not see the processing_credit_invoice notification when a refund credit invoice is created and immediately moves to processing due to a bank account refund. You will only see the processing_credit_invoice when a bank account refund is created against the refund credit invoice after the fact, like retrying the refund or refunding the credit balance to a transaction later on.

Closed Credit Invoice

The closed_credit_invoice_notification is sent when a credit invoice’s balance decreases to zero. This can happen if the full balance was used as credit payments on charge invoices, the balance was refunded out to transactions, or if the balance was voided, creating a reduction credit payment.

Voided Credit Invoice

The voided_credit_invoice_notification is sent when a credit invoice moves to a voided state due to the full balance being removed.

Reopened Credit Invoice

The reopened_credit_invoice_notification is sent when a credit invoice is reopened from a closed state. A credit invoice is only reopened if it has a credit payment on a charge invoice that is later failed. When the charge invoice is failed, the credit payment is voided, resulting in the credit payment amount being added back to the credit invoice’s balance, which reopens the credit invoice.

Open Credit Invoice

When a credit invoice is issued for the first time in an open state, it will send the new_credit_invoice_notification. There is a case where a processing credit invoice may result in a declined refund transaction, which will move the invoice back to an open state. When this happens, the open_credit_invoice_notification will be sent. Since processing is not a closed state, we send the open_credit_invoice notification and not the reopened_credit_invoice_notification.

Updated Credit Invoice

The updated_credit_invoice_notification is sent when a credit invoice is edited.

Credit Invoice Schema

<?xml version="1.0" encoding="UTF-8"?>
<new_credit_invoice_notification>
  <account>
    <account_code>1234</account_code>
    <username></username>
    <email></email>
    <first_name></first_name>
    <last_name></last_name>
    <company_name></company_name>
    <phone></phone>
  </account>
  <invoice>
    <uuid>42fb74de65e9395eb004614144a7b91f</uuid>
    <state>closed</state>
    <origin>write_off</origin>
    <invoice_number_prefix></invoice_number_prefix>
    <invoice_number type="integer">2404</invoice_number>
    <address>
      <address1>123 Main St.</address1>
      <address2></address2>
      <city>San Francisco</city>
      <state>CA</state>
      <zip>94110</zip>
      <country>US</country>
      <phone></phone>
    </address>
    <vat_number></vat_number>
    <currency>USD</currency>
    <balance_in_cents type="integer">0</balance_in_cents>
    <total_in_cents type="integer">-4882</total_in_cents>
    <tax_in_cents type="integer">-382</tax_in_cents>
    <subtotal_in_cents type="integer">-4500</subtotal_in_cents>
    <subtotal_before_discount_in_cents type="integer">-5000</subtotal_before_discount_in_cents>
    <discount_in_cents type="integer">-500</discount_in_cents>
    <subscription_ids type="array">
      <subscription_id>42fb74ba9efe4c6981c2064436a4e9cd</subscription_id>
    </subscription_ids>
    <customer_notes nil="true"></customer_notes>
    <created_at type="datetime">2018-02-13T00:56:22Z</created_at>
    <updated_at type="datetime">2018-02-13T00:56:22Z</updated_at>
    <closed_at type="datetime">2018-02-13T00:56:21Z</closed_at>
  </invoice>
</new_credit_invoice_notification>

Invoice Notifications

Invoice Notifications are deprecated once the Recurly site has the Credit Invoices feature enabled. Invoices issued before the feature was enabled will still send Invoice Notifications for additional states, like Closed Invoice. New invoices will send the Charge Invoice or Credit Invoice Notifications.

All invoice notifications contain the account and transaction as part of the XML body. The root attribute determines the notification type. In most applications, you can ignore these notifications. Recurly will send you the proper invoice notifications when your application creates or updates an invoice state.

New Invoice

If a new invoice is generated, a new_invoice_notification is sent.

<?xml version="1.0" encoding="UTF-8"?>
<new_invoice_notification>
  <account>
    <account_code>1</account_code>
    <username nil="true"></username>
    <email>verena@example.com</email>
    <first_name>Verana</first_name>
    <last_name>Example</last_name>
    <company_name nil="true"></company_name>
  </account>
  <invoice>
    <uuid>ffc64d71d4b5404e93f13aac9c63b007</uuid>
    <subscription_id nil="true"></subscription_id>
    <state>open</state>
    <invoice_number_prefix></invoice_number_prefix>
    <invoice_number type="integer">1000</invoice_number>
    <po_number></po_number>
    <vat_number></vat_number>
    <total_in_cents type="integer">1000</total_in_cents>
    <currency>USD</currency>
    <date type="datetime">2014-01-01T20:21:44Z</date>
    <closed_at type="datetime" nil="true"></closed_at>
  </invoice>
</new_invoice_notification>

New Invoice (Manual)

If a new manual invoice is generated, a new_invoice_notification is sent. For partially paid manual invoices, a new_invoice_notification will not be sent after each partial payment.

<?xml version="1.0" encoding="UTF-8"?>
<new_invoice_notification>
  <account>
    <account_code>1</account_code>
    <username nil="true"></username>
    <email>verena@example.com</email>
    <first_name>Verana</first_name>
    <last_name>Example</last_name>
    <company_name nil="true"></company_name>
  </account>
  <invoice>
    <uuid>ffc64d71d4b5404e93f13aac9c63b007</uuid>
    <subscription_id nil="true"></subscription_id>
    <state>open</state>
    <invoice_number_prefix></invoice_number_prefix>
    <invoice_number type="integer">1000</invoice_number>
    <po_number></po_number>
    <vat_number></vat_number>
    <total_in_cents type="integer">1000</total_in_cents>
    <currency>USD</currency>
    <date type="datetime">2014-01-01T20:21:44Z</date>
    <closed_at type="datetime" nil="true"></closed_at>
    <net_terms type="integer">0</net_terms>
    <collection_method>manual</collection_method>
  </invoice>
</new_invoice_notification>

Processing Invoice (Automatic - Only for ACH and PayPal eCheck payments)

If an invoice is paid with ACH or a PayPal eCheck, the invoice will move into a processing state. When the invoice state changes to processing, a processing_invoice_notification is sent.

<?xml version="1.0" encoding="UTF-8"?>
<processing_invoice_notification>
  <account>
    <account_code>1</account_code>
    <username nil="true"></username>
    <email>verena@example.com</email>
    <first_name>Verana</first_name>
    <last_name>Example</last_name>
    <company_name nil="true"></company_name>
  </account>
  <invoice>
    <uuid>ffc64d71d4b5404e93f13aac9c63b007</uuid>
    <subscription_id nil="true"></subscription_id>
    <state>processing</state>
    <invoice_number_prefix></invoice_number_prefix>
    <invoice_number type="integer">1000</invoice_number>
    <po_number></po_number>
    <vat_number></vat_number>
    <total_in_cents type="integer">1000</total_in_cents>
    <currency>USD</currency>
    <date type="datetime">2014-01-01T20:21:44Z</date>
    <closed_at type="datetime" nil="true"></closed_at>
    <net_terms type="integer">0</net_terms>
    <collection_method>automatic</collection_method>
  </invoice>
</processing_invoice_notification>

Closed Invoice

If an invoice is closed, a closed_invoice_notification is sent. A closed invoice can result from either a failed to collect invoice or fully paid invoice.

<?xml version="1.0" encoding="UTF-8"?>
<closed_invoice_notification>
  <account>
    <account_code>1</account_code>
    <username nil="true"></username>
    <email>verena@example.com</email>
    <first_name>Verana</first_name>
    <last_name>Example</last_name>
    <company_name nil="true"></company_name>
  </account>
  <invoice>
    <uuid>ffc64d71d4b5404e93f13aac9c63b007</uuid>
    <subscription_id nil="true"></subscription_id>
    <state>collected</state>
    <invoice_number_prefix></invoice_number_prefix>
    <invoice_number type="integer">1000</invoice_number>
    <po_number></po_number>
    <vat_number></vat_number>
    <total_in_cents type="integer">1100</total_in_cents>
    <currency>USD</currency>
    <date type="datetime">2014-01-01T20:20:29Z</date>
    <closed_at type="datetime">2014-01-01T20:24:02Z</closed_at>
  </invoice>
</closed_invoice_notification>

Closed Invoice (Manual)

If a manual invoice is closed, a closed_invoice_notification is sent. A closed invoice can result from either a failed to collect invoice or fully paid invoice.

<?xml version="1.0" encoding="UTF-8"?>
<closed_invoice_notification>
  <account>
    <account_code>1</account_code>
    <username nil="true"></username>
    <email>verena@example.com</email>
    <first_name>Verana</first_name>
    <last_name>Example</last_name>
    <company_name nil="true"></company_name>
  </account>
  <invoice>
    <uuid>ffc64d71d4b5404e93f13aac9c63b007</uuid>
    <subscription_id nil="true"></subscription_id>
    <state>collected</state>
    <invoice_number_prefix></invoice_number_prefix>
    <invoice_number type="integer">1000</invoice_number>
    <po_number></po_number>
    <vat_number></vat_number>
    <total_in_cents type="integer">1100</total_in_cents>
    <currency>USD</currency>
    <date type="datetime">2014-01-01T20:20:29Z</date>
    <closed_at type="datetime">2014-01-01T20:24:02Z</closed_at>
    <net_terms type="integer">0</net_terms>
    <collection_method>manual</collection_method>
  </invoice>
</closed_invoice_notification>

Past Due Invoice

If an invoice is past due, a past_due_invoice_notification is sent. An invoice that is past due can result from a failure to collect by the due date.

<?xml version="1.0" encoding="UTF-8"?>
<past_due_invoice_notification>
  <account>
    <account_code>1</account_code>
    <username nil="true"></username>
    <email>verena@example.com</email>
    <first_name>Verana</first_name>
    <last_name>Example</last_name>
    <company_name nil="true"></company_name>
  </account>
  <invoice>
    <uuid>ffc64d71d4b5404e93f13aac9c63b007</uuid>
    <subscription_id nil="true"></subscription_id>
    <state>past_due</state>
    <invoice_number_prefix></invoice_number_prefix>
    <invoice_number type="integer">1000</invoice_number>
    <po_number></po_number>
    <vat_number></vat_number>
    <total_in_cents type="integer">1100</total_in_cents>
    <currency>USD</currency>
    <date type="datetime">2014-01-01T20:20:29Z</date>
    <closed_at type="datetime">2014-01-01T20:24:02Z</closed_at>
  </invoice>
</past_due_invoice_notification>

Past Due Invoice (Manual)

If a manual invoice is past due, a past_due_invoice_notification is sent. An invoice that is past due can result from a failure to collect by the due date.

<?xml version="1.0" encoding="UTF-8"?>
<past_due_invoice_notification>
  <account>
    <account_code>1</account_code>
    <username nil="true"></username>
    <email>verena@example.com</email>
    <first_name>Verana</first_name>
    <last_name>Example</last_name>
    <company_name nil="true"></company_name>
  </account>
  <invoice>
    <uuid>ffc64d71d4b5404e93f13aac9c63b007</uuid>
    <subscription_id nil="true"></subscription_id>
    <state>past_due</state>
    <invoice_number_prefix></invoice_number_prefix>
    <invoice_number type="integer">1000</invoice_number>
    <po_number></po_number>
    <vat_number></vat_number>
    <total_in_cents type="integer">1100</total_in_cents>
    <currency>USD</currency>
    <date type="datetime">2014-01-01T20:20:29Z</date>
    <closed_at type="datetime">2014-01-01T20:24:02Z</closed_at>
    <net_terms type="integer">0</net_terms>
    <collection_method>manual</collection_method>
  </invoice>
</past_due_invoice_notification>

Updated Invoice

The updated_invoice is sent when a legacy invoice is edited.

Payment Notifications

All payment notifications contain the account and transaction as part of the XML body. The root attribute determines the notification type. In most applications, you can ignore these notifications. Recurly will send you the proper subscription notifications when your application needs to modify a user’s account status. In the near future, Recurly will let you query for a user’s transaction history using the API.

Scheduled Payment (Only for ACH payments)

A scheduled_payment_notification is sent when Recurly initiates an ACH payment from a customer entering payment or the renewal procces.

<?xml version="1.0" encoding="UTF-8"?>
<scheduled_payment_notification>
  <account>
    <account_code>1</account_code>
    <username nil="true">verena</username>
    <email>verena@example.com</email>
    <first_name>Verena</first_name>
    <last_name>Example</last_name>
    <company_name nil="true">Company, Inc.</company_name>
  </account>
  <transaction>
    <id>a5143c1d3a6f4a8287d0e2cc1d4c0427</id>
    <invoice_id>1974a09kj90s0789dsf099798326881c</invoice_id>
    <invoice_number_prefix></invoice_number_prefix>
    <invoice_number type="integer">2059</invoice_number>
    <subscription_id>1974a098jhlkjasdfljkha898326881c</subscription_id>
    <action>purchase</action>
    <date type="datetime">2009-11-22T13:10:38Z</date>
    <amount_in_cents type="integer">1000</amount_in_cents>
    <status>scheduled</status>
    <message>Bogus Gateway: Forced success</message>
    <reference></reference>
    <source>subscription</source>
    <cvv_result code=""></cvv_result>
    <avs_result code=""></avs_result>
    <avs_result_street></avs_result_street>
    <avs_result_postal></avs_result_postal>
    <test type="boolean">true</test>
    <voidable type="boolean">true</voidable>
    <refundable type="boolean">true</refundable>
  </transaction>
</scheduled_payment_notification>

Processing Payment (Only for ACH and PayPal eCheck payments)

A processing_payment_notification is sent when an ACH or PayPal eCheck payment moves from the scheduled state to the processing state. An ACH payment enters a processing state when it has been submitted to the ACH bank network by Check Gateway. A PayPal eCheck payment moves to processing state when PayPal has confirmed that the transaction is “pending”.

<?xml version="1.0" encoding="UTF-8"?>
<processing_payment_notification>
  <account>
    <account_code>1</account_code>
    <username nil="true">verena</username>
    <email>verena@example.com</email>
    <first_name>Verena</first_name>
    <last_name>Example</last_name>
    <company_name nil="true">Company, Inc.</company_name>
  </account>
  <transaction>
    <id>a5143c1d3a6f4a8287d0e2cc1d4c0427</id>
    <invoice_id>1974a09kj90s0789dsf099798326881c</invoice_id>
    <invoice_number_prefix></invoice_number_prefix>
    <invoice_number type="integer">2059</invoice_number>
    <subscription_id>1974a098jhlkjasdfljkha898326881c</subscription_id>
    <action>purchase</action>
    <date type="datetime">2009-11-22T13:10:38Z</date>
    <amount_in_cents type="integer">1000</amount_in_cents>
    <status>processing</status>
    <message>Bogus Gateway: Forced success</message>
    <reference></reference>
    <source>subscription</source>
    <cvv_result code=""></cvv_result>
    <avs_result code=""></avs_result>
    <avs_result_street></avs_result_street>
    <avs_result_postal></avs_result_postal>
    <test type="boolean">true</test>
    <voidable type="boolean">true</voidable>
    <refundable type="boolean">true</refundable>
  </transaction>
</processing_payment_notification>

Successful Payment

A successful_payment_notification is sent when a payment is successfully captured.

<?xml version="1.0" encoding="UTF-8"?>
<successful_payment_notification>
  <account>
    <account_code>1</account_code>
    <username nil="true">verena</username>
    <email>verena@example.com</email>
    <first_name>Verena</first_name>
    <last_name>Example</last_name>
    <company_name nil="true">Company, Inc.</company_name>
  </account>
  <transaction>
    <id>a5143c1d3a6f4a8287d0e2cc1d4c0427</id>
    <invoice_id>1974a09kj90s0789dsf099798326881c</invoice_id>
    <invoice_number type="integer">2059</invoice_number>
    <subscription_id>1974a098jhlkjasdfljkha898326881c</subscription_id>
    <action>purchase</action>
    <date type="datetime">2009-11-22T13:10:38Z</date>
    <amount_in_cents type="integer">1000</amount_in_cents>
    <status>success</status>
    <message>Bogus Gateway: Forced success</message>
    <reference></reference>
    <source>subscription</source>
    <cvv_result code=""></cvv_result>
    <avs_result code=""></avs_result>
    <avs_result_street></avs_result_street>
    <avs_result_postal></avs_result_postal>
    <test type="boolean">true</test>
    <voidable type="boolean">true</voidable>
    <refundable type="boolean">true</refundable>
  </transaction>
</successful_payment_notification>

Manual Payment

A successful_payment_notification is also sent when a manual offline payment is recorded.

<?xml version="1.0" encoding="UTF-8"?>
<successful_payment_notification>
  <account>
    <account_code>1</account_code>
    <username nil="true">verena</username>
    <email>verena@example.com</email>
    <first_name>Verena</first_name>
    <last_name>Example</last_name>
    <company_name nil="true">Company, Inc.</company_name>
  </account>
  <transaction>
    <id>a5143c1d3a6f4a8287d0e2cc1d4c0427</id>
    <invoice_id>1974a09kj90s0789dsf099798326881c</invoice_id>
    <invoice_number type="integer">2059</invoice_number>
    <subscription_id>1974a098jhlkjasdfljkha898326881c</subscription_id>
    <action>purchase</action>
    <date type="datetime">2009-11-22T13:10:38Z</date>
    <amount_in_cents type="integer">1000</amount_in_cents>
    <status>success</status>
    <message>Bogus Gateway: Forced success</message>
    <reference></reference>
    <source>subscription</source>
    <cvv_result code=""></cvv_result>
    <avs_result code=""></avs_result>
    <avs_result_street></avs_result_street>
    <avs_result_postal></avs_result_postal>
    <test type="boolean">true</test>
    <voidable type="boolean">true</voidable>
    <refundable type="boolean">true</refundable>
    <manually_entered type="boolean">true</manually_entered>
    <payment_method>credit_card</payment_method>
  </transaction>
</successful_payment_notification>

Failed Payment

A failed_payment_notification is sent when a payment attempt is declined by the payment gateway.

<?xml version="1.0" encoding="UTF-8"?>
<failed_payment_notification>
  <account>
    <account_code>1</account_code>
    <username nil="true">verena</username>
    <email>verena@example.com</email>
    <first_name>Verena</first_name>
    <last_name>Example</last_name>
    <company_name nil="true">Company, Inc.</company_name>
  </account>
  <transaction>
    <id>a5143c1d3a6f4a8287d0e2cc1d4c0427</id>
    <invoice_id>8fjk3sd7j90s0789dsf099798jkliy65</invoice_id>
    <invoice_number type="integer">2059</invoice_number>
    <subscription_id>1974a098jhlkjasdfljkha898326881c</subscription_id>
    <action>purchase</action>
    <date type="datetime">2009-11-22T13:10:38Z</date>
    <gateway>cybersource</gateway>
    <amount_in_cents type="integer">1000</amount_in_cents>
    <status>Declined</status>
    <message>This transaction has been declined</message>
    <gateway_error_codes nil="true"></gateway_error_codes>
    <failure_type>Declined by the gateway</failure_type>
    <reference></reference>
    <source>subscription</source>
    <cvv_result code=""></cvv_result>
    <avs_result code=""></avs_result>
    <avs_result_street></avs_result_street>
    <avs_result_postal></avs_result_postal>
    <test type="boolean">true</test>
    <voidable type="boolean">false</voidable>
    <refundable type="boolean">false</refundable>
  </transaction>
</failed_payment_notification>

Successful Refund

If you refund an amount through the API or admin interface, a successful_refund_notification is sent. Failed refund attempts do not generate a notification.

<?xml version="1.0" encoding="UTF-8"?>
<successful_refund_notification>
  <account>
    <account_code>1</account_code>
    <username nil="true"></username>
    <email>verena@example.com</email>
    <first_name>Verena</first_name>
    <last_name>Example</last_name>
    <company_name nil="true"></company_name>
  </account>
  <transaction>
    <id>2c7a2e30547e49869efd4e8a44b2be34</id>
    <invoice_id>ffc64d71d4b5404e93f13aac9c63b007</invoice_id>
    <invoice_number type="integer">2059</invoice_number>
    <subscription_id>1974a098jhlkjasdfljkha898326881c</subscription_id>
    <action>credit</action>
    <date type="datetime">2010-10-06T20:37:55Z</date>
    <amount_in_cents type="integer">235</amount_in_cents>
    <status>success</status>
    <message>Bogus Gateway: Forced success</message>
    <reference></reference>
    <source>subscription</source>
    <cvv_result code=""></cvv_result>
    <avs_result code=""></avs_result>
    <avs_result_street></avs_result_street>
    <avs_result_postal></avs_result_postal>
    <test type="boolean">true</test>
    <voidable type="boolean">true</voidable>
    <refundable type="boolean">false</refundable>
  </transaction>
</successful_refund_notification>

Void Payment

If you void a successfully captured payment before it settles, a void_payment_notification is sent. Payments can only be voided before the funds settle into your merchant account.

<?xml version="1.0" encoding="UTF-8"?>
<void_payment_notification>
  <account>
    <account_code>1</account_code>
    <username nil="true"></username>
    <email>verena@example.com</email>
    <first_name>Verena</first_name>
    <last_name>Example</last_name>
    <company_name nil="true"></company_name>
  </account>
  <transaction>
    <id>4997ace0f57341adb3e857f9f7d15de8</id>
    <invoice_id>ffc64d71d4b5404e93f13aac9c63b007</invoice_id>
    <invoice_number type="integer">2059</invoice_number>
    <subscription_id>1974a098jhlkjasdfljkha898326881c</subscription_id>
    <action>purchase</action>
    <date type="datetime">2010-10-05T23:00:50Z</date>
    <amount_in_cents type="integer">235</amount_in_cents>
    <status>void</status>
    <message>Test Gateway: Successful test transaction</message>
    <reference></reference>
    <source>subscription</source>
    <cvv_result code="M">Match</cvv_result>
    <avs_result code="D">Street address and postal code match.</avs_result>
    <avs_result_street></avs_result_street>
    <avs_result_postal></avs_result_postal>
    <test type="boolean">true</test>
    <voidable type="boolean">false</voidable>
    <refundable type="boolean">false</refundable>
  </transaction>
</void_payment_notification>

Fraud Info Updated

If you are using Kount Direct and manually reviewing transactions for fraud, a fraud_info_updated_notification is sent. This notification is sent when we receive an ENS from Kount. More information on Kount ENS is available here.

<?xml version="1.0" encoding="UTF-8"?>
<fraud_info_updated_notification>
  <account>
    <account_code>1</account_code>
    <username nil="true">verena</username>
    <email>verena@example.com</email>
    <first_name>Verena</first_name>
    <last_name>Example</last_name>
    <company_name nil="true">Company, Inc.</company_name>
  </account>
  <transaction>
    <id>a5143c1d3a6f4a8287d0e2cc1d4c0427</id>
    <invoice_id>8fjk3sd7j90s0789dsf099798jkliy65</invoice_id>
    <invoice_number type="integer">2059</invoice_number>
    <subscription_id>41e4e03e10be199252613d424290c5c6</subscription_id>
    <subscription_ids type="array">
      <subscription_id>41e4e03e10be199252613d424290c5c6</subscription_id>
    </subscription_ids>
    <action>purchase</action>
    <date type="datetime">2017-10-20T22:39:35Z</date>
    <gateway>authorize</gateway>
    <payment_method>credit_card</payment_method>
    <amount_in_cents type="integer">1000</amount_in_cents>
    <status>success</status>
    <message>This transaction has been approved.</message>
    <gateway_error_codes>1</gateway_error_codes>
    <failure_type nil="true"></failure_type>
    <reference></reference>
    <source>subscription</source>
    <cvv_result code=""></cvv_result>
    <avs_result code=""></avs_result>
    <avs_result_street></avs_result_street>
    <avs_result_postal></avs_result_postal>
    <billing_phone nil="true"></billing_phone>
    <billing_postal></billing_postal>
    <billing_country></billing_country>
    <test type="boolean">true</test>
    <voidable type="boolean">true</voidable>
    <refundable type="boolean">true</refundable>
  </transaction>
</fraud_info_updated_notification>

Transaction Status Updated

Transactions will occasionally receive status updates from the payment gateway due to reasons such as gateway timeouts or asynchronous behaviors. For these cases, this notification will be sent to provide the updated transaction status.

<?xml version="1.0" encoding="UTF-8"?>
<transaction_status_updated_notification>
  <account>
    <account_code>1</account_code>
    <username nil="true"></username>
    <email>verena@example.com</email>
    <first_name>Verena</first_name>
    <last_name>Example</last_name>
    <company_name nil="true"></company_name>
  </account>
  <transaction>
    <id>4997ace0f57341adb3e857f9f7d15de8</id>
    <invoice_id>ffc64d71d4b5404e93f13aac9c63b007</invoice_id>
    <invoice_number type="integer">2059</invoice_number>
    <subscription_id>1974a098jhlkjasdfljkha898326881c</subscription_id>
    <action>purchase</action>
    <date type="datetime">2010-10-05T23:00:50Z</date>
    <amount_in_cents type="integer">235</amount_in_cents>
    <status>void</status>
    <message>Test Gateway: Successful test transaction</message>
    <reference></reference>
    <source>subscription</source>
    <cvv_result code="M">Match</cvv_result>
    <avs_result code="D">Street address and postal code match.</avs_result>
    <avs_result_street></avs_result_street>
    <avs_result_postal></avs_result_postal>
    <test type="boolean">true</test>
    <voidable type="boolean">false</voidable>
    <refundable type="boolean">false</refundable>
  </transaction>
</transaction_status_updated_notification>

Transaction Authorized

If you successfully authorize a payment, transaction_authorized_notification is sent. Payments that are successfully authorized must be captured upon to receive the settlement.

<?xml version="1.0" encoding="UTF-8"?>
<transaction_authorized_notification>
  <account>
    <account_code>1</account_code>
    <username nil="true"></username>
    <email>verena@example.com</email>
    <first_name>Verena</first_name>
    <last_name>Example</last_name>
    <company_name nil="true"></company_name>
  </account>
  <transaction>
    <id>4997ace0f57341adb3e857f9f7d15de8</id>
    <invoice_id>ffc64d71d4b5404e93f13aac9c63b007</invoice_id>
    <invoice_number type="integer">2059</invoice_number>
    <subscription_id>1974a098jhlkjasdfljkha898326881c</subscription_id>
    <action>purchase</action>
    <date type="datetime">2010-10-05T23:00:50Z</date>
    <amount_in_cents type="integer">235</amount_in_cents>
    <status>void</status>
    <message>Test Gateway: Successful test transaction</message>
    <reference></reference>
    <source>subscription</source>
    <cvv_result code="M">Match</cvv_result>
    <avs_result code="D">Street address and postal code match.</avs_result>
    <avs_result_street></avs_result_street>
    <avs_result_postal></avs_result_postal>
    <test type="boolean">true</test>
    <voidable type="boolean">false</voidable>
    <refundable type="boolean">false</refundable>
  </transaction>
</transaction_authorized_notification>

Credit Payment Notifications

Only sent once the Credit Invoices feature is enabled on your Recurly site. Recurly sites created after May 8, 2018 UTC (May 7, 2018 5pm PT) automatically have the Credit Invoices feature. <a href="https://docs.recurly.com/docs/credit-invoices-release">Learn more</a>

New Credit Payment

The new_credit_payment notification is sent when a credit payment is created. A credit payment is created when an open credit balance is applied as payment in a billing event, a credit invoice’s balance is removed, or a refund credit invoice refunds a credit payment as a transaction.

Voided Credit Payment

The voided_credit_payment notification is sent when a credit payment is voided due to the charge invoice it is applied to being failed.

Credit Payment Schema

<?xml version="1.0" encoding="UTF-8"?>
<new_credit_payment_notification>
  <account>
    <account_code>1234</account_code>
    <username></username>
    <email></email>
    <first_name></first_name>
    <last_name></last_name>
    <company_name></company_name>
    <phone></phone>
  </account>
  <credit_payment>
    <uuid>42fa2a56dfeca2ace39b0e4a9198f835</uuid>
    <action type="symbol">payment</action>
    <currency>USD</currency>
    <amount_in_cents type="integer">3579</amount_in_cents>
    <original_invoice_number type="integer">2389</original_invoice_number>
    <applied_to_invoice_number type="integer">2390</applied_to_invoice_number>
    <original_credit_payment_uuid nil="true"></original_credit_payment_uuid>
    <refund_transaction_uuid nil="true"></refund_transaction_uuid>
    <created_at type="datetime">2018-02-12T18:55:20Z</created_at>
    <updated_at type="datetime">2018-02-12T18:55:20Z</updated_at>
    <voided_at type="datetime" nil="true"></voided_at>
  </credit_payment>
</new_credit_payment_notification>

Dunning Event Notifications

A new_dunning_event_notification is sent when an invoice enters and remains in dunning. This notification will be sent according to your dunning configuration in Recurly. Please note that these are delivered regardless of whether or not you use Recurly to send customer communication. Recurly merchants use this push notification to customize customer email for each dunning step or to reach customers using different communication channels (email, SMS, Slack channel etc) or to reduce customer churn by offering discounts proactively.

Sites with the Credit Invoices feature enabled will see the below schema:

<?xml version="1.0" encoding="UTF-8"?>
<new_dunning_event_notification>
  <account>
    <account_code>1234</account_code>
    <username></username>
    <email></email>
    <first_name></first_name>
    <last_name></last_name>
    <company_name></company_name>
    <phone></phone>
  </account>
  <invoice>
    <uuid>424a9d4a2174b4f39bc776426aa19c32</uuid>
    <state>past_due</state>
    <origin>renewal</origin>
    <invoice_number_prefix></invoice_number_prefix>
    <invoice_number type="integer">1813</invoice_number>
    <address>
      <address1></address1>
      <address2></address2>
      <city></city>
      <state></state>
      <zip></zip>
      <country></country>
      <phone></phone>
    </address>
    <vat_number></vat_number>
    <currency>USD</currency>
    <balance_in_cents type="integer">4000</balance_in_cents>
    <total_in_cents type="integer">4500</total_in_cents>
    <tax_in_cents type="integer">0</tax_in_cents>
    <subtotal_in_cents type="integer">4500</subtotal_in_cents>
    <subtotal_before_discount_in_cents type="integer">4500</subtotal_before_discount_in_cents>
    <discount_in_cents type="integer">0</discount_in_cents>
    <subscription_ids type="array">
      <subscription_id>4110792b3b01967d854f674b7282f542</subscription_id>
    </subscription_ids>
    <customer_notes>Thanks for your business!</customer_notes>
    <created_at type="datetime">2018-01-09T16:47:43Z</created_at>
    <updated_at type="datetime">2018-02-12T16:50:23Z</updated_at>
    <closed_at type="datetime" nil="true"></closed_at>
    <po_number></po_number>
    <terms_and_conditions></terms_and_conditions>
    <due_on type="datetime">2018-02-09T16:47:43Z</due_on>
    <dunning_events_count type="integer">2</dunning_events_count>
    <final_dunning_event type="boolean">false</final_dunning_event>
    <net_terms type="integer">30</net_terms>
    <collection_method>manual</collection_method>
  </invoice>
  <subscription>
    <plan>
      <plan_code>gold</plan_code>
      <name>Gold</name>
    </plan>
    <uuid>4110792b3b01967d854f674b7282f542</uuid>
    <state>active</state>
    <quantity type="integer">1</quantity>
    <total_amount_in_cents type="integer">4500</total_amount_in_cents>
    <subscription_add_ons type="array">
      <subscription_add_on>
        <add_on_code>training_classes</add_on_code>
        <name>Training Classes</name>
        <quantity type="integer">1</quantity>
        <unit_amount_in_cents type="integer">700</unit_amount_in_cents>
        <add_on_type>fixed</add_on_type>
        <usage_percentage nil="true"></usage_percentage>
        <measured_unit_id nil="true"></measured_unit_id>
      </subscription_add_on>
      <subscription_add_on>
        <add_on_code>executive-brief</add_on_code>
        <name>Executive Brief</name>
        <quantity type="integer">1</quantity>
        <unit_amount_in_cents type="integer">2300</unit_amount_in_cents>
        <add_on_type>fixed</add_on_type>
        <usage_percentage nil="true"></usage_percentage>
        <measured_unit_id nil="true"></measured_unit_id>
      </subscription_add_on>
    </subscription_add_ons>
    <activated_at type="datetime">2017-11-09T16:47:30Z</activated_at>
    <canceled_at type="datetime" nil="true"></canceled_at>
    <expires_at type="datetime" nil="true"></expires_at>
    <current_period_started_at type="datetime">2018-02-09T16:47:30Z</current_period_started_at>
    <current_period_ends_at type="datetime">2018-03-09T16:47:30Z</current_period_ends_at>
    <trial_started_at type="datetime" nil="true"></trial_started_at>
    <trial_ends_at type="datetime" nil="true"></trial_ends_at>
  </subscription>
</new_dunning_event_notification>

Sites that do not have the Credit Invoices feature enabled will see the below schema:

<?xml version="1.0" encoding="UTF-8"?>
<new_dunning_event_notification>
  <account>
    <account_code>09f299492d21</account_code>
    <username nil="true"></username>
    <email>joseph.smith@gmail.com</email>
    <first_name>Joseph</first_name>
    <last_name>Smith</last_name>
    <company_name nil="true"></company_name>
    <phone>3235626924</phone>
  </account>
  <invoice>
    <uuid>inv-7wr0r2xuawwCjO</uuid>
    <subscription_id>396e4e17640ca516c2f3a84e47ae91dd</subscription_id>
    <state>failed</state>
    <invoice_number_prefix></invoice_number_prefix>
    <invoice_number type="integer">781002</invoice_number>
    <po_number></po_number>
    <vat_number nil="true"></vat_number>
    <total_in_cents type="integer">2499</total_in_cents>
    <currency>USD</currency>
    <date type="datetime">2016-10-26T16:00:12Z</date>
    <closed_at type="datetime">2016-10-27T16:00:26Z</closed_at>
    <net_terms type="integer">0</net_terms>
    <collection_method>automatic</collection_method>
    <due_at type="datetime">2016-10-26T16:00:12Z</due_at>
    <dunning_events_count type="integer">2</dunning_events_count>
    <final_dunning_event type="boolean">false</final_dunning_event>
  </invoice>
  <subscription>
    <plan>
      <plan_code>28a3ae1fc5c00d123429</plan_code>
      <name>41c36e04f2d7bebc</name>
    </plan>
    <uuid>396e4e17640ca516c2f3a84e47ae91dd</uuid>
    <state>active</state>
    <quantity type="integer">1</quantity>
    <total_amount_in_cents type="integer">2499</total_amount_in_cents>
    <subscription_add_ons type="array"/>
    <activated_at type="datetime">2016-10-26T05:42:27Z</activated_at>
    <canceled_at type="datetime" nil="true"></canceled_at>
    <expires_at type="datetime" nil="true"></expires_at>
    <current_period_started_at type="datetime">2016-10-26T16:00:00Z</current_period_started_at>
    <current_period_ends_at type="datetime">2016-11-26T16:00:00Z</current_period_ends_at>
    <trial_started_at type="datetime" nil="true"></trial_started_at>
    <trial_ends_at type="datetime" nil="true"></trial_ends_at>
  </subscription>
  <transaction>
    <id>397083a9a871b53a3d5a4c469fa1216a</id>
    <invoice_id>397083a76356802de2f5474d299475d8</invoice_id>
    <invoice_number_prefix></invoice_number_prefix>
    <invoice_number type="integer">1002</invoice_number>
    <subscription_id>396e4e17640ca516c2f3a84e47ae91dd</subscription_id>
    <action>purchase</action>
    <date type="datetime">2016-10-26T16:00:12Z</date>
    <gateway>payeezy</gateway>
    <payment_method>credit_card</payment_method>
    <amount_in_cents type="integer">2499</amount_in_cents>
    <status>declined</status>
    <message>Transaction Normal</message>
    <gateway_error_codes>00</gateway_error_codes>
    <failure_type>invalid_data</failure_type>
    <reference>115948823</reference>
    <source>subscription</source>
    <cvv_result code="I">Failed data validation check</cvv_result>
    <avs_result code="1"></avs_result>
    <avs_result_street nil="true"></avs_result_street>
    <avs_result_postal nil="true"></avs_result_postal>
    <billing_phone nil="true"></billing_phone>
    <billing_postal>94605</billing_postal>
    <billing_country>US</billing_country>
    <test type="boolean">true</test>
    <voidable type="boolean">false</voidable>
    <refundable type="boolean">false</refundable>
  </transaction>
</new_dunning_event_notification>