{"_id":"5581fa2e8625220d00429f00","initVersion":{"_id":"555fbba928249c1900618a85","version":"1.0"},"user":{"_id":"55648cf93b87582b003ab8b1","username":"","name":"Chris Bunting"},"project":"555fbba928249c1900618a82","__v":0,"hidden":false,"createdAt":"2015-06-17T22:52:30.697Z","fullscreen":false,"htmlmode":false,"html":"","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Configuration\"\n}\n[/block]\nPlease see our [webhooks documentation](https://docs.recurly.com/push-notifications) for more information.\n\nThere is an example on how to use webhook in PHP available [here](https://github.com/mbeale/recurly-push-notification-example). This example is for educational purposes only and should not be used for mission critical information.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Available webhooks\"\n}\n[/block]\n* [Account Notifications](https://dev.recurly.com/page/webhooks#account-notifications)\n * [New Account](https://dev.recurly.com/page/webhooks#section-new-account)\n * [Updated Account](https://dev.recurly.com/page/webhooks#section-updated-account)\n * [Closed Account](https://dev.recurly.com/page/webhooks#section-closed-account)\n * [Updated Billing information](https://dev.recurly.com/page/webhooks#section-updated-billing-information) \n * [Failed Billing Information Update](https://dev.recurly.com/page/webhooks#section-failed-billing-information-update)\n * [New shipping address created](https://dev.recurly.com/page/webhooks#section-a-new-shipping-address-is-created)\n * [Existing shipping address edited](https://dev.recurly.com/page/webhooks#section-an-existing-shipping-address-is-edited)\n * [Existing shipping address deleted](https://dev.recurly.com/page/webhooks#section-an-existing-shipping-address-is-deleted)\n\n\n* [Subscription Notifications](https://dev.recurly.com/page/webhooks#subscription-notifications)\n * [New Subscription](https://dev.recurly.com/page/webhooks#section-new-subscription)\n * [Updated Subscription](https://dev.recurly.com/page/webhooks#section-updated-subscription)\n * [Canceled Subscription](https://dev.recurly.com/page/webhooks#section-canceled-subscription)\n * [Expired Subscription](https://dev.recurly.com/page/webhooks#section-expired-subscription)\n * [Renewed Subscription](https://dev.recurly.com/page/webhooks#section-renewed-subscription)\n * [Reactivated Subscription](https://dev.recurly.com/v2.6/page/webhooks#section-reactivated-subscription)\n * [Paused Subscription](https://dev.recurly.com/page/webhooks#section-paused-subscription)\n * [Resumed Subscription](https://dev.recurly.com/page/webhooks#section-resumed-subscription)\n * [Scheduled Subscription Pause](https://dev.recurly.com/page/webhooks#section-scheduled-subscription-pause)\n * [Subscription Pause Modified](https://dev.recurly.com/page/webhooks#section-subscription-paused-modified)\n * [Paused Subscription Renewal](https://dev.recurly.com/page/webhooks#section-paused-subscription-renewal)\n * [Subscription Pause Canceled](https://dev.recurly.com/page/webhooks#section-subscription-pause-canceled)\n\n\n* [Usage Notifications](https://dev.recurly.com/page/webhooks#usage-notifications)\n * [New Usage](https://dev.recurly.com/page/webhooks#section-new-usage)\n\n* [Gift Card Notifications](https://dev.recurly.com/page/webhooks#gift-card-notifications)\n * [Purchased Gift Card](https://dev.recurly.com/page/webhooks#section-purchased-gift-card)\n * [Canceled Gift Card](https://dev.recurly.com/page/webhooks#section-canceled-gift-card)\n * [Updated Gift Card](https://dev.recurly.com/page/webhooks#section-updated-gift-card)\n * [Regenerated Gift Card](https://dev.recurly.com/page/webhooks#section-regenerated-gift-card)\n * [Redeemed Gift Card](https://dev.recurly.com/page/webhooks#section-redeemed-gift-card)\n * [Updated Balance Gift Card](https://dev.recurly.com/page/webhooks#section-updated-balance-gift-card)\n\n* [Charge Invoice Notifications](https://dev.recurly.com/page/webhooks#charge-invoice-notifications)\n * [New Charge Invoice](https://dev.recurly.com/page/webhooks#section-new-charge-invoice)\n * [Processing Charge Invoice](https://dev.recurly.com/page/webhooks#section-processing-charge-invoice)\n * [Past Due Charge Invoice](https://dev.recurly.com/page/webhooks#section-past-due-charge-invoice)\n * [Paid Charge Invoice](https://dev.recurly.com/page/webhooks#section-paid-charge-invoice)\n * [Failed Charge Invoice](https://dev.recurly.com/page/webhooks#section-failed-charge-invoice)\n * [Reopened Charge Invoice](https://dev.recurly.com/page/webhooks#section-reopened-charge-invoice)\n\n* [Credit Invoice Notifications](https://dev.recurly.com/page/webhooks#credit-invoice-notifications)\n * [New Credit Invoice](https://dev.recurly.com/page/webhooks#section-new-credit-invoice)\n * [Processing Credit Invoice](https://dev.recurly.com/page/webhooks#section-processing-credit-invoice)\n * [Closed Credit Invoice](https://dev.recurly.com/page/webhooks#section-closed-credit-invoice)\n * [Voided Credit Invoice](https://dev.recurly.com/page/webhooks#section-voided-credit-invoice)\n * [Reopened Credit Invoice](https://dev.recurly.com/page/webhooks#section-reopened-credit-invoice)\n * [Open Credit Invoice](https://dev.recurly.com/page/webhooks#section-open-credit-invoice)\n\n* [Invoice Notifications - Deprecated with Credit Invoices feature](https://dev.recurly.com/page/webhooks#invoice-notifications)\n * [New Invoice](https://dev.recurly.com/page/webhooks#section-new-invoice)\n * [New Invoice (Manual)](https://dev.recurly.com/page/webhooks#section-new-invoice-manual-)\n * [Processing Invoice (Automatic - Only for ACH  and PayPal eCheck payments)](https://dev.recurly.com/page/webhooks#section-processing-invoice-automatic-only-for-ach-and-paypal-echeck-payments-)\n * [Closed Invoice](https://dev.recurly.com/page/webhooks#section-closed-invoice)\n * [Closed Invoice (Manual)](https://dev.recurly.com/page/webhooks#section-closed-invoice-manual-) \n * [Past Due Invoice](https://dev.recurly.com/page/webhooks#section-past-due-invoice)\n * [Past Due Invoice (Manual)](https://dev.recurly.com/page/webhooks#section-past-due-invoice-manual-)\n\n* [Payment Notifications](https://dev.recurly.com/page/webhooks#payment-notifications) \n * [Scheduled Payment (Only for ACH payments)](https://dev.recurly.com/page/webhooks#section-scheduled-payment-only-for-ach-payments-)\n * [Processing Payment (Only for ACH and PayPal eCheck payments)](https://dev.recurly.com/page/webhooks#section-processing-payment-only-for-ach-and-paypal-echeck-payments-)\n * [Successful Payment](https://dev.recurly.com/page/webhooks#section-successful-payment)\n * [Manual Payment](https://dev.recurly.com/page/webhooks#section-manual-payment)\n * [Failed Payment](https://dev.recurly.com/page/webhooks#section-failed-payment)\n * [Successful Refund](https://dev.recurly.com/page/webhooks#section-successful-refund)\n * [Void Payment](https://dev.recurly.com/page/webhooks#section-void-payment)\n * [Fraud Info Updated](https://dev.recurly.com/page/webhooks#section-fraud-info-updated)\n\n* [Credit Payment Notifications](https://dev.recurly.com/page/webhooks#credit-payment-notifications) \n * [New Credit Payment](https://dev.recurly.com/page/webhooks#section-new-credit-payment)\n * [Voided Credit Payment](https://dev.recurly.com/page/webhooks#section-voided-credit-payment)\n\n* [Dunning Event Notifications](https://dev.recurly.com/page/webhooks#dunning-event-notifications) \n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Account Notifications\"\n}\n[/block]\n### New Account\n\nSent when a new account is created.\n\n```xml\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<new_account_notification>\n  <account>\n    <account_code>1</account_code>\n    <username nil=\"true\"></username>\n    <email>verena@example.com</email>\n    <first_name>Verena</first_name>\n    <last_name>Example</last_name>\n    <company_name nil=\"true\"></company_name>\n  </account>\n</new_account_notification>\n```\n\n### Updated Account\n\nSent when an account is updated. Specifically attributes in the account information, not the billing information, shipping addresses, or account acquisition. See the <a href=\"https://dev.recurly.com/docs/update-account\">Update Account</a> API call for a list of attributes.\n\n```xml\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<updated_account_notification>\n  <account>\n    <account_code>1</account_code>\n    <username nil=\"true\"></username>\n    <email>verena@example.com</email>\n    <first_name>Verena</first_name>\n    <last_name>Example</last_name>\n    <company_name nil=\"true\"></company_name>\n  </account>\n</updated_account_notification>\n```\n\n### Closed Account\n\nSent when an account is closed.\n\n```xml\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<canceled_account_notification>\n  <account>\n    <account_code>1</account_code>\n    <username nil=\"true\"></username>\n    <email>verena@example.com</email>\n    <first_name>Verena</first_name>\n    <last_name>Example</last_name>\n    <company_name nil=\"true\"></company_name>\n  </account>\n</canceled_account_notification>\n```\n\n### Updated Billing Information\n\nSent when billing information is successfully created with a credit card or updated with a credit card or token.\n\n```xml\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<billing_info_updated_notification>\n  <account>\n    <account_code>1</account_code>\n    <username nil=\"true\"></username>\n    <email>verena@example.com</email>\n    <first_name>Verena</first_name>\n    <last_name>Example</last_name>\n    <company_name nil=\"true\"></company_name>\n  </account>\n</billing_info_updated_notification>\n```\n\n### Failed Billing Information Update\n\nSent when an existing account unsuccessfully tries to update the billing information.\n\n```xml\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<billing_info_update_failed_notification>\n  <account>\n    <account_code>1</account_code>\n    <username nil=\"true\"></username>\n    <email>verena@example.com</email>\n    <first_name>Verena</first_name>\n    <last_name>Example</last_name>\n    <company_name nil=\"true\"></company_name>\n  </account>\n</billing_info_update_failed_notification>\n```\n\n### A new shipping address is created\n\n```xml\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<new_shipping_address_notification>\n  <account>\n    <account_code>SamSmith</account_code>\n    <username></username>\n    <email></email>\n    <first_name>Sam</first_name>\n    <last_name>Smith</last_name>\n    <company_name>Smith Co</company_name>\n    <phone></phone>\n  </account>\n  <shipping_address>\n    <id type=\"integer\">2019760742762202549</id>\n    <nickname>Steven</nickname>\n    <first_name>Steven</first_name>\n    <last_name>Smith</last_name>\n    <company_name></company_name>\n    <vat_number></vat_number>\n    <street1>231 Oregon Street</street1>\n    <street2></street2>\n    <city>Portland</city>\n    <state>OR</state>\n    <zip>97201</zip>\n    <country>US</country>\n    <email>stevensmith@example.com</email>\n    <phone></phone>\n  </shipping_address>\n</new_shipping_address_notification>\n```\n\n### An existing shipping address is edited\n\n```xml\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<updated_shipping_address_notification>\n  <account>\n    <account_code>SamSmith</account_code>\n    <username></username>\n    <email></email>\n    <first_name>Sam</first_name>\n    <last_name>Smith</last_name>\n    <company_name>Smith Co</company_name>\n    <phone></phone>\n  </account>\n  <shipping_address>\n    <id type=\"integer\">2019760742762202549</id>\n    <nickname>Steven</nickname>\n    <first_name>Steven</first_name>\n    <last_name>Smith</last_name>\n    <company_name></company_name>\n    <vat_number></vat_number>\n    <street1>231 Oregon Street</street1>\n    <street2></street2>\n    <city>Portland</city>\n    <state>OR</state>\n    <zip>97201</zip>\n    <country>US</country>\n    <email>stevensmith@example.com</email>\n    <phone></phone>\n  </shipping_address>\n</updated_shipping_address_notification>\n```\n\n### An existing shipping address is deleted\n\n```xml\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<deleted_shipping_address_notification>\n  <account>\n    <account_code>SamSmith</account_code>\n    <username></username>\n    <email></email>\n    <first_name>Sam</first_name>\n    <last_name>Smith</last_name>\n    <company_name>Smith Co</company_name>\n    <phone></phone>\n  </account>\n  <shipping_address>\n    <id type=\"integer\">2019760742762202549</id>\n    <nickname>Steven</nickname>\n    <first_name>Steven</first_name>\n    <last_name>Smith</last_name>\n    <company_name></company_name>\n    <vat_number></vat_number>\n    <street1>231 Oregon Street</street1>\n    <street2></street2>\n    <city>Portland</city>\n    <state>OR</state>\n    <zip>97201</zip>\n    <country>US</country>\n    <email>stevensmith@example.com</email>\n    <phone></phone>\n  </shipping_address>\n</deleted_shipping_address_notification>\n```\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Subscription Notifications\"\n}\n[/block]\nSubscriptions 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:\n*  add_on_type\n*  usage_percentage\n*  measured_unit_id\n\nIn addition, Subscription notifications will include information about shipping addresses when applicable: \n* id\n* nickname\n* first_name\n* last_name\n* company_name\n* vat_number\n* street1\n* street2\n* city\n* state\n* zip\n* country\n* email\n* phone\n\n### New Subscription\n\nSent when a new subscription is created.\n\n```\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<new_subscription_notification>\n  <account>\n    <account_code>1</account_code>\n    <username nil=\"true\">verena</username>\n    <email>verena@example.com</email>\n    <first_name>Verena</first_name>\n    <last_name>Example</last_name>\n    <company_name nil=\"true\">Company, Inc.</company_name>\n  </account>\n  <subscription>\n    <plan>\n      <plan_code>bronze</plan_code>\n      <name>Bronze Plan</name>\n    </plan>\n    <uuid>8047cb4fd5f874b14d713d785436ebd3</uuid>\n    <state>active</state>\n    <quantity type=\"integer\">2</quantity>\n    <total_amount_in_cents type=\"integer\">17000</total_amount_in_cents>\n    <subscription_add_ons type=\"array\">\n      <subscription_add_on>\n        <add_on_code>premium_support</add_on_code>\n        <name>Premium Support</name>\n        <quantity type=\"integer\">1</quantity>\n        <unit_amount_in_cents type=\"integer\">15000</unit_amount_in_cents>\n        <add_on_type>fixed</add_on_type>\n        <usage_percentage nil=\"true\"></usage_percentage>\n        <measured_unit_id nil=\"true\"></measured_unit_id>\n      </subscription_add_on>\n      <subscription_add_on>\n        <add_on_code>email_blasts</add_on_code>\n        <name>Email Blasts</name>\n        <quantity type=\"integer\">1</quantity>\n        <unit_amount_in_cents type=\"integer\">50</unit_amount_in_cents>\n        <add_on_type>usage</add_on_type>\n        <usage_percentage nil=\"true\"></usage_percentage>\n        <measured_unit_id type=\"integer\">394681687402874853</measured_unit_id>\n      </subscription_add_on>\n      <subscription_add_on>\n        <add_on_code>donations</add_on_code>\n        <name>Donations</name>\n        <quantity type=\"integer\">1</quantity>\n        <unit_amount_in_cents nil=\"true\"></unit_amount_in_cents>\n        <add_on_type>usage</add_on_type>\n        <usage_percentage>0.6</usage_percentage>\n        <measured_unit_id type=\"integer\">394681920153192422</measured_unit_id>\n      </subscription_add_on>\n    </subscription_add_ons>\n    <activated_at type=\"datetime\">2009-11-22T13:10:38Z</activated_at>\n    <canceled_at type=\"datetime\"></canceled_at>\n    <expires_at type=\"datetime\"></expires_at>\n    <current_period_started_at type=\"datetime\">2009-11-22T13:10:38Z</current_period_started_at>\n    <current_period_ends_at type=\"datetime\">2009-11-29T13:10:38Z</current_period_ends_at>\n    <trial_started_at type=\"datetime\">2009-11-22T13:10:38Z</trial_started_at>\n    <trial_ends_at type=\"datetime\">2009-11-29T13:10:38Z</trial_ends_at>\n    <collection_method>automatic</collection_method>\n  </subscription>\n</new_subscription_notification>\n```\n\n### Updated Subscription\n\nWhen 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.\n\n```\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<updated_subscription_notification>\n  <account>\n    <account_code>1</account_code>\n    <username nil=\"true\"></username>\n    <email>verena@example.com</email>\n    <first_name>Verena</first_name>\n    <last_name>Example</last_name>\n    <company_name nil=\"true\"></company_name>\n  </account>\n  <subscription>\n    <plan>\n      <plan_code>1dpt</plan_code>\n      <name>Subscription One</name>\n    </plan>\n    <uuid>292332928954ca62fa48048be5ac98ec</uuid>\n    <state>active</state>\n    <quantity type=\"integer\">1</quantity>\n    <total_amount_in_cents type=\"integer\">200</total_amount_in_cents>\n    <subscription_add_ons type=\"array\"/>\n    <activated_at type=\"datetime\">2010-09-23T22:12:39Z</activated_at>\n    <canceled_at nil=\"true\" type=\"datetime\"></canceled_at>\n    <expires_at nil=\"true\" type=\"datetime\"></expires_at>\n    <current_period_started_at type=\"datetime\">2010-09-23T22:03:30Z</current_period_started_at>\n    <current_period_ends_at type=\"datetime\">2010-09-24T22:03:30Z</current_period_ends_at>\n    <trial_started_at nil=\"true\" type=\"datetime\">\n    </trial_started_at>\n    <trial_ends_at nil=\"true\" type=\"datetime\">\n    </trial_ends_at>\n    <collection_method>automatic</collection_method>\n  </subscription>\n</updated_subscription_notification>\n```\n\n### Canceled Subscription\n\nThe `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.\n\n```\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<canceled_subscription_notification>\n  <account>\n    <account_code>1</account_code>\n    <username nil=\"true\"></username>\n    <email>verena@example.com</email>\n    <first_name>Verena</first_name>\n    <last_name>Example</last_name>\n    <company_name nil=\"true\"></company_name>\n  </account>\n  <subscription>\n    <plan>\n      <plan_code>1dpt</plan_code>\n      <name>Subscription One</name>\n    </plan>\n    <uuid>dccd742f4710e78515714d275839f891</uuid>\n    <state>canceled</state>\n    <quantity type=\"integer\">1</quantity>\n    <total_amount_in_cents type=\"integer\">200</total_amount_in_cents>\n    <subscription_add_ons type=\"array\"/>\n    <activated_at type=\"datetime\">2010-09-23T22:05:03Z</activated_at>\n    <canceled_at type=\"datetime\">2010-09-23T22:05:43Z</canceled_at>\n    <expires_at type=\"datetime\">2010-09-24T22:05:03Z</expires_at>\n    <current_period_started_at type=\"datetime\">2010-09-23T22:05:03Z</current_period_started_at>\n    <current_period_ends_at type=\"datetime\">2010-09-24T22:05:03Z</current_period_ends_at>\n    <trial_started_at nil=\"true\" type=\"datetime\"></trial_started_at>\n    <trial_ends_at nil=\"true\" type=\"datetime\"></trial_ends_at>\n    <collection_method>automatic</collection_method>\n  </subscription>\n</canceled_subscription_notification>\n```\n\n### Expired Subscription\n\nThe `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.\n\n```\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<expired_subscription_notification>\n  <account>\n    <account_code>1</account_code>\n    <username nil=\"true\"></username>\n    <email>verena@example.com</email>\n    <first_name>Verena</first_name>\n    <last_name>Example</last_name>\n    <company_name nil=\"true\"></company_name>\n  </account>\n  <subscription>\n    <plan>\n      <plan_code>1dpt</plan_code>\n      <name>Subscription One</name>\n    </plan>\n    <uuid>d1b6d359a01ded71caed78eaa0fedf8e</uuid>\n    <state>expired</state>\n    <quantity type=\"integer\">1</quantity>\n    <total_amount_in_cents type=\"integer\">200</total_amount_in_cents>\n    <subscription_add_ons type=\"array\"/>\n    <activated_at type=\"datetime\">2010-09-23T22:05:03Z</activated_at>\n    <canceled_at type=\"datetime\">2010-09-23T22:05:43Z</canceled_at>\n    <expires_at type=\"datetime\">2010-09-24T22:05:03Z</expires_at>\n    <current_period_started_at type=\"datetime\">2010-09-23T22:05:03Z</current_period_started_at>\n    <current_period_ends_at type=\"datetime\">2010-09-24T22:05:03Z</current_period_ends_at>\n    <trial_started_at nil=\"true\" type=\"datetime\">\n    </trial_started_at><trial_ends_at nil=\"true\" type=\"datetime\"></trial_ends_at>\n    <collection_method>automatic</collection_method>\n  </subscription>\n</expired_subscription_notification>\n```\n\n### Renewed Subscription\n\nThe `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.\n\n```\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<renewed_subscription_notification>\n  <account>\n    <account_code>1</account_code>\n    <username nil=\"true\"></username>\n    <email>verena@example.com</email>\n    <first_name>Verena</first_name>\n    <last_name>Example</last_name>\n    <company_name nil=\"true\"></company_name>\n  </account>\n  <subscription>\n    <plan>\n      <plan_code>bootstrap</plan_code>\n      <name>Bootstrap</name>\n    </plan>\n    <uuid>6ab458a887d38070807ebb3bed7ac1e5</uuid>\n    <state>active</state>\n    <quantity type=\"integer\">1</quantity>\n    <total_amount_in_cents type=\"integer\">9900</total_amount_in_cents>\n    <subscription_add_ons type=\"array\"/>\n    <activated_at type=\"datetime\">2010-07-22T20:42:05Z</activated_at>\n    <canceled_at nil=\"true\" type=\"datetime\"></canceled_at>\n    <expires_at nil=\"true\" type=\"datetime\"></expires_at>\n    <current_period_started_at type=\"datetime\">2010-09-22T20:42:05Z</current_period_started_at>\n    <current_period_ends_at type=\"datetime\">2010-10-22T20:42:05Z</current_period_ends_at>\n    <trial_started_at nil=\"true\" type=\"datetime\"></trial_started_at>\n    <trial_ends_at nil=\"true\" type=\"datetime\"></trial_ends_at>\n    <collection_method>automatic</collection_method>\n  </subscription>\n</renewed_subscription_notification>\n```\n\n\n### Reactivated Subscription\n\nSent when a subscription is reactivated after having been canceled. Note that while the webhooks is called the \"reactiveated_account_notification\" this is actually sent when a *subscription* is reactivated. \n\n```xml\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<reactivated_account_notification>\n  <account>\n    <account_code>1</account_code>\n    <username nil=\"true\"></username>\n    <email>verena@example.com</email>\n    <first_name>Verena</first_name>\n    <last_name>Example</last_name>\n    <company_name nil=\"true\"></company_name>\n  </account>\n  <subscription>\n    <plan>\n      <plan_code>bootstrap</plan_code>\n      <name>Bootstrap</name>\n    </plan>\n    <uuid>6ab458a887d38070807ebb3bed7ac1e5</uuid>\n    <state>active</state>\n    <quantity type=\"integer\">1</quantity>\n    <total_amount_in_cents type=\"integer\">9900</total_amount_in_cents>\n    <subscription_add_ons type=\"array\"/>\n    <activated_at type=\"datetime\">2010-07-22T20:42:05Z</activated_at>\n    <canceled_at nil=\"true\" type=\"datetime\"></canceled_at>\n    <expires_at nil=\"true\" type=\"datetime\"></expires_at>\n    <current_period_started_at type=\"datetime\">2010-09-22T20:42:05Z</current_period_started_at>\n    <current_period_ends_at type=\"datetime\">2010-10-22T20:42:05Z</current_period_ends_at>\n    <trial_started_at nil=\"true\" type=\"datetime\"></trial_started_at>\n    <trial_ends_at nil=\"true\" type=\"datetime\"></trial_ends_at>\n    <collection_method>automatic</collection_method>\n  </subscription>\n</reactivated_account_notification>\n```\n\n### Paused Subscription\n\nThe `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.*\n\n```xml\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<subscription_paused_notification>\n  <account>\n    <account_code>1</account_code>\n    <username>test-user</username>\n    <email>test+2605@recurly.com</email>\n    <first_name>test</first_name>\n    <last_name>test-last</last_name>\n    <company_name>Recurly, Inc.</company_name>\n    <phone>555-1212</phone>\n  </account>\n  <subscription>\n    <plan>\n      <plan_code>daily_plan</plan_code>\n      <name>daily_plan</name>\n    </plan>\n    <uuid>437a818b9dba81065e444448de931842</uuid>\n    <state>paused</state>\n    <quantity type=\"integer\">10</quantity>\n    <total_amount_in_cents type=\"integer\">10000</total_amount_in_cents>\n    <subscription_add_ons type=\"array\"/>\n    <activated_at type=\"datetime\">2018-03-09T17:01:59Z</activated_at>\n    <canceled_at type=\"datetime\" nil=\"true\"></canceled_at>\n    <expires_at type=\"datetime\" nil=\"true\"></expires_at>\n    <current_period_started_at type=\"datetime\">2018-03-10T22:12:08Z</current_period_started_at>\n    <current_period_ends_at type=\"datetime\">2018-03-11T22:12:08Z</current_period_ends_at>\n    <trial_started_at type=\"datetime\" nil=\"true\"></trial_started_at>\n    <trial_ends_at type=\"datetime\" nil=\"true\"></trial_ends_at>\n    <paused_at type=\"datetime\">2018-03-10T22:12:08Z</paused_at>\n    <resume_at type=\"datetime\">2018-03-20T22:12:08Z</resume_at>\n    <remaining_pause_cycles type=\"integer\">9</remaining_pause_cycles>\n  </subscription>\n</subscription_paused_notification>\n```\n\n### Resumed Subscription\n\nThe `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.*\n```xml\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<subscription_resumed_notification>\n  <account>\n    <account_code>1</account_code>\n    <username>test-user</username>\n    <email>test+2605@recurly.com</email>\n    <first_name>test</first_name>\n    <last_name>test-last</last_name>\n    <company_name>Recurly, Inc.</company_name>\n    <phone>555-1212</phone>\n  </account>\n  <subscription>\n    <plan>\n      <plan_code>daily_plan</plan_code>\n      <name>daily_plan</name>\n    </plan>\n    <uuid>437a818b9dba81065e444448de931842</uuid>\n    <state>active</state>\n    <quantity type=\"integer\">10</quantity>\n    <total_amount_in_cents type=\"integer\">10000</total_amount_in_cents>\n    <subscription_add_ons type=\"array\"/>\n    <activated_at type=\"datetime\">2018-03-09T17:01:59Z</activated_at>\n    <canceled_at type=\"datetime\" nil=\"true\"></canceled_at>\n    <expires_at type=\"datetime\" nil=\"true\"></expires_at>\n    <current_period_started_at type=\"datetime\">2018-03-20T17:50:27Z</current_period_started_at>\n    <current_period_ends_at type=\"datetime\">2018-03-21T17:50:27Z</current_period_ends_at>\n    <trial_started_at type=\"datetime\" nil=\"true\"></trial_started_at>\n    <trial_ends_at type=\"datetime\" nil=\"true\"></trial_ends_at>\n    <paused_at type=\"datetime\" nil=\"true\"></paused_at>\n    <resume_at type=\"datetime\" nil=\"true\"></resume_at>\n    <remaining_pause_cycles nil=\"true\"></remaining_pause_cycles>\n  </subscription>\n</subscription_resumed_notification>\n```\n\n### Scheduled Subscription Pause\n\nThe `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.*\n\n```xml\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<scheduled_subscription_pause_notification>\n  <account>\n    <account_code>1</account_code>\n    <username>test-user</username>\n    <email>test+2605@recurly.com</email>\n    <first_name>test</first_name>\n    <last_name>test-last</last_name>\n    <company_name>Recurly, Inc.</company_name>\n    <phone>555-1212</phone>\n  </account>\n  <subscription>\n    <plan>\n      <plan_code>4ec9adacbc37be072f0d6e2d1affc538</plan_code>\n      <name>Aut Fugiat Officia 6eae19a51 plan</name>\n    </plan>\n    <uuid>437b9def1c442e659f90f4416086dd66</uuid>\n    <state>active</state>\n    <quantity type=\"integer\">1</quantity>\n    <total_amount_in_cents type=\"integer\">709</total_amount_in_cents>\n    <subscription_add_ons type=\"array\"/>\n    <activated_at type=\"datetime\">2018-03-09T22:12:36Z</activated_at>\n    <canceled_at type=\"datetime\" nil=\"true\"></canceled_at>\n    <expires_at type=\"datetime\" nil=\"true\"></expires_at>\n    <current_period_started_at type=\"datetime\">2018-03-09T22:12:36Z</current_period_started_at>\n    <current_period_ends_at type=\"datetime\">2019-03-09T22:12:36Z</current_period_ends_at>\n    <trial_started_at type=\"datetime\" nil=\"true\"></trial_started_at>\n    <trial_ends_at type=\"datetime\" nil=\"true\"></trial_ends_at>\n    <paused_at type=\"datetime\">2019-03-09T22:12:36Z</paused_at>\n    <resume_at type=\"datetime\">2024-03-09T22:12:36Z</resume_at>\n    <remaining_pause_cycles type=\"integer\">5</remaining_pause_cycles>\n  </subscription>\n</scheduled_subscription_pause_notification>\n```\n\n### Subscription Paused Modified\n\nThe `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.*\n\n```xml\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<subscription_pause_modified_notification>\n  <account>\n    <account_code>1</account_code>\n    <username>test-user</username>\n    <email>test+2605@recurly.com</email>\n    <first_name>test</first_name>\n    <last_name>test-last</last_name>\n    <company_name>Recurly, Inc.</company_name>\n    <phone>555-1212</phone>\n  </account>\n  <subscription>\n    <plan>\n      <plan_code>4ec9adacbc37be072f0d6e2d1affc538</plan_code>\n      <name>Aut Fugiat Officia 6eae19a51 plan</name>\n    </plan>\n    <uuid>437a818b9dba81065e444448de931842</uuid>\n    <state>active</state>\n    <quantity type=\"integer\">1</quantity>\n    <total_amount_in_cents type=\"integer\">709</total_amount_in_cents>\n    <subscription_add_ons type=\"array\"/>\n    <activated_at type=\"datetime\">2018-03-09T17:01:59Z</activated_at>\n    <canceled_at type=\"datetime\" nil=\"true\"></canceled_at>\n    <expires_at type=\"datetime\" nil=\"true\"></expires_at>\n    <current_period_started_at type=\"datetime\">2018-03-09T13:33:09Z</current_period_started_at>\n    <current_period_ends_at type=\"datetime\">2018-03-09T13:38:22Z</current_period_ends_at>\n    <trial_started_at type=\"datetime\" nil=\"true\"></trial_started_at>\n    <trial_ends_at type=\"datetime\" nil=\"true\"></trial_ends_at>\n    <paused_at type=\"datetime\">2018-03-09T13:38:22Z</paused_at>\n    <resume_at type=\"datetime\">2023-03-09T13:38:22Z</resume_at>\n    <remaining_pause_cycles type=\"integer\">5</remaining_pause_cycles>\n  </subscription>\n</subscription_pause_modified_notification>\n```\n\n### Paused Subscription Renewal\n\nThe `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.*\n\n```xml\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<paused_subscription_renewal_notification>\n  <account>\n    <account_code>1</account_code>\n    <username>test-user</username>\n    <email>test+2605@recurly.com</email>\n    <first_name>test</first_name>\n    <last_name>test-last</last_name>\n    <company_name>Recurly, Inc.</company_name>\n    <phone>555-1212</phone>\n  </account>\n  <subscription>\n    <plan>\n      <plan_code>daily_plan</plan_code>\n      <name>daily_plan</name>\n    </plan>\n    <uuid>437a818b9dba81065e444448de931842</uuid>\n    <state>paused</state>\n    <quantity type=\"integer\">10</quantity>\n    <total_amount_in_cents type=\"integer\">10000</total_amount_in_cents>\n    <subscription_add_ons type=\"array\"/>\n    <activated_at type=\"datetime\">2018-03-09T17:01:59Z</activated_at>\n    <canceled_at type=\"datetime\" nil=\"true\"></canceled_at>\n    <expires_at type=\"datetime\" nil=\"true\"></expires_at>\n    <current_period_started_at type=\"datetime\">2018-03-18T17:50:27Z</current_period_started_at>\n    <current_period_ends_at type=\"datetime\">2018-03-19T17:50:27Z</current_period_ends_at>\n    <trial_started_at type=\"datetime\" nil=\"true\"></trial_started_at>\n    <trial_ends_at type=\"datetime\" nil=\"true\"></trial_ends_at>\n    <paused_at type=\"datetime\">2018-03-10T22:12:08Z</paused_at>\n    <resume_at type=\"datetime\">2018-03-20T17:50:27Z</resume_at>\n    <remaining_pause_cycles type=\"integer\">1</remaining_pause_cycles>\n  </subscription>\n</paused_subscription_renewal_notification>\n```\n\n### Subscription Pause Canceled\n\nThe `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.*\n\n```xml\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<subscription_pause_canceled_notification>\n  <account>\n    <account_code>1</account_code>\n    <username>test-user</username>\n    <email>test+2605@recurly.com</email>\n    <first_name>test</first_name>\n    <last_name>test-last</last_name>\n    <company_name>Recurly, Inc.</company_name>\n    <phone>555-1212</phone>\n  </account>\n  <subscription>\n    <plan>\n      <plan_code>4ec9adacbc37be072f0d6e2d1affc538</plan_code>\n      <name>Aut Fugiat Officia 6eae19a51 plan</name>\n    </plan>\n    <uuid>437b9def1c442e659f90f4416086dd66</uuid>\n    <state>active</state>\n    <quantity type=\"integer\">1</quantity>\n    <total_amount_in_cents type=\"integer\">2000</total_amount_in_cents>\n    <subscription_add_ons type=\"array\"/>\n    <activated_at type=\"datetime\">2018-03-09T22:12:36Z</activated_at>\n    <canceled_at type=\"datetime\" nil=\"true\"></canceled_at>\n    <expires_at type=\"datetime\" nil=\"true\"></expires_at>\n    <current_period_started_at type=\"datetime\">2018-03-09T22:12:36Z</current_period_started_at>\n    <current_period_ends_at type=\"datetime\">2019-03-09T22:12:36Z</current_period_ends_at>\n    <trial_started_at type=\"datetime\" nil=\"true\"></trial_started_at>\n    <trial_ends_at type=\"datetime\" nil=\"true\"></trial_ends_at>\n    <paused_at type=\"datetime\" nil=\"true\"></paused_at>\n    <resume_at type=\"datetime\" nil=\"true\"></resume_at>\n    <remaining_pause_cycles nil=\"true\"></remaining_pause_cycles>\n  </subscription>\n</subscription_pause_canceled_notification>\n```\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Usage Notifications\"\n}\n[/block]\n### New Usage\n\nA `new_usage_notification` is sent when we create a usage record on your behalf in a refund or terminate scenario.\n\n```\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<new_usage_notification>\n  <account>\n    <account_code>923845792374</account_code>\n    <username></username>\n    <email></email>\n    <first_name></first_name>\n    <last_name></last_name>\n    <company_name></company_name>\n  </account>\n  <usage>\n    <id type=\"integer\">394729929104688227</id>\n    <subscription_id>35cda8d4ae0a214f69779e4ddbbc2ebd</subscription_id>\n    <add_on_code>video_storage</add_on_code>\n    <measured_unit_id type=\"integer\">394681920153192422</measured_unit_id>\n    <amount type=\"integer\">-40</amount>\n    <merchant_tag nil=\"true\"></merchant_tag>\n    <recording_timestamp type=\"datetime\">2016-04-28T21:57:53+00:00</recording_timestamp>\n    <usage_timestamp type=\"datetime\">2016-04-28T21:57:53+00:00</usage_timestamp>\n    <created_at type=\"datetime\">2016-04-28T21:57:54+00:00</created_at>\n    <modified_at type=\"datetime\" nil=\"true\"></modified_at>\n    <billed_at type=\"datetime\">2016-04-28T21:57:54+00:00</billed_at>\n    <usage_type>PRICE</usage_type>\n    <unit_amount_in_cents nil=\"true\">50</unit_amount_in_cents>\n    <usage_percentage type=\"float\"></usage_percentage>\n  </usage>\n</new_usage_notification>\n```\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Gift Card Notifications\"\n}\n[/block]\n### Purchased Gift Card\n\nA `purchased_gift_card_notification` is sent when a gift card is purchased by a gifter.\n\n```\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<purchased_gift_card_notification>\n  <gift_card>\n    <redemption_code>1A5069E266AED435</redemption_code>\n    <id type=\"integer\">2008976331180115114</id>\n    <product_code>gift_card</product_code>\n    <unit_amount_in_cents type=\"integer\">1000</unit_amount_in_cents>\n    <currency>USD</currency>\n    <gifter_account_code>84395</gifter_account_code>\n    <recipient_account_code nil=\"true\"></recipient_account_code>\n    <invoice_number type=\"integer\">1105</invoice_number>\n    <delivery>\n      <method>email</method>\n      <email_address>john@example.com</email_address>\n      <deliver_at nil=\"true\"></deliver_at>\n      <first_name>John</first_name>\n      <last_name>Smith</last_name>\n      <address>\n        <address1 nil=\"true\"></address1>\n        <address2 nil=\"true\"></address2>\n        <city nil=\"true\"></city>\n        <state nil=\"true\"></state>\n        <zip nil=\"true\"></zip>\n        <country nil=\"true\"></country>\n        <phone nil=\"true\"></phone>\n      </address>\n      <gifter_name>Sally</gifter_name>\n      <personal_message>\n        Hi John, Happy Birthday! I hope you have a great day! Love, Sally</personal_message>\n    </delivery>\n    <created_at type=\"datetime\">2016-08-03T20:37:21Z</created_at>\n    <updated_at type=\"datetime\">2016-08-03T20:37:21Z</updated_at>\n    <delivered_at type=\"datetime\" nil=\"true\"></delivered_at>\n    <redeemed_at type=\"datetime\" nil=\"true\"></redeemed_at>\n    <canceled_at type=\"datetime\" nil=\"true\"></canceled_at>\n  </gift_card>\n</purchased_gift_card_notification>\n```\n\n### Canceled Gift Card\n\nA `canceled_gift_card_notification` is sent when you cancel a gift card from the Admin Console.\n\n```\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<canceled_gift_card_notification>\n  <gift_card>\n    <redemption_code>1A5069E266AED435</redemption_code>\n    <id type=\"integer\">2008976331180115114</id>\n    <product_code>gift_card</product_code>\n    <unit_amount_in_cents type=\"integer\">1000</unit_amount_in_cents>\n    <currency>USD</currency>\n    <gifter_account_code>84395</gifter_account_code>\n    <recipient_account_code nil=\"true\"></recipient_account_code>\n    <invoice_number type=\"integer\">1105</invoice_number>\n    <delivery>\n      <method>email</method>\n      <email_address>john@example.com</email_address>\n      <deliver_at nil=\"true\"></deliver_at>\n      <first_name>John</first_name>\n      <last_name>Smith</last_name>\n      <address>\n        <address1 nil=\"true\"></address1>\n        <address2 nil=\"true\"></address2>\n        <city nil=\"true\"></city>\n        <state nil=\"true\"></state>\n        <zip nil=\"true\"></zip>\n        <country nil=\"true\"></country>\n        <phone nil=\"true\"></phone>\n      </address>\n      <gifter_name>Sally</gifter_name>\n      <personal_message>\n        Hi John, Happy Birthday! I hope you have a great day! Love, Sally</personal_message>\n    </delivery>\n    <created_at type=\"datetime\">2016-08-03T20:37:21Z</created_at>\n    <updated_at type=\"datetime\">2016-08-03T22:00:00Z</updated_at>\n    <delivered_at type=\"datetime\">2016-08-03T20:37:22Z</delivered_at>\n    <redeemed_at type=\"datetime\" nil=\"true\"></redeemed_at>\n    <canceled_at type=\"datetime\">2016-08-04T20:30:22Z</canceled_at>\n  </gift_card>\n</canceled_gift_card_notification>\n```\n\n### Updated Gift Card\n\nAn `updated_gift_card_notification` is sent when you edit a gift card's delivery information from the Admin Console.\n\n```\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<updated_gift_card_notification>\n  <gift_card>\n    <redemption_code>1A5069E266AED435</redemption_code>\n    <id type=\"integer\">2008976331180115114</id>\n    <product_code>gift_card</product_code>\n    <unit_amount_in_cents type=\"integer\">1000</unit_amount_in_cents>\n    <currency>USD</currency>\n    <gifter_account_code>84395</gifter_account_code>\n    <recipient_account_code nil=\"true\"></recipient_account_code>\n    <invoice_number type=\"integer\">1105</invoice_number>\n    <delivery>\n      <method>email</method>\n      <email_address>john@example.com</email_address>\n      <deliver_at nil=\"true\"></deliver_at>\n      <first_name>John</first_name>\n      <last_name>Smith</last_name>\n      <address>\n        <address1 nil=\"true\"></address1>\n        <address2 nil=\"true\"></address2>\n        <city nil=\"true\"></city>\n        <state nil=\"true\"></state>\n        <zip nil=\"true\"></zip>\n        <country nil=\"true\"></country>\n        <phone nil=\"true\"></phone>\n      </address>\n      <gifter_name>Sally</gifter_name>\n      <personal_message>\n        Hi John, Happy Birthday! I hope you have a great day! Love, Sally</personal_message>\n    </delivery>\n    <created_at type=\"datetime\">2016-08-03T20:37:21Z</created_at>\n    <updated_at type=\"datetime\">2016-08-03T22:00:00Z</updated_at>\n    <delivered_at type=\"datetime\">2016-08-03T20:37:22Z</delivered_at>\n    <redeemed_at type=\"datetime\" nil=\"true\"></redeemed_at>\n    <canceled_at type=\"datetime\" nil=\"true\"></canceled_at>\n  </gift_card>\n</updated_gift_card_notification>\n```\n\n### Regenerated Gift Card\n\nA `regenerated_gift_card_notification` is sent when you regenerate a gift card's redemption code from the Admin Console.\n\n```\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<regenerated_gift_card_notification>\n  <gift_card>\n    <redemption_code>1A5069E266AED435</redemption_code>\n    <id type=\"integer\">2008976331180115114</id>\n    <product_code>gift_card</product_code>\n    <unit_amount_in_cents type=\"integer\">1000</unit_amount_in_cents>\n    <currency>USD</currency>\n    <gifter_account_code>84395</gifter_account_code>\n    <recipient_account_code nil=\"true\"></recipient_account_code>\n    <invoice_number type=\"integer\">1105</invoice_number>\n    <delivery>\n      <method>email</method>\n      <email_address>john@example.com</email_address>\n      <deliver_at nil=\"true\"></deliver_at>\n      <first_name>John</first_name>\n      <last_name>Smith</last_name>\n      <address>\n        <address1 nil=\"true\"></address1>\n        <address2 nil=\"true\"></address2>\n        <city nil=\"true\"></city>\n        <state nil=\"true\"></state>\n        <zip nil=\"true\"></zip>\n        <country nil=\"true\"></country>\n        <phone nil=\"true\"></phone>\n      </address>\n      <gifter_name>Sally</gifter_name>\n      <personal_message>\n        Hi John, Happy Birthday! I hope you have a great day! Love, Sally</personal_message>\n    </delivery>\n    <created_at type=\"datetime\">2016-08-03T20:37:21Z</created_at>\n    <updated_at type=\"datetime\">2016-08-03T22:00:00Z</updated_at>\n    <delivered_at type=\"datetime\">2016-08-03T20:37:22Z</delivered_at>\n    <redeemed_at type=\"datetime\" nil=\"true\"></redeemed_at>\n    <canceled_at type=\"datetime\" nil=\"true\"></canceled_at>\n  </gift_card>\n</regenerated_gift_card_notification>\n```\n\n### Redeemed Gift Card\n\nA `redeemed_gift_card_notification` is sent when a gift card is redeemed by a recipient.\n\n```\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<redeemed_gift_card_notification>\n  <gift_card>\n    <redemption_code>AB54200960E33C93</redemption_code>\n    <id type=\"integer\">2005384587788419212</id>\n    <product_code>gift_card</product_code>\n    <unit_amount_in_cents type=\"integer\">1000</unit_amount_in_cents>\n    <currency>USD</currency>\n    <gifter_account_code>3543456</gifter_account_code>\n    <recipient_account_code>3547000</recipient_account_code>\n    <invoice_number type=\"integer\">1099</invoice_number>\n    <delivery>\n      <method>email</method>\n      <email_address nil=\"true\"></email_address>\n      <deliver_at nil=\"true\"></deliver_at>\n      <first_name>John</first_name>\n      <last_name>Smith</last_name>\n      <address>\n        <address1 nil=\"true\"></address1>\n        <address2 nil=\"true\"></address2>\n        <city nil=\"true\"></city>\n        <state nil=\"true\"></state>\n        <zip nil=\"true\"></zip>\n        <country nil=\"true\"></country>\n        <phone nil=\"true\"></phone>\n      </address>\n      <gifter_name>Sally</gifter_name>\n      <personal_message>\n        Hi John, Happy Birthday! I hope you have a great day! Love, Sally</personal_message>\n    </delivery>\n    <created_at type=\"datetime\">2016-07-29T21:41:11Z</created_at>\n    <updated_at type=\"datetime\">2016-07-29T21:50:38Z</updated_at>\n    <delivered_at type=\"datetime\">2016-07-29T21:50:38Z</delivered_at>\n    <redeemed_at type=\"datetime\">2016-07-29T21:50:38Z</redeemed_at>\n    <canceled_at type=\"datetime\" nil=\"true\"></canceled_at>\n  </gift_card>\n</redeemed_gift_card_notification>\n```\n\n### Updated Balance Gift Card\n\nAn `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.\n\n```\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<updated_balance_gift_card_notification>\n  <gift_card>\n    <redemption_code>AB54200960E33C93</redemption_code>\n    <id type=\"integer\">2005384587788419212</id>\n    <product_code>gift_card</product_code>\n    <unit_amount_in_cents type=\"integer\">1000</unit_amount_in_cents>\n    <currency>USD</currency>\n    <gifter_account_code>3543456</gifter_account_code>\n    <recipient_account_code>3547000</recipient_account_code>\n    <invoice_number type=\"integer\">1099</invoice_number>\n    <delivery>\n      <method>email</method>\n      <email_address nil=\"true\"></email_address>\n      <deliver_at nil=\"true\"></deliver_at>\n      <first_name>John</first_name>\n      <last_name>Smith</last_name>\n      <address>\n        <address1 nil=\"true\"></address1>\n        <address2 nil=\"true\"></address2>\n        <city nil=\"true\"></city>\n        <state nil=\"true\"></state>\n        <zip nil=\"true\"></zip>\n        <country nil=\"true\"></country>\n        <phone nil=\"true\"></phone>\n      </address>\n      <gifter_name>Sally</gifter_name>\n      <personal_message>\n        Hi John, Happy Birthday! I hope you have a great day! Love, Sally</personal_message>\n    </delivery>\n    <created_at type=\"datetime\">2016-07-29T21:41:11Z</created_at>\n    <updated_at type=\"datetime\">2016-08-02T23:50:38Z</updated_at>\n    <delivered_at type=\"datetime\">2016-07-29T21:50:38Z</delivered_at>\n    <redeemed_at type=\"datetime\">2016-07-29T21:50:38Z</redeemed_at>\n    <canceled_at type=\"datetime\" nil=\"true\"></canceled_at>\n    <balance_in_cents type=\"integer\">200</balance_in_cents>\n  </gift_card>\n</updated_balance_gift_card_notification>\n```\n[block:api-header]\n{\n  \"title\": \"Charge Invoice Notifications\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"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>\"\n}\n[/block]\n### New Charge Invoice\nThe 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.\n\n### Processing Charge Invoice\nThe processing_charge_invoice notification is sent when a charge invoice moves into a processing state due to a processing bank account (ACH) payment.\n\n### Past Due Charge Invoice\nThe 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.\n\n### Paid Charge Invoice\nThe 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.\n\n### Failed Charge Invoice\nThe 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.\n\n### Reopened Charge Invoice\nThe reopened_charge_invoice 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.\n\n### Charge Invoice Schema\n```\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<new_charge_invoice_notification>\n  <account>\n    <account_code>1234</account_code>\n    <username></username>\n    <email></email>\n    <first_name></first_name>\n    <last_name></last_name>\n    <company_name></company_name>\n    <phone></phone>\n  </account>\n  <invoice>\n    <uuid>42feb03ce368c0e1ead35d4bfa89b82e</uuid>\n    <state>pending</state>\n    <origin type=\"symbol\">renewal</origin>\n    <invoice_number_prefix></invoice_number_prefix>\n    <invoice_number type=\"integer\">2405</invoice_number>\n    <address>\n      <address1></address1>\n      <address2></address2>\n      <city></city>\n      <state></state>\n      <zip></zip>\n      <country></country>\n      <phone></phone>\n    </address>\n    <vat_number></vat_number>\n    <currency>USD</currency>\n    <balance_in_cents type=\"integer\">100000</balance_in_cents>\n    <total_in_cents type=\"integer\">100000</total_in_cents>\n    <tax_in_cents type=\"integer\">0</tax_in_cents>\n    <subtotal_in_cents type=\"integer\">100000</subtotal_in_cents>\n    <subtotal_before_discount_in_cents type=\"integer\">100000</subtotal_before_discount_in_cents>\n    <discount_in_cents type=\"integer\">0</discount_in_cents>\n    <subscription_ids type=\"array\">\n      <subscription_id>40b8f5e99df03b8684b99d4993b6e089</subscription_id>\n    </subscription_ids>\n    <customer_notes>Thanks for your business!</customer_notes>\n    <created_at type=\"datetime\">2018-02-13T16:00:04Z</created_at>\n    <updated_at type=\"datetime\">2018-02-13T16:00:04Z</updated_at>\n    <closed_at type=\"datetime\" nil=\"true\"></closed_at>\n    <po_number></po_number>\n    <terms_and_conditions>Payment can be made out to Acme, Co.</terms_and_conditions>\n    <due_on type=\"dateTime\">2018-03-16T15:00:04Z</due_on>\n    <net_terms type=\"integer\">30</net_terms>\n    <collection_method>manual</collection_method>\n  </invoice>\n</new_charge_invoice_notification>\n```\n[block:api-header]\n{\n  \"title\": \"Credit Invoice Notifications\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"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>\"\n}\n[/block]\n### New Credit Invoice\nThe 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.\n\n### Processing Credit Invoice\nThe 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.\n\n### Closed Credit Invoice\nThe 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.\n\n### Voided Credit Invoice\nThe voided_credit_invoice notification is sent when a credit invoice moves to a voided state due to the full balance being removed.\n\n### Reopened Credit Invoice\nThe 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.\n\n### Open Credit Invoice\nWhen 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.\n\n### Credit Invoice Schema\n```\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<new_credit_invoice_notification>\n  <account>\n    <account_code>1234</account_code>\n    <username></username>\n    <email></email>\n    <first_name></first_name>\n    <last_name></last_name>\n    <company_name></company_name>\n    <phone></phone>\n  </account>\n  <invoice>\n    <uuid>42fb74de65e9395eb004614144a7b91f</uuid>\n    <state>closed</state>\n    <origin type=\"symbol\">write_off</origin>\n    <invoice_number_prefix></invoice_number_prefix>\n    <invoice_number type=\"integer\">2404</invoice_number>\n    <address>\n      <address1>123 Main St.</address1>\n      <address2></address2>\n      <city>San Francisco</city>\n      <state>CA</state>\n      <zip>94110</zip>\n      <country>US</country>\n      <phone></phone>\n    </address>\n    <vat_number></vat_number>\n    <currency>USD</currency>\n    <balance_in_cents type=\"integer\">0</balance_in_cents>\n    <total_in_cents type=\"integer\">-4882</total_in_cents>\n    <tax_in_cents type=\"integer\">-382</tax_in_cents>\n    <subtotal_in_cents type=\"integer\">-4500</subtotal_in_cents>\n    <subtotal_before_discount_in_cents type=\"integer\">-5000</subtotal_before_discount_in_cents>\n    <discount_in_cents type=\"integer\">-500</discount_in_cents>\n    <subscription_ids type=\"array\">\n      <subscription_id>42fb74ba9efe4c6981c2064436a4e9cd</subscription_id>\n    </subscription_ids>\n    <customer_notes nil=\"true\"></customer_notes>\n    <created_at type=\"datetime\">2018-02-13T00:56:22Z</created_at>\n    <updated_at type=\"datetime\">2018-02-13T00:56:22Z</updated_at>\n    <closed_at type=\"datetime\">2018-02-13T00:56:21Z</closed_at>\n  </invoice>\n</new_credit_invoice_notification>\n```\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Invoice Notifications\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"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.\"\n}\n[/block]\nAll 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.\n\n### New Invoice\n\nIf a new invoice is generated, a `new_invoice_notification` is sent.\n\n```xml\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<new_invoice_notification>\n  <account>\n    <account_code>1</account_code>\n    <username nil=\"true\"></username>\n    <email>verena@example.com</email>\n    <first_name>Verana</first_name>\n    <last_name>Example</last_name>\n    <company_name nil=\"true\"></company_name>\n  </account>\n  <invoice>\n    <uuid>ffc64d71d4b5404e93f13aac9c63b007</uuid>\n    <subscription_id nil=\"true\"></subscription_id>\n    <state>open</state>\n    <invoice_number_prefix></invoice_number_prefix>\n    <invoice_number type=\"integer\">1000</invoice_number>\n    <po_number></po_number>\n    <vat_number></vat_number>\n    <total_in_cents type=\"integer\">1000</total_in_cents>\n    <currency>USD</currency>\n    <date type=\"datetime\">2014-01-01T20:21:44Z</date>\n    <closed_at type=\"datetime\" nil=\"true\"></closed_at>\n  </invoice>\n</new_invoice_notification>\n```\n\n### New Invoice (Manual)\n\nIf 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.\n\n```xml\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<new_invoice_notification>\n  <account>\n    <account_code>1</account_code>\n    <username nil=\"true\"></username>\n    <email>verena@example.com</email>\n    <first_name>Verana</first_name>\n    <last_name>Example</last_name>\n    <company_name nil=\"true\"></company_name>\n  </account>\n  <invoice>\n    <uuid>ffc64d71d4b5404e93f13aac9c63b007</uuid>\n    <subscription_id nil=\"true\"></subscription_id>\n    <state>open</state>\n    <invoice_number_prefix></invoice_number_prefix>\n    <invoice_number type=\"integer\">1000</invoice_number>\n    <po_number></po_number>\n    <vat_number></vat_number>\n    <total_in_cents type=\"integer\">1000</total_in_cents>\n    <currency>USD</currency>\n    <date type=\"datetime\">2014-01-01T20:21:44Z</date>\n    <closed_at type=\"datetime\" nil=\"true\"></closed_at>\n    <net_terms type=\"integer\">0</net_terms>\n    <collection_method>manual</collection_method>\n  </invoice>\n</new_invoice_notification>\n```\n\n### Processing Invoice (Automatic - Only for ACH  and PayPal eCheck payments)\n\nIf 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.\n\n```xml\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<processing_invoice_notification>\n  <account>\n    <account_code>1</account_code>\n    <username nil=\"true\"></username>\n    <email>verena@example.com</email>\n    <first_name>Verana</first_name>\n    <last_name>Example</last_name>\n    <company_name nil=\"true\"></company_name>\n  </account>\n  <invoice>\n    <uuid>ffc64d71d4b5404e93f13aac9c63b007</uuid>\n    <subscription_id nil=\"true\"></subscription_id>\n    <state>processing</state>\n    <invoice_number_prefix></invoice_number_prefix>\n    <invoice_number type=\"integer\">1000</invoice_number>\n    <po_number></po_number>\n    <vat_number></vat_number>\n    <total_in_cents type=\"integer\">1000</total_in_cents>\n    <currency>USD</currency>\n    <date type=\"datetime\">2014-01-01T20:21:44Z</date>\n    <closed_at type=\"datetime\" nil=\"true\"></closed_at>\n    <net_terms type=\"integer\">0</net_terms>\n    <collection_method>automatic</collection_method>\n  </invoice>\n</processing_invoice_notification>\n```\n\n### Closed Invoice\n\nIf 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.\n\n```xml\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<closed_invoice_notification>\n  <account>\n    <account_code>1</account_code>\n    <username nil=\"true\"></username>\n    <email>verena@example.com</email>\n    <first_name>Verana</first_name>\n    <last_name>Example</last_name>\n    <company_name nil=\"true\"></company_name>\n  </account>\n  <invoice>\n    <uuid>ffc64d71d4b5404e93f13aac9c63b007</uuid>\n    <subscription_id nil=\"true\"></subscription_id>\n    <state>collected</state>\n    <invoice_number_prefix></invoice_number_prefix>\n    <invoice_number type=\"integer\">1000</invoice_number>\n    <po_number></po_number>\n    <vat_number></vat_number>\n    <total_in_cents type=\"integer\">1100</total_in_cents>\n    <currency>USD</currency>\n    <date type=\"datetime\">2014-01-01T20:20:29Z</date>\n    <closed_at type=\"datetime\">2014-01-01T20:24:02Z</closed_at>\n  </invoice>\n</closed_invoice_notification>\n```\n\n### Closed Invoice (Manual)\n\nIf 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.\n\n```\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<closed_invoice_notification>\n  <account>\n    <account_code>1</account_code>\n    <username nil=\"true\"></username>\n    <email>verena@example.com</email>\n    <first_name>Verana</first_name>\n    <last_name>Example</last_name>\n    <company_name nil=\"true\"></company_name>\n  </account>\n  <invoice>\n    <uuid>ffc64d71d4b5404e93f13aac9c63b007</uuid>\n    <subscription_id nil=\"true\"></subscription_id>\n    <state>collected</state>\n    <invoice_number_prefix></invoice_number_prefix>\n    <invoice_number type=\"integer\">1000</invoice_number>\n    <po_number></po_number>\n    <vat_number></vat_number>\n    <total_in_cents type=\"integer\">1100</total_in_cents>\n    <currency>USD</currency>\n    <date type=\"datetime\">2014-01-01T20:20:29Z</date>\n    <closed_at type=\"datetime\">2014-01-01T20:24:02Z</closed_at>\n    <net_terms type=\"integer\">0</net_terms>\n    <collection_method>manual</collection_method>\n  </invoice>\n</closed_invoice_notification>\n```\n\n### Past Due Invoice\n\nIf 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.\n```\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<past_due_invoice_notification>\n  <account>\n    <account_code>1</account_code>\n    <username nil=\"true\"></username>\n    <email>verena@example.com</email>\n    <first_name>Verana</first_name>\n    <last_name>Example</last_name>\n    <company_name nil=\"true\"></company_name>\n  </account>\n  <invoice>\n    <uuid>ffc64d71d4b5404e93f13aac9c63b007</uuid>\n    <subscription_id nil=\"true\"></subscription_id>\n    <state>past_due</state>\n    <invoice_number_prefix></invoice_number_prefix>\n    <invoice_number type=\"integer\">1000</invoice_number>\n    <po_number></po_number>\n    <vat_number></vat_number>\n    <total_in_cents type=\"integer\">1100</total_in_cents>\n    <currency>USD</currency>\n    <date type=\"datetime\">2014-01-01T20:20:29Z</date>\n    <closed_at type=\"datetime\">2014-01-01T20:24:02Z</closed_at>\n  </invoice>\n</past_due_invoice_notification>\n```\n\n### Past Due Invoice (Manual)\n\nIf 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.\n\n```\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<past_due_invoice_notification>\n  <account>\n    <account_code>1</account_code>\n    <username nil=\"true\"></username>\n    <email>verena@example.com</email>\n    <first_name>Verana</first_name>\n    <last_name>Example</last_name>\n    <company_name nil=\"true\"></company_name>\n  </account>\n  <invoice>\n    <uuid>ffc64d71d4b5404e93f13aac9c63b007</uuid>\n    <subscription_id nil=\"true\"></subscription_id>\n    <state>past_due</state>\n    <invoice_number_prefix></invoice_number_prefix>\n    <invoice_number type=\"integer\">1000</invoice_number>\n    <po_number></po_number>\n    <vat_number></vat_number>\n    <total_in_cents type=\"integer\">1100</total_in_cents>\n    <currency>USD</currency>\n    <date type=\"datetime\">2014-01-01T20:20:29Z</date>\n    <closed_at type=\"datetime\">2014-01-01T20:24:02Z</closed_at>\n    <net_terms type=\"integer\">0</net_terms>\n    <collection_method>manual</collection_method>\n  </invoice>\n</past_due_invoice_notification>\n```\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Payment Notifications\"\n}\n[/block]\nAll 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.\n\n### Scheduled Payment (Only for ACH payments)\n\nA `scheduled_payment_notification` is sent when Recurly initiates an ACH payment from a customer entering payment or the renewal procces.\n\n```\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<scheduled_payment_notification>\n  <account>\n    <account_code>1</account_code>\n    <username nil=\"true\">verena</username>\n    <email>verena@example.com</email>\n    <first_name>Verena</first_name>\n    <last_name>Example</last_name>\n    <company_name nil=\"true\">Company, Inc.</company_name>\n  </account>\n  <transaction>\n    <id>a5143c1d3a6f4a8287d0e2cc1d4c0427</id>\n    <invoice_id>1974a09kj90s0789dsf099798326881c</invoice_id>\n    <invoice_number_prefix></invoice_number_prefix>\n    <invoice_number type=\"integer\">2059</invoice_number>\n    <subscription_id>1974a098jhlkjasdfljkha898326881c</subscription_id>\n    <action>purchase</action>\n    <date type=\"datetime\">2009-11-22T13:10:38Z</date>\n    <amount_in_cents type=\"integer\">1000</amount_in_cents>\n    <status>scheduled</status>\n    <message>Bogus Gateway: Forced success</message>\n    <reference></reference>\n    <source>subscription</source>\n    <cvv_result code=\"\"></cvv_result>\n    <avs_result code=\"\"></avs_result>\n    <avs_result_street></avs_result_street>\n    <avs_result_postal></avs_result_postal>\n    <test type=\"boolean\">true</test>\n    <voidable type=\"boolean\">true</voidable>\n    <refundable type=\"boolean\">true</refundable>\n  </transaction>\n</scheduled_payment_notification>\n```\n\n### Processing Payment (Only for ACH and PayPal eCheck payments)\n\nA `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\".\n\n```\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<processing_payment_notification>\n  <account>\n    <account_code>1</account_code>\n    <username nil=\"true\">verena</username>\n    <email>verena@example.com</email>\n    <first_name>Verena</first_name>\n    <last_name>Example</last_name>\n    <company_name nil=\"true\">Company, Inc.</company_name>\n  </account>\n  <transaction>\n    <id>a5143c1d3a6f4a8287d0e2cc1d4c0427</id>\n    <invoice_id>1974a09kj90s0789dsf099798326881c</invoice_id>\n    <invoice_number_prefix></invoice_number_prefix>\n    <invoice_number type=\"integer\">2059</invoice_number>\n    <subscription_id>1974a098jhlkjasdfljkha898326881c</subscription_id>\n    <action>purchase</action>\n    <date type=\"datetime\">2009-11-22T13:10:38Z</date>\n    <amount_in_cents type=\"integer\">1000</amount_in_cents>\n    <status>processing</status>\n    <message>Bogus Gateway: Forced success</message>\n    <reference></reference>\n    <source>subscription</source>\n    <cvv_result code=\"\"></cvv_result>\n    <avs_result code=\"\"></avs_result>\n    <avs_result_street></avs_result_street>\n    <avs_result_postal></avs_result_postal>\n    <test type=\"boolean\">true</test>\n    <voidable type=\"boolean\">true</voidable>\n    <refundable type=\"boolean\">true</refundable>\n  </transaction>\n</processing_payment_notification>\n```\n\n### Successful Payment\n\nA `successful_payment_notification` is sent when a payment is successfully captured.\n\n```\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<successful_payment_notification>\n  <account>\n    <account_code>1</account_code>\n    <username nil=\"true\">verena</username>\n    <email>verena@example.com</email>\n    <first_name>Verena</first_name>\n    <last_name>Example</last_name>\n    <company_name nil=\"true\">Company, Inc.</company_name>\n  </account>\n  <transaction>\n    <id>a5143c1d3a6f4a8287d0e2cc1d4c0427</id>\n    <invoice_id>1974a09kj90s0789dsf099798326881c</invoice_id>\n    <invoice_number type=\"integer\">2059</invoice_number>\n    <subscription_id>1974a098jhlkjasdfljkha898326881c</subscription_id>\n    <action>purchase</action>\n    <date type=\"datetime\">2009-11-22T13:10:38Z</date>\n    <amount_in_cents type=\"integer\">1000</amount_in_cents>\n    <status>success</status>\n    <message>Bogus Gateway: Forced success</message>\n    <reference></reference>\n    <source>subscription</source>\n    <cvv_result code=\"\"></cvv_result>\n    <avs_result code=\"\"></avs_result>\n    <avs_result_street></avs_result_street>\n    <avs_result_postal></avs_result_postal>\n    <test type=\"boolean\">true</test>\n    <voidable type=\"boolean\">true</voidable>\n    <refundable type=\"boolean\">true</refundable>\n  </transaction>\n</successful_payment_notification>\n```\n\n### Manual Payment\n\nA `successful_payment_notification` is also sent when a manual offline payment is recorded.\n\n```\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<successful_payment_notification>\n  <account>\n    <account_code>1</account_code>\n    <username nil=\"true\">verena</username>\n    <email>verena@example.com</email>\n    <first_name>Verena</first_name>\n    <last_name>Example</last_name>\n    <company_name nil=\"true\">Company, Inc.</company_name>\n  </account>\n  <transaction>\n    <id>a5143c1d3a6f4a8287d0e2cc1d4c0427</id>\n    <invoice_id>1974a09kj90s0789dsf099798326881c</invoice_id>\n    <invoice_number type=\"integer\">2059</invoice_number>\n    <subscription_id>1974a098jhlkjasdfljkha898326881c</subscription_id>\n    <action>purchase</action>\n    <date type=\"datetime\">2009-11-22T13:10:38Z</date>\n    <amount_in_cents type=\"integer\">1000</amount_in_cents>\n    <status>success</status>\n    <message>Bogus Gateway: Forced success</message>\n    <reference></reference>\n    <source>subscription</source>\n    <cvv_result code=\"\"></cvv_result>\n    <avs_result code=\"\"></avs_result>\n    <avs_result_street></avs_result_street>\n    <avs_result_postal></avs_result_postal>\n    <test type=\"boolean\">true</test>\n    <voidable type=\"boolean\">true</voidable>\n    <refundable type=\"boolean\">true</refundable>\n    <manually_entered type=\"boolean\">true</manually_entered>\n    <payment_method>credit_card</payment_method>\n  </transaction>\n</successful_payment_notification>\n```\n\n### Failed Payment\n\nA `failed_payment_notification` is sent when a payment attempt is declined by the payment gateway.\n\n```\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<failed_payment_notification>\n  <account>\n    <account_code>1</account_code>\n    <username nil=\"true\">verena</username>\n    <email>verena@example.com</email>\n    <first_name>Verena</first_name>\n    <last_name>Example</last_name>\n    <company_name nil=\"true\">Company, Inc.</company_name>\n  </account>\n  <transaction>\n    <id>a5143c1d3a6f4a8287d0e2cc1d4c0427</id>\n    <invoice_id>8fjk3sd7j90s0789dsf099798jkliy65</invoice_id>\n    <invoice_number type=\"integer\">2059</invoice_number>\n    <subscription_id>1974a098jhlkjasdfljkha898326881c</subscription_id>\n    <action>purchase</action>\n    <date type=\"datetime\">2009-11-22T13:10:38Z</date>\n    <gateway>cybersource</gateway>\n    <amount_in_cents type=\"integer\">1000</amount_in_cents>\n    <status>Declined</status>\n    <message>This transaction has been declined</message>\n    <gateway_error_codes nil=\"true\"></gateway_error_codes>\n    <failure_type>Declined by the gateway</failure_type>\n    <reference></reference>\n    <source>subscription</source>\n    <cvv_result code=\"\"></cvv_result>\n    <avs_result code=\"\"></avs_result>\n    <avs_result_street></avs_result_street>\n    <avs_result_postal></avs_result_postal>\n    <test type=\"boolean\">true</test>\n    <voidable type=\"boolean\">false</voidable>\n    <refundable type=\"boolean\">false</refundable>\n  </transaction>\n</failed_payment_notification>\n```\n\n### Successful Refund\n\nIf you refund an amount through the API or admin interface, a `successful_refund_notification` is sent. Failed refund attempts do not generate a notification.\n\n```\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<successful_refund_notification>\n  <account>\n    <account_code>1</account_code>\n    <username nil=\"true\"></username>\n    <email>verena@example.com</email>\n    <first_name>Verena</first_name>\n    <last_name>Example</last_name>\n    <company_name nil=\"true\"></company_name>\n  </account>\n  <transaction>\n    <id>2c7a2e30547e49869efd4e8a44b2be34</id>\n    <invoice_id>ffc64d71d4b5404e93f13aac9c63b007</invoice_id>\n    <invoice_number type=\"integer\">2059</invoice_number>\n    <subscription_id>1974a098jhlkjasdfljkha898326881c</subscription_id>\n    <action>credit</action>\n    <date type=\"datetime\">2010-10-06T20:37:55Z</date>\n    <amount_in_cents type=\"integer\">235</amount_in_cents>\n    <status>success</status>\n    <message>Bogus Gateway: Forced success</message>\n    <reference></reference>\n    <source>subscription</source>\n    <cvv_result code=\"\"></cvv_result>\n    <avs_result code=\"\"></avs_result>\n    <avs_result_street></avs_result_street>\n    <avs_result_postal></avs_result_postal>\n    <test type=\"boolean\">true</test>\n    <voidable type=\"boolean\">true</voidable>\n    <refundable type=\"boolean\">false</refundable>\n  </transaction>\n</successful_refund_notification>\n```\n\n### Void Payment\n\nIf 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.\n\n```\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<void_payment_notification>\n  <account>\n    <account_code>1</account_code>\n    <username nil=\"true\"></username>\n    <email>verena@example.com</email>\n    <first_name>Verena</first_name>\n    <last_name>Example</last_name>\n    <company_name nil=\"true\"></company_name>\n  </account>\n  <transaction>\n    <id>4997ace0f57341adb3e857f9f7d15de8</id>\n    <invoice_id>ffc64d71d4b5404e93f13aac9c63b007</invoice_id>\n    <invoice_number type=\"integer\">2059</invoice_number>\n    <subscription_id>1974a098jhlkjasdfljkha898326881c</subscription_id>\n    <action>purchase</action>\n    <date type=\"datetime\">2010-10-05T23:00:50Z</date>\n    <amount_in_cents type=\"integer\">235</amount_in_cents>\n    <status>void</status>\n    <message>Test Gateway: Successful test transaction</message>\n    <reference></reference>\n    <source>subscription</source>\n    <cvv_result code=\"M\">Match</cvv_result>\n    <avs_result code=\"D\">Street address and postal code match.</avs_result>\n    <avs_result_street></avs_result_street>\n    <avs_result_postal></avs_result_postal>\n    <test type=\"boolean\">true</test>\n    <voidable type=\"boolean\">false</voidable>\n    <refundable type=\"boolean\">false</refundable>\n  </transaction>\n</void_payment_notification>\n```\n\n### Fraud Info Updated\n\nIf 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](https://docs.recurly.com/docs/kount).\n\n```\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<fraud_info_updated_notification>\n  <account>\n    <account_code>1</account_code>\n    <username nil=\"true\">verena</username>\n    <email>verena@example.com</email>\n    <first_name>Verena</first_name>\n    <last_name>Example</last_name>\n    <company_name nil=\"true\">Company, Inc.</company_name>\n  </account>\n  <transaction>\n    <id>a5143c1d3a6f4a8287d0e2cc1d4c0427</id>\n    <invoice_id>8fjk3sd7j90s0789dsf099798jkliy65</invoice_id>\n    <invoice_number type=\"integer\">2059</invoice_number>\n    <subscription_id>41e4e03e10be199252613d424290c5c6</subscription_id>\n    <subscription_ids type=\"array\">\n      <subscription_id>41e4e03e10be199252613d424290c5c6</subscription_id>\n    </subscription_ids>\n    <action>purchase</action>\n    <date type=\"datetime\">2017-10-20T22:39:35Z</date>\n    <gateway>authorize</gateway>\n    <payment_method>credit_card</payment_method>\n    <amount_in_cents type=\"integer\">1000</amount_in_cents>\n    <status>success</status>\n    <message>This transaction has been approved.</message>\n    <gateway_error_codes>1</gateway_error_codes>\n    <failure_type nil=\"true\"></failure_type>\n    <reference></reference>\n    <source>subscription</source>\n    <cvv_result code=\"\"></cvv_result>\n    <avs_result code=\"\"></avs_result>\n    <avs_result_street></avs_result_street>\n    <avs_result_postal></avs_result_postal>\n    <billing_phone nil=\"true\"></billing_phone>\n    <billing_postal></billing_postal>\n    <billing_country></billing_country>\n    <test type=\"boolean\">true</test>\n    <voidable type=\"boolean\">true</voidable>\n    <refundable type=\"boolean\">true</refundable>\n  </transaction>\n</fraud_info_updated_notification>\n```\n[block:api-header]\n{\n  \"title\": \"Credit Payment Notifications\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"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>\"\n}\n[/block]\n### New Credit Payment\nThe 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.\n\n### Voided Credit Payment\nThe voided_credit_payment notification is sent when a credit payment is voided due to the charge invoice it is applied to being failed.\n\n### Credit Payment Schema\n```\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<new_credit_payment_notification>\n  <account>\n    <account_code>1234</account_code>\n    <username></username>\n    <email></email>\n    <first_name></first_name>\n    <last_name></last_name>\n    <company_name></company_name>\n    <phone></phone>\n  </account>\n  <credit_payment>\n    <uuid>42fa2a56dfeca2ace39b0e4a9198f835</uuid>\n    <action type=\"symbol\">payment</action>\n    <currency>USD</currency>\n    <amount_in_cents type=\"integer\">3579</amount_in_cents>\n    <original_nvoice_number type=\"integer\">2389</original_nvoice_number>\n    <applied_to_invoice_number type=\"integer\">2390</applied_to_invoice_number>\n    <original_credit_payment_uuid nil=\"true\"></original_credit_payment_uuid>\n    <refund_transaction_uuid nil=\"true\"></refund_transaction_uuid>\n    <created_at type=\"datetime\">2018-02-12T18:55:20Z</created_at>\n    <updated_at type=\"datetime\">2018-02-12T18:55:20Z</updated_at>\n    <voided_at type=\"datetime\" nil=\"true\"></voided_at>\n  </credit_payment>\n</new_credit_payment_notification>\n```\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Dunning Event Notifications\"\n}\n[/block]\nA `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.\n\nSites with the Credit Invoices feature enabled will see the below schema:\n```\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<new_dunning_event_notification>\n  <account>\n    <account_code>1234</account_code>\n    <username></username>\n    <email></email>\n    <first_name></first_name>\n    <last_name></last_name>\n    <company_name></company_name>\n    <phone></phone>\n  </account>\n  <invoice>\n    <uuid>424a9d4a2174b4f39bc776426aa19c32</uuid>\n    <state>past_due</state>\n    <origin type=\"symbol\">renewal</origin>\n    <invoice_number_prefix></invoice_number_prefix>\n    <invoice_number type=\"integer\">1813</invoice_number>\n    <address>\n      <address1></address1>\n      <address2></address2>\n      <city></city>\n      <state></state>\n      <zip></zip>\n      <country></country>\n      <phone></phone>\n    </address>\n    <vat_number></vat_number>\n    <currency>USD</currency>\n    <balance_in_cents type=\"integer\">4000</balance_in_cents>\n    <total_in_cents type=\"integer\">4500</total_in_cents>\n    <tax_in_cents type=\"integer\">0</tax_in_cents>\n    <subtotal_in_cents type=\"integer\">4500</subtotal_in_cents>\n    <subtotal_before_discount_in_cents type=\"integer\">4500</subtotal_before_discount_in_cents>\n    <discount_in_cents type=\"integer\">0</discount_in_cents>\n    <subscription_ids type=\"array\">\n      <subscription_id>4110792b3b01967d854f674b7282f542</subscription_id>\n    </subscription_ids>\n    <customer_notes>Thanks for your business!</customer_notes>\n    <created_at type=\"datetime\">2018-01-09T16:47:43Z</created_at>\n    <updated_at type=\"datetime\">2018-02-12T16:50:23Z</updated_at>\n    <closed_at type=\"datetime\" nil=\"true\"></closed_at>\n    <po_number></po_number>\n    <terms_and_conditions></terms_and_conditions>\n    <due_on type=\"dateTime\">2018-02-09T16:47:43Z</due_on>\n    <dunning_events_count type=\"integer\">2</dunning_events_count>\n    <final_dunning_event type=\"boolean\">false</final_dunning_event>\n    <net_terms type=\"integer\">30</net_terms>\n    <collection_method>manual</collection_method>\n  </invoice>\n  <subscription>\n    <plan>\n      <plan_code>gold</plan_code>\n      <name>Gold</name>\n    </plan>\n    <uuid>4110792b3b01967d854f674b7282f542</uuid>\n    <state>active</state>\n    <quantity type=\"integer\">1</quantity>\n    <total_amount_in_cents type=\"integer\">4500</total_amount_in_cents>\n    <subscription_add_ons type=\"array\">\n      <subscription_add_on>\n        <add_on_code>training_classes</add_on_code>\n        <name>Training Classes</name>\n        <quantity type=\"integer\">1</quantity>\n        <unit_amount_in_cents type=\"integer\">700</unit_amount_in_cents>\n        <add_on_type>fixed</add_on_type>\n        <usage_percentage nil=\"true\"></usage_percentage>\n        <measured_unit_id nil=\"true\"></measured_unit_id>\n      </subscription_add_on>\n      <subscription_add_on>\n        <add_on_code>executive-brief</add_on_code>\n        <name>Executive Brief</name>\n        <quantity type=\"integer\">1</quantity>\n        <unit_amount_in_cents type=\"integer\">2300</unit_amount_in_cents>\n        <add_on_type>fixed</add_on_type>\n        <usage_percentage nil=\"true\"></usage_percentage>\n        <measured_unit_id nil=\"true\"></measured_unit_id>\n      </subscription_add_on>\n    </subscription_add_ons>\n    <activated_at type=\"datetime\">2017-11-09T16:47:30Z</activated_at>\n    <canceled_at type=\"datetime\" nil=\"true\"></canceled_at>\n    <expires_at type=\"datetime\" nil=\"true\"></expires_at>\n    <current_period_started_at type=\"datetime\">2018-02-09T16:47:30Z</current_period_started_at>\n    <current_period_ends_at type=\"datetime\">2018-03-09T16:47:30Z</current_period_ends_at>\n    <trial_started_at type=\"datetime\" nil=\"true\"></trial_started_at>\n    <trial_ends_at type=\"datetime\" nil=\"true\"></trial_ends_at>\n  </subscription>\n</new_dunning_event_notification>\n```\n\nSites that do not have the Credit Invoices feature enabled will see the below schema:\n```\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<new_dunning_event_notification>\n  <account>\n    <account_code>09f299492d21</account_code>\n    <username nil=\"true\"></username>\n    <email>joseph.smith@gmail.com</email>\n    <first_name>Joseph</first_name>\n    <last_name>Smith</last_name>\n    <company_name nil=\"true\"></company_name>\n    <phone>3235626924</phone>\n  </account>\n  <invoice>\n    <uuid>inv-7wr0r2xuawwCjO</uuid>\n    <subscription_id>396e4e17640ca516c2f3a84e47ae91dd</subscription_id>\n    <state>failed</state>\n    <invoice_number_prefix></invoice_number_prefix>\n    <invoice_number type=\"integer\">781002</invoice_number>\n    <po_number></po_number>\n    <vat_number nil=\"true\"></vat_number>\n    <total_in_cents type=\"integer\">2499</total_in_cents>\n    <currency>USD</currency>\n    <date type=\"datetime\">2016-10-26T16:00:12Z</date>\n    <closed_at type=\"datetime\">2016-10-27T16:00:26Z</closed_at>\n    <net_terms type=\"integer\">0</net_terms>\n    <collection_method>automatic</collection_method>\n    <due_at type=\"datetime\">2016-10-26T16:00:12Z</due_at>\n    <dunning_events_count type=\"integer\">2</dunning_events_count>\n    <final_dunning_event type=\"boolean\">false</final_dunning_event>\n  </invoice>\n  <subscription>\n    <plan>\n      <plan_code>28a3ae1fc5c00d123429</plan_code>\n      <name>41c36e04f2d7bebc</name>\n    </plan>\n    <uuid>396e4e17640ca516c2f3a84e47ae91dd</uuid>\n    <state>active</state>\n    <quantity type=\"integer\">1</quantity>\n    <total_amount_in_cents type=\"integer\">2499</total_amount_in_cents>\n    <subscription_add_ons type=\"array\"/>\n    <activated_at type=\"datetime\">2016-10-26T05:42:27Z</activated_at>\n    <canceled_at type=\"datetime\" nil=\"true\"></canceled_at>\n    <expires_at type=\"datetime\" nil=\"true\"></expires_at>\n    <current_period_started_at type=\"datetime\">2016-10-26T16:00:00Z</current_period_started_at>\n    <current_period_ends_at type=\"datetime\">2016-11-26T16:00:00Z</current_period_ends_at>\n    <trial_started_at type=\"datetime\" nil=\"true\"></trial_started_at>\n    <trial_ends_at type=\"datetime\" nil=\"true\"></trial_ends_at>\n  </subscription>\n  <transaction>\n    <id>397083a9a871b53a3d5a4c469fa1216a</id>\n    <invoice_id>397083a76356802de2f5474d299475d8</invoice_id>\n    <invoice_number_prefix></invoice_number_prefix>\n    <invoice_number type=\"integer\">1002</invoice_number>\n    <subscription_id>396e4e17640ca516c2f3a84e47ae91dd</subscription_id>\n    <action>purchase</action>\n    <date type=\"datetime\">2016-10-26T16:00:12Z</date>\n    <gateway>payeezy</gateway>\n    <payment_method>credit_card</payment_method>\n    <amount_in_cents type=\"integer\">2499</amount_in_cents>\n    <status>declined</status>\n    <message>Transaction Normal</message>\n    <gateway_error_codes>00</gateway_error_codes>\n    <failure_type>invalid_data</failure_type>\n    <reference>115948823</reference>\n    <source>subscription</source>\n    <cvv_result code=\"I\">Failed data validation check</cvv_result>\n    <avs_result code=\"1\"></avs_result>\n    <avs_result_street nil=\"true\"></avs_result_street>\n    <avs_result_postal nil=\"true\"></avs_result_postal>\n    <billing_phone nil=\"true\"></billing_phone>\n    <billing_postal>94605</billing_postal>\n    <billing_country>US</billing_country>\n    <test type=\"boolean\">true</test>\n    <voidable type=\"boolean\">false</voidable>\n    <refundable type=\"boolean\">false</refundable>\n  </transaction>\n</new_dunning_event_notification>\n```","slug":"webhooks","title":"Webhooks"}

Webhooks


[block:api-header] { "type": "basic", "title": "Configuration" } [/block] Please see our [webhooks documentation](https://docs.recurly.com/push-notifications) for more information. There is an example on how to use webhook in PHP available [here](https://github.com/mbeale/recurly-push-notification-example). This example is for educational purposes only and should not be used for mission critical information. [block:api-header] { "type": "basic", "title": "Available webhooks" } [/block] * [Account Notifications](https://dev.recurly.com/page/webhooks#account-notifications) * [New Account](https://dev.recurly.com/page/webhooks#section-new-account) * [Updated Account](https://dev.recurly.com/page/webhooks#section-updated-account) * [Closed Account](https://dev.recurly.com/page/webhooks#section-closed-account) * [Updated Billing information](https://dev.recurly.com/page/webhooks#section-updated-billing-information) * [Failed Billing Information Update](https://dev.recurly.com/page/webhooks#section-failed-billing-information-update) * [New shipping address created](https://dev.recurly.com/page/webhooks#section-a-new-shipping-address-is-created) * [Existing shipping address edited](https://dev.recurly.com/page/webhooks#section-an-existing-shipping-address-is-edited) * [Existing shipping address deleted](https://dev.recurly.com/page/webhooks#section-an-existing-shipping-address-is-deleted) * [Subscription Notifications](https://dev.recurly.com/page/webhooks#subscription-notifications) * [New Subscription](https://dev.recurly.com/page/webhooks#section-new-subscription) * [Updated Subscription](https://dev.recurly.com/page/webhooks#section-updated-subscription) * [Canceled Subscription](https://dev.recurly.com/page/webhooks#section-canceled-subscription) * [Expired Subscription](https://dev.recurly.com/page/webhooks#section-expired-subscription) * [Renewed Subscription](https://dev.recurly.com/page/webhooks#section-renewed-subscription) * [Reactivated Subscription](https://dev.recurly.com/v2.6/page/webhooks#section-reactivated-subscription) * [Paused Subscription](https://dev.recurly.com/page/webhooks#section-paused-subscription) * [Resumed Subscription](https://dev.recurly.com/page/webhooks#section-resumed-subscription) * [Scheduled Subscription Pause](https://dev.recurly.com/page/webhooks#section-scheduled-subscription-pause) * [Subscription Pause Modified](https://dev.recurly.com/page/webhooks#section-subscription-paused-modified) * [Paused Subscription Renewal](https://dev.recurly.com/page/webhooks#section-paused-subscription-renewal) * [Subscription Pause Canceled](https://dev.recurly.com/page/webhooks#section-subscription-pause-canceled) * [Usage Notifications](https://dev.recurly.com/page/webhooks#usage-notifications) * [New Usage](https://dev.recurly.com/page/webhooks#section-new-usage) * [Gift Card Notifications](https://dev.recurly.com/page/webhooks#gift-card-notifications) * [Purchased Gift Card](https://dev.recurly.com/page/webhooks#section-purchased-gift-card) * [Canceled Gift Card](https://dev.recurly.com/page/webhooks#section-canceled-gift-card) * [Updated Gift Card](https://dev.recurly.com/page/webhooks#section-updated-gift-card) * [Regenerated Gift Card](https://dev.recurly.com/page/webhooks#section-regenerated-gift-card) * [Redeemed Gift Card](https://dev.recurly.com/page/webhooks#section-redeemed-gift-card) * [Updated Balance Gift Card](https://dev.recurly.com/page/webhooks#section-updated-balance-gift-card) * [Charge Invoice Notifications](https://dev.recurly.com/page/webhooks#charge-invoice-notifications) * [New Charge Invoice](https://dev.recurly.com/page/webhooks#section-new-charge-invoice) * [Processing Charge Invoice](https://dev.recurly.com/page/webhooks#section-processing-charge-invoice) * [Past Due Charge Invoice](https://dev.recurly.com/page/webhooks#section-past-due-charge-invoice) * [Paid Charge Invoice](https://dev.recurly.com/page/webhooks#section-paid-charge-invoice) * [Failed Charge Invoice](https://dev.recurly.com/page/webhooks#section-failed-charge-invoice) * [Reopened Charge Invoice](https://dev.recurly.com/page/webhooks#section-reopened-charge-invoice) * [Credit Invoice Notifications](https://dev.recurly.com/page/webhooks#credit-invoice-notifications) * [New Credit Invoice](https://dev.recurly.com/page/webhooks#section-new-credit-invoice) * [Processing Credit Invoice](https://dev.recurly.com/page/webhooks#section-processing-credit-invoice) * [Closed Credit Invoice](https://dev.recurly.com/page/webhooks#section-closed-credit-invoice) * [Voided Credit Invoice](https://dev.recurly.com/page/webhooks#section-voided-credit-invoice) * [Reopened Credit Invoice](https://dev.recurly.com/page/webhooks#section-reopened-credit-invoice) * [Open Credit Invoice](https://dev.recurly.com/page/webhooks#section-open-credit-invoice) * [Invoice Notifications - Deprecated with Credit Invoices feature](https://dev.recurly.com/page/webhooks#invoice-notifications) * [New Invoice](https://dev.recurly.com/page/webhooks#section-new-invoice) * [New Invoice (Manual)](https://dev.recurly.com/page/webhooks#section-new-invoice-manual-) * [Processing Invoice (Automatic - Only for ACH and PayPal eCheck payments)](https://dev.recurly.com/page/webhooks#section-processing-invoice-automatic-only-for-ach-and-paypal-echeck-payments-) * [Closed Invoice](https://dev.recurly.com/page/webhooks#section-closed-invoice) * [Closed Invoice (Manual)](https://dev.recurly.com/page/webhooks#section-closed-invoice-manual-) * [Past Due Invoice](https://dev.recurly.com/page/webhooks#section-past-due-invoice) * [Past Due Invoice (Manual)](https://dev.recurly.com/page/webhooks#section-past-due-invoice-manual-) * [Payment Notifications](https://dev.recurly.com/page/webhooks#payment-notifications) * [Scheduled Payment (Only for ACH payments)](https://dev.recurly.com/page/webhooks#section-scheduled-payment-only-for-ach-payments-) * [Processing Payment (Only for ACH and PayPal eCheck payments)](https://dev.recurly.com/page/webhooks#section-processing-payment-only-for-ach-and-paypal-echeck-payments-) * [Successful Payment](https://dev.recurly.com/page/webhooks#section-successful-payment) * [Manual Payment](https://dev.recurly.com/page/webhooks#section-manual-payment) * [Failed Payment](https://dev.recurly.com/page/webhooks#section-failed-payment) * [Successful Refund](https://dev.recurly.com/page/webhooks#section-successful-refund) * [Void Payment](https://dev.recurly.com/page/webhooks#section-void-payment) * [Fraud Info Updated](https://dev.recurly.com/page/webhooks#section-fraud-info-updated) * [Credit Payment Notifications](https://dev.recurly.com/page/webhooks#credit-payment-notifications) * [New Credit Payment](https://dev.recurly.com/page/webhooks#section-new-credit-payment) * [Voided Credit Payment](https://dev.recurly.com/page/webhooks#section-voided-credit-payment) * [Dunning Event Notifications](https://dev.recurly.com/page/webhooks#dunning-event-notifications) [block:api-header] { "type": "basic", "title": "Account Notifications" } [/block] ### New Account Sent when a new account is created. ```xml <?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 <a href="https://dev.recurly.com/docs/update-account">Update Account</a> API call for a list of attributes. ```xml <?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 <?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 <?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 <?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 <?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 <?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 <?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> ``` [block:api-header] { "type": "basic", "title": "Subscription Notifications" } [/block] 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> <collection_method>automatic</collection_method> </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> <collection_method>automatic</collection_method> </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> <collection_method>automatic</collection_method> </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> <collection_method>automatic</collection_method> </subscription> </renewed_subscription_notification> ``` ### Reactivated Subscription Sent when a subscription is reactivated after having been canceled. Note that while the webhooks is called the "reactiveated_account_notification" this is actually sent when a *subscription* is reactivated. ```xml <?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> <collection_method>automatic</collection_method> </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 <?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 <?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 <?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 <?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 <?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 <?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> ``` [block:api-header] { "type": "basic", "title": "Usage Notifications" } [/block] ### 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> ``` [block:api-header] { "type": "basic", "title": "Gift Card Notifications" } [/block] ### 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> ``` [block:api-header] { "title": "Charge Invoice Notifications" } [/block] [block:callout] { "type": "info", "body": "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>" } [/block] ### 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. ### Paid Charge Invoice 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 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. ### 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 type="symbol">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> ``` [block:api-header] { "title": "Credit Invoice Notifications" } [/block] [block:callout] { "type": "info", "body": "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>" } [/block] ### 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. ### 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 type="symbol">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> ``` [block:api-header] { "type": "basic", "title": "Invoice Notifications" } [/block] [block:callout] { "type": "warning", "body": "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." } [/block] 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 <?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 <?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 <?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 <?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> ``` [block:api-header] { "type": "basic", "title": "Payment Notifications" } [/block] 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](https://docs.recurly.com/docs/kount). ``` <?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> ``` [block:api-header] { "title": "Credit Payment Notifications" } [/block] [block:callout] { "type": "info", "body": "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>" } [/block] ### 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_nvoice_number type="integer">2389</original_nvoice_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> ``` [block:api-header] { "type": "basic", "title": "Dunning Event Notifications" } [/block] 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 type="symbol">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> ```