Webhooks, payments, and automation
How payment processing, webhook events, and automation rules work in the Fjellride API.
Payments
Fjellride uses Stripe for all payment processing. As an operator, you connect your Stripe account through the dashboard, and Fjellride handles checkout sessions, payment confirmation, and payout routing.
How payments flow
- Customer selects products and dates on the storefront
- The checkout endpoint creates a Stripe Checkout session
- Customer completes payment on Stripe's hosted page
- Stripe sends a webhook to Fjellride confirming payment
- Fjellride updates the booking status from
CONCEPTtoRESERVED - Funds are routed to your connected Stripe account
Payment fields on bookings
| Field | Type | Description |
|---|---|---|
isPaid | boolean | Whether the booking has been fully paid |
amountPaidMinor | number | Amount paid in minor units |
totalAmountMinor | number | Total booking amount in minor units |
Updating payment status via API
curl -X PUT "https://api.fjellride.se/api/v1/bookings/150/payment-status" \
-H "x-api-key: fjr_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"isPaid": true,
"amountPaidMinor": 70000
}'When amountPaidMinor is provided, the system determines isPaid by comparing it to the booking total.
Webhooks
Fjellride receives payment webhooks from Stripe at a dedicated, non-authenticated endpoint. This is an internal integration β you don't need to configure webhook URLs as an operator. Fjellride handles Stripe events automatically.
What Stripe events trigger
| Event | What happens |
|---|---|
checkout.session.completed | Booking moves to RESERVED, payment marked as complete |
checkout.session.expired | Abandoned checkout β booking stays as CONCEPT |
charge.refunded | Refund is recorded on the booking |
If you need your own webhooks
If you need to react to booking changes in your own systems (e.g. update an external calendar, send a notification to a third-party tool), consider:
- Polling β periodically query the bookings API for recent changes
- Automation rules β use Fjellride's built-in automation feature (see below)
Automation
Fjellride includes an automation system that lets you define rules triggered by booking events. These run server-side and can perform actions like sending emails or updating booking fields.
How automation works
Automation rules are configured in Settings β Automation in the dashboard. Each rule consists of:
- Trigger β the event that starts the automation (e.g. booking status changes to
PICKED_UP) - Conditions β optional filters (e.g. only for bookings at a specific location)
- Actions β what to do when triggered (e.g. send a confirmation email)
Common automation patterns
- Pickup reminder β send an email the day before a booking's start date
- Return follow-up β send a thank-you email when status changes to
RETURNED - Late return alert β notify staff when a booking passes its end date without being marked returned
Security best practices
When building integrations:
- Store API keys in environment variables β never in source code or client bundles
- Use HTTPS for all API requests
- Rotate keys periodically β set expiration dates and create new keys before old ones expire
- Limit key scope β create separate keys for different integrations when possible
- Monitor usage β check the activity log in your dashboard for unexpected API access
Full API reference
For complete endpoint documentation, request/response schemas, and interactive testing: