Skip to content

Commit

Permalink
Add webhook events to cashier-paddle.md
Browse files Browse the repository at this point in the history
  • Loading branch information
michavie authored Aug 31, 2020
1 parent 6b598c9 commit b387a86
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cashier-paddle.md
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,13 @@ Next, define a route to your Cashier controller within your `routes/web.php` fil

Cashier emits a `Laravel\Paddle\Events\WebhookReceived` event when a webhook is received, and a `Laravel\Paddle\Events\WebhookHandled` event when a webhook was handled. Both events contain the full payload of the Paddle webhook.

Cashier also emit events dedicated to the type of the received webhook. In addition to the full payload from Paddle, they also contain the loaded models that were used to process the webhook like the billable model, the subscription, or the receipt:
- `PaymentSucceeded`
- `SubscriptionPaymentSucceeded`
- `SubscriptionCreated`
- `SubscriptionUpdated`
- `SubscriptionCancelled`

You can optionally also override the default, built-in webhook route by setting the `CASHIER_WEBHOOK` env variable in your `.env` file. This value should be the full URL to your webhook route and needs to match the URL set in your Paddle control panel:

CASHIER_WEBHOOK=https://example.com/my-paddle-webhook-url
Expand Down

0 comments on commit b387a86

Please sign in to comment.