Skip to content

Webhooks

Receiving and verifying webhooks from payment providers.

GoPayLocal receives webhooks from connected payment providers to track coupon redemptions and payment events.

Each provider has a dedicated webhook endpoint:

ProviderWebhook URL
Stripehttps://api.gopaylocal.com/v1/webhooks/stripe
Paddlehttps://api.gopaylocal.com/v1/webhooks/paddle
Dodo Paymentshttps://api.gopaylocal.com/v1/webhooks/dodo
Lemon Squeezyhttps://api.gopaylocal.com/v1/webhooks/lemon-squeezy
Gumroadhttps://api.gopaylocal.com/v1/webhooks/gumroad
Chargebeehttps://api.gopaylocal.com/v1/webhooks/chargebee
Whophttps://api.gopaylocal.com/v1/webhooks/whop
Polarhttps://api.gopaylocal.com/v1/webhooks/polar

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.

For providers that require manual webhook configuration:

  1. Go to your provider’s dashboard
  2. Navigate to webhook settings
  3. Add the GoPayLocal webhook URL for your provider
  4. Select the relevant events (see below)

Currently, only Dodo Payments has full webhook handling implemented. Other providers have webhook endpoints reserved and will be implemented as needed.

EventDescription
payment.succeededPayment completed — tracks discount redemptions and updates analytics
payment.failedPayment failed — marks subscription as past due
subscription.createdSubscription created — stores customer and subscription IDs
subscription.updatedSubscription updated — syncs plan, status, and billing period
subscription.canceledSubscription canceled
subscription.expiredSubscription expired

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.

GoPayLocal verifies webhook signatures to ensure events are authentic:

Uses the Stripe-Signature header with the webhook signing secret:

Stripe-Signature: t=1234567890,v1=abc123...

Uses the Paddle-Signature header:

Paddle-Signature: ts=1234567890;h1=abc123...

Uses the x-dodo-signature header with hex-encoded HMAC-SHA256:

x-dodo-signature: abc123def456...

If GoPayLocal fails to process a webhook (e.g., due to a temporary error), the provider will retry:

ProviderRetry Policy
StripeUp to 3 retries over 24 hours
PaddleUp to 5 retries over 48 hours
DodoUp to 3 retries over 12 hours
OthersVaries by provider

GoPayLocal returns appropriate HTTP status codes:

StatusMeaning
200 OKWebhook processed successfully
400 Bad RequestInvalid payload or signature
500 Internal Server ErrorTemporary error (provider should retry)

Use the Stripe CLI to send test webhook events:

Terminal window
stripe listen --forward-to https://api.gopaylocal.com/v1/webhooks/stripe
stripe trigger checkout.session.completed

Most providers have a “Send Test Event” button in their webhook settings. Use this to verify the connection.