Overview
BeatPass uses inbound webhooks to receive payment notifications from Stripe. There is currently no outbound webhook system for external integrations.BeatPass does not send webhooks to external applications. This page documents how BeatPass receives payment notifications from Stripe.
Inbound Webhooks (Stripe)
BeatPass receives webhooks from Stripe to process purchase-related payment events.Webhook Endpoint
Webhook requests must include a valid
Stripe-Signature header. Manual requests without proper signatures are rejected.Stripe Events Handled
The webhook controller processes the following Stripe events:- Purchase Events
- Payout Events
- Account Events
payment_intent.succeeded
payment_intent.succeeded
Success
Marks purchase as succeeded, generates exclusive license certificate, marks track as sold.
payment_intent.payment_failed
payment_intent.payment_failed
Failed
Marks purchase as failed and stores the error message for display.
charge.refunded
charge.refunded
Refund
Marks purchase as refunded (handles both partial and full refunds).
How It Works
1
Payment Initiated
User initiates a track purchase via Stripe.js.
2
Stripe Processes
Stripe processes the payment and updates the PaymentIntent status.
3
Webhook Sent
Stripe sends a webhook to BeatPass at
/api/stripe/webhook.4
BeatPass Processes
BeatPass verifies the signature and processes the event:
- Updates purchase/payout records
- Generates license certificates for successful purchases
- Marks tracks as sold for exclusive purchases
- Sends notifications to producers
Webhook Security
Stripe Signature Verification
All incoming Stripe webhooks are verified using Stripe’s standard webhook signature verification. This ensures that webhook payloads are authentic and have not been tampered with.- Webhooks are validated against a signing secret configured in Stripe
- Invalid signatures result in immediate rejection (400 response)
- All webhook processing is logged for audit purposes
For Developers
Testing Webhooks Locally
Use the Stripe CLI to forward webhooks during development:Webhook Events in Stripe Dashboard
Monitor webhook delivery in the Stripe Dashboard:- Go to Developers > Webhooks
- Select your endpoint
- View recent events and delivery status
- Retry failed webhooks if needed
No Outbound Webhooks
BeatPass does not currently offer outbound webhooks for external integrations.
- Track changes: Poll the API or use the notifications SSE stream (authenticated)
- Purchase status: Use the purchase status endpoint after initiating
- User events: Handled client-side via the BeatPass frontend