mix mishka_pay.stripe.webhook_endpoint (Mishka Pay v0.0.1)

Copy Markdown View Source

Sets a site's webhook endpoint in its Stripe account (MishkaPay.Providers.Stripe.WebhookEndpoint): makes it with every event Mishka Pay acts on, or adds the events it lacks. With --check it changes nothing and fails when events are missing, for a CI or deploy check. The project starts, for the site's keys.

mix mishka_pay.stripe.webhook_endpoint --url https://shop.test/pay/webhooks/stripe/site-42 --tenant site-42
mix mishka_pay.stripe.webhook_endpoint --url https://shop.test/pay/webhooks/stripe --check
mix mishka_pay.stripe.webhook_endpoint --url https://shop.test/pay/webhooks/stripe --events snapshot --api v1

Options beside --url, --tenant and --check: --events thin|snapshot (the tenant's :events by default, thin), --api v2|v1 (the tenant's :webhook_api, v2: an event destination) and --connected-accounts (a platform's endpoint takes its connected accounts' events too). A new endpoint's signing secret is shown once: keep it as the site's webhook_secret.