7.7 Stripe integration for car rental software

With the Stripe integration, the car rental software takes payment for a booking by bank card. Once it is connected, a working “Payment link” appears in the booking card: the customer pays on the Stripe page, and the payment is recorded in the booking automatically. To connect, you need two keys of your Stripe account — the publishable key and the secret key.

Where to get the keys

  1. Log in to your Stripe account and open Developers → API keys (Developers → API keys).
  2. Copy the secret key (Secret key): it starts with sk_live_ in live mode or with sk_test_ in test mode.
  3. Also copy the publishable key (Publishable key): it starts with pk_live_ or pk_test_.
  4. Instead of the secret key you can issue a restricted key (it starts with rk_). Give it these permissions: Balance — read; Checkout Sessions, Refunds and Webhook Endpoints — write. For leasing recurring payments also add Customers, Setup Intents and Payment Intents — write.

Both keys must be of the same mode: both test (pk_test_ and sk_test_) or both live (pk_live_ and sk_live_). The publishable key is only stored for now — it will be needed for a card form right on your website; today the customer pays on the Stripe page.

Where to connect the Stripe integration

  1. Open the settings, the “Integrations & Agents” section.
  2. In the “Payment systems” block click the “Stripe” tile (on the name, not on the toggle).
  3. In the “Stripe” window paste the keys into the “Stripe publishable key” and “Stripe secret key” fields.
  4. Click “Verify and connect”.

Only the company’s main user can connect and disconnect integrations; for other employees the button is inactive.

In the same window: the “Payment methods” row is a link to your Stripe Dashboard, where you switch on the payment methods the customer sees (cards, Apple Pay, Google Pay and others); the “Collect full billing address” and “Collect phone number” checkboxes set what else the payment page asks the customer. By default they are off — payment without extra fields. When Stripe is already connected, a checkbox is saved at once, without entering the keys again. Each field is explained by the “?” icon next to its label.

The “Stripe” tile in the “Payment systems” block of the “Integrations & Agents” section (1).
The “Stripe” tile in the “Payment systems” block of the “Integrations & Agents” section (1).
The “Stripe” window: the connection fields (2) and “Verify and connect” (3).
The “Stripe” window: the connection fields (2) and “Verify and connect” (3).

What happens on connection

  • The cabinet checks the key with a trial request to Stripe — no money is charged.
  • If the key is accepted, the cabinet itself creates a webhook in your Stripe account — through it payments and refunds reach the bookings. You do not need to create it by hand.
  • The “Connected” status appears under the tile name, the tile’s toggle turns on, and the window shows a “checked” line with the date and time.

Test and live mode

The mode is determined by the keys. With pk_test_ and sk_test_ keys, payments go through in Stripe test mode — this way you can check the whole chain with a Stripe test card without spending money; such payments are marked “Test (Sandbox)” in the bookings. Before working with customers, replace both keys with live ones (pk_live_ and sk_live_): open the Stripe window, paste the new keys and click “Verify and connect” again. The cabinet removes the previous webhook itself.

How to check the connection

  • The status under the tile is “Connected”.
  • In the Stripe window, in the “Exchange log” table, there are “Key check” and “Setup at the provider” rows (the cabinet has registered the webhook) with the result “Success”.
  • Open any booking with a debt and click “Payment link” — a window appears with a link to the Stripe payment page; it has already been copied to the clipboard.

What changes in the cabinet

  • Payment link. In the booking card, in the “Payments” section (see Payments in a booking), the “Payment link” button opens a payment in Stripe for the remaining debt of the booking. The link is copied to the clipboard at once — send it to the customer. It is valid for 24 hours.
  • The payment arrives automatically. When the customer pays, a payment appears in the booking with the method “Card”, the status “Paid” and the comment “Stripe”.
  • Booking from your website. If online payment is on in the booking widget, after booking the visitor goes to the Stripe payment page. After paying they see the “Payment received” page and in 10 seconds return to the page of your website where they booked. The “back” link on the Stripe page leads to the same page of your website — the booking then stays unpaid.
  • Refund to the card. The “Refund payment” button on such a payment returns the money to the customer through Stripe. A refund made in the Stripe account is also recorded in the booking.
  • Leasing recurring payments. A leasing order can have a recurring payment: the amount is charged to the customer's saved card on a schedule, with an invoice for each charge (see Leasing).
  • Exchange log. Every link, payment and refund is shown in the Stripe window as log rows — along with the reason if something did not go through.

If it did not work

  • “The provider rejected the key” — check that you copied the secret key (sk_… or rk_…), not the publishable one, and that the key has not been revoked.
  • “Could not set up the webhook with the provider” — the restricted key lacks the write permission for Webhook Endpoints.
  • Stripe keys of different modes or a wrong publishable key — the “Stripe publishable key” field needs a pk_… key, and both keys must be of the same mode: both test or both live.
  • The “Key error” status on an already connected tile — Stripe has stopped accepting the key: paste a current one and click “Verify and connect”.

How to disconnect

In the Stripe window click “Disconnect” and confirm. The key is deleted, the webhook in Stripe is removed, and payments through Stripe stop. To pause payments only temporarily, turn off the toggle on the tile and click “Save” — the key is kept.