Webhooks
Receiving and verifying webhooks from payment providers.
GoPayLocal receives webhooks from connected payment providers to track coupon redemptions and payment events.
Webhook Endpoints
Section titled “Webhook Endpoints”Each provider has a dedicated webhook endpoint:
| Provider | Webhook URL |
|---|---|
| Stripe | https://api.gopaylocal.com/v1/webhooks/stripe |
| Paddle | https://api.gopaylocal.com/v1/webhooks/paddle |
| Dodo Payments | https://api.gopaylocal.com/v1/webhooks/dodo |
| Lemon Squeezy | https://api.gopaylocal.com/v1/webhooks/lemon-squeezy |
| Gumroad | https://api.gopaylocal.com/v1/webhooks/gumroad |
| Chargebee | https://api.gopaylocal.com/v1/webhooks/chargebee |
| Whop | https://api.gopaylocal.com/v1/webhooks/whop |
| Polar | https://api.gopaylocal.com/v1/webhooks/polar |
Automatic Setup
Section titled “Automatic Setup”For most providers, webhooks are configured automatically when you connect the integration in the dashboard. GoPayLocal registers the webhook endpoint with the provider’s API.
Manual Setup
Section titled “Manual Setup”For providers that require manual webhook configuration:
- Go to your provider’s dashboard
- Navigate to webhook settings
- Add the GoPayLocal webhook URL for your provider
- Select the relevant events (see below)
Events
Section titled “Events”Currently, only Dodo Payments has full webhook handling implemented. Other providers have webhook endpoints reserved and will be implemented as needed.
Dodo Payments Events (Implemented)
Section titled “Dodo Payments Events (Implemented)”| Event | Description |
|---|---|
payment.succeeded | Payment completed — tracks discount redemptions and updates analytics |
payment.failed | Payment failed — marks subscription as past due |
subscription.created | Subscription created — stores customer and subscription IDs |
subscription.updated | Subscription updated — syncs plan, status, and billing period |
subscription.canceled | Subscription canceled |
subscription.expired | Subscription expired |
Other Providers (Planned)
Section titled “Other Providers (Planned)”Webhook handlers for Stripe, Paddle, Lemon Squeezy, Gumroad, Chargebee, Whop, and Polar are on the roadmap. The webhook endpoints are reserved and ready to receive events — handlers will be added as each provider integration matures.
Signature Verification
Section titled “Signature Verification”GoPayLocal verifies webhook signatures to ensure events are authentic:
Stripe
Section titled “Stripe”Uses the Stripe-Signature header with the webhook signing secret:
Stripe-Signature: t=1234567890,v1=abc123...Paddle
Section titled “Paddle”Uses the Paddle-Signature header:
Paddle-Signature: ts=1234567890;h1=abc123...Dodo Payments
Section titled “Dodo Payments”Uses the x-dodo-signature header with hex-encoded HMAC-SHA256:
x-dodo-signature: abc123def456...Retry Policy
Section titled “Retry Policy”If GoPayLocal fails to process a webhook (e.g., due to a temporary error), the provider will retry:
| Provider | Retry Policy |
|---|---|
| Stripe | Up to 3 retries over 24 hours |
| Paddle | Up to 5 retries over 48 hours |
| Dodo | Up to 3 retries over 12 hours |
| Others | Varies by provider |
GoPayLocal returns appropriate HTTP status codes:
| Status | Meaning |
|---|---|
200 OK | Webhook processed successfully |
400 Bad Request | Invalid payload or signature |
500 Internal Server Error | Temporary error (provider should retry) |
Testing Webhooks
Section titled “Testing Webhooks”Stripe
Section titled “Stripe”Use the Stripe CLI to send test webhook events:
stripe listen --forward-to https://api.gopaylocal.com/v1/webhooks/stripestripe trigger checkout.session.completedOther Providers
Section titled “Other Providers”Most providers have a “Send Test Event” button in their webhook settings. Use this to verify the connection.