Guides & product help β€” fjellride.se

Back to Integrations & API

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

  1. Customer selects products and dates on the storefront
  2. The checkout endpoint creates a Stripe Checkout session
  3. Customer completes payment on Stripe's hosted page
  4. Stripe sends a webhook to Fjellride confirming payment
  5. Fjellride updates the booking status from CONCEPT to RESERVED
  6. Funds are routed to your connected Stripe account

Payment fields on bookings

FieldTypeDescription
isPaidbooleanWhether the booking has been fully paid
amountPaidMinornumberAmount paid in minor units
totalAmountMinornumberTotal booking amount in minor units

Updating payment status via API

bash
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

EventWhat happens
checkout.session.completedBooking moves to RESERVED, payment marked as complete
checkout.session.expiredAbandoned checkout β€” booking stays as CONCEPT
charge.refundedRefund 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:

  1. Polling β€” periodically query the bookings API for recent changes
  2. 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:

https://api.fjellride.se/api/docs