Beacon

End-to-end quickstart

View as Markdown

End-to-end quickstart

Set up Beacon with Stripe and validate the full flow in under 20 minutes.

tutorial • updated 2026-03-17

Before you start

RequirementWhy it matters
Existing Stripe accountread-only OAuth and visible payment ingestion
Beacon session authenticated as OWNER or ADMINauthenticated API operations with real organization context
Public HTTPS webhook URLsecure event ingestion
Isolated test environmentsafe validation before live

End-to-end flow map

  1. Connect Stripe.
  2. Register and validate webhooks.
  3. Create subscription checkout.
  4. Confirm final state in dashboard.
  5. Validate fiscal and observability signals.

Step-by-step

  1. 11) Connect existing Stripe

    Complete read-only OAuth and verify visible ingestion in the dashboard.
  2. 22) Configure webhooks

    Register the Beacon endpoints in Stripe, store the environment secrets, and validate signatures.
  3. 33) Create checkout

    Call the real checkout endpoint and redirect the user to redirectUrl.
  4. 44) Confirm outcome

    After the checkout return, confirm the subscription with sessionId or the pending checkout state.
  5. 55) Validate operations

    Check final state across dashboard, webhook processing, and fiscal/operational signals.

API example

bash
curl -X POST "https://test.beacon.pt/api/billing/subscription/checkout?org=acme&mode=test" \
  -H "Authorization: Bearer <beacon_session_token>" \
  -H "Content-Type: application/json" \
  -d '{"plan":"plus","billingCycle":"monthly"}'

Final validation

  • Checkout returns checkoutSessionId and redirectUrl.
  • POST /api/billing/subscription/confirm returns subscription for the correct organization.
  • Webhook processing stores webhookEventId without unexpected duplicates.
  • Dashboard state matches billing and operational timeline.
  • No critical alerts in observability.

Quick troubleshooting

SymptomLikely diagnosisImmediate action
checkout created but state unchangedmissing confirmation stepcall POST /api/billing/subscription/confirm and verify events
webhook rejectedinvalid signaturerotate/revalidate secret and clock drift
409 conflictpending checkout, active subscription, or domain blockerinspect the current state before retrying