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 takes payments through Stripe. You connect your Stripe account in the dashboard, and Fjellride creates the payment sessions, confirms payments and sends the money to your account.

How payments flow

  1. The renter picks gear and dates on the storefront, and accepts your policies if you have any.
  2. The checkout endpoint creates a Stripe Checkout session.
  3. The renter pays on Stripe's page.
  4. Stripe tells Fjellride, through a webhook, that the payment went through.
  5. Fjellride moves the booking from CONCEPT to RESERVED and saves a copy of the policies the renter accepted.
  6. The money goes 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
  }'

If you send amountPaidMinor, Fjellride sets isPaid by comparing it with the booking total.

Webhooks

Stripe sends payment events to Fjellride on an endpoint of its own. That's internal, so you don't set up any webhook URLs.

What each Stripe event does

EventWhat happens
checkout.session.completedBooking moves to RESERVED, payment marked as complete
checkout.session.expiredThe checkout was abandoned; booking stays CONCEPT
charge.refundedRefund is recorded on the booking

If you need your own webhooks

To react to booking changes in your own systems, for example to update an external calendar or notify another tool, you have two options:

  1. Poll the bookings API for recent changes on a schedule.
  2. Use an automation rule to send an email when something happens (see below).

Automation

Automation rules run on Fjellride's servers when something happens to a booking. They can send emails, wait, check conditions, and file documents such as invoices and contracts on the booking.

How automation works

Set rules up under Settings → Automation. Each rule has:

  • Trigger: the event that starts the automation, for example a booking moving to Picked Up, or a set number of days before pickup.
  • Conditions: optional filters, for example only for bookings at a specific location.
  • Steps: what to do, in order: send an email, wait, check that the booking still matches, or create a document.

For the full guide, see Automations.

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: the day after the return date, email your team if the booking is still Picked Up.

Security best practices

When building integrations:

  • Keep API keys in environment variables, never in source code or anything shipped to a browser.
  • Use HTTPS for every request.
  • Replace keys on a schedule. Set an expiry date, and create the new key before the old one expires.
  • Give each integration its own key with only the permissions it needs, so you can turn one off without breaking the others.
  • Check the activity log in the dashboard for API calls you don't expect.

Full API reference

Every endpoint, with request and response schemas and a way to try it:

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