Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
v:2.0:webhooks [2024/10/03 08:43] – [Subscribed resources] adam | v:2.0:webhooks [2025/06/27 16:46] (current) – [Example Payload] adam | ||
---|---|---|---|
Line 106: | Line 106: | ||
The event that triggered the webhook still completed successfully. If it was a transaction webhook, the customer was charged and you'll receive payment for the transaction as your chosen payment gateway processes it. | The event that triggered the webhook still completed successfully. If it was a transaction webhook, the customer was charged and you'll receive payment for the transaction as your chosen payment gateway processes it. | ||
+ | ==== Automatic deactivation of failing webhooks ==== | ||
+ | |||
+ | If a single webhook endpoint continues to fail 12 times in a row (whether that is all from one single trigger, or from multiple triggers for the resource happening at the same time), then to prevent unnecessary attempts, the webhook will be deactivated, | ||
+ | |||
+ | An inactive webhook can be reactivated by editing it in the administration. When reactivating an inactive webhook, any resources that would have triggered the webhook while it was inactive are not automatically sent. These will need to be manually resent to your webhook endpoint as detailed below. | ||
==== Troubleshooting Webhook Errors ==== | ==== Troubleshooting Webhook Errors ==== | ||
Line 155: | Line 160: | ||
=== Subscriptions === | === Subscriptions === | ||
- | Triggered whenever a subscription resource is created or updated. Subscriptions are created when first purchased as part of a transaction, | + | Triggered whenever a subscription resource is created or updated. Subscriptions are created when first purchased as part of a transaction, |
- | Events: '' | + | Events: '' |
+ | |||
+ | Note that the '' | ||
=== Customers === | === Customers === | ||
- | Triggered whenever a customer resource is created or updated. | + | Triggered whenever a customer resource is created or updated. If a change is made to a customer who has an associated subscription and you have the subscription webhook enabled, we will send two webhooks, one for the customer and another for the subscription. |
- | Events: '' | + | Events: '' |
+ | |||
+ | === Transaction Log === | ||
+ | |||
+ | Triggered whenever a transaction resource is updated in some way, causing an additional log to be added to the transaction log. This can include a transaction or transaction item being edited, captured, refunded, or a transaction being added, moved or removed from a transaction folder. | ||
+ | |||
+ | Events: '' | ||
<WRAP center round important 95%> | <WRAP center round important 95%> | ||
- | As all events will be sent to your endpoint for the subscribed resource, you should ensure that you only process the events that you care about - for example, only the '' | + | As all events will be sent to your endpoint for the subscribed resource, you should ensure that you only process the events that you care about - for example, only the '' |
+ | |||
+ | You can confirm the event using the '' | ||
+ | </ | ||
+ | |||
+ | <WRAP center round tip 95%> | ||
+ | **Selling subscriptions? | ||
+ | If you do recurring billing with Foxy, please be aware that subscriptions can start in the future, resulting in a $0 initial transaction. Also note that subscription modifications can result in $0 transactions. This can cause problems if you don't account for it. (For instance, you may not want to ship product or provision access today if the subscription starts next week.) We recommend you test things out to ensure you're handling webhooks the way you want. | ||
</ | </ | ||
Line 189: | Line 209: | ||
* Provide all data related to the customer (default)\\ < | * Provide all data related to the customer (default)\\ < | ||
+ | |||
+ | === Transaction Logs === | ||
+ | |||
+ | * Provide all data related to the log (default)\\ < | ||
==== Saving The Webhook ==== | ==== Saving The Webhook ==== | ||
Line 889: | Line 913: | ||
}</ | }</ | ||
+ | === Transaction Log === | ||
+ | <code javascript> | ||
+ | { | ||
+ | " | ||
+ | |||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | { | ||
+ | " | ||
+ | |||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ], | ||
+ | " | ||
+ | " | ||
+ | |||
+ | }, | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | }, | ||
+ | " |