7.6 PayPal integration for car rental software

With the PayPal integration, the car rental software lets the customer pay for a booking from their PayPal account. Once it is connected, the “Payment link” works in the booking card: the customer approves the payment on the PayPal page, and the cabinet captures the money and records the payment in the booking automatically. To connect, you need the Client ID and Secret of your PayPal REST app.

Where to get the Client ID and Secret

  1. Log in to developer.paypal.com with the details of the PayPal account that will receive the payments.
  2. Open Apps & Credentials and choose a tab: Live for real payments, Sandbox for testing with test money.
  3. Choose your app or create a new one.
  4. Copy the Client ID and Secret of this app.

The keys of the Live and Sandbox tabs are different: each pair works only in its own connection mode.

Where to connect the PayPal integration

  1. Open the settings, the “Integrations & Agents” section.
  2. In the “E-money” block click the “PayPal” tile (on the name, not on the toggle).
  3. In the “Mode” field choose “Live” or “Sandbox (test)” — the same as the tab the keys come from.
  4. In the “PayPal” window fill in “PayPal app Client ID” and “PayPal app Secret”.
  5. Click “Verify and connect”.

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

The “PayPal” tile in the “E-money” block of the “Integrations & Agents” section (1).
The “PayPal” tile in the “E-money” block of the “Integrations & Agents” section (1).
The “PayPal” window: the connection fields (2) and “Verify and connect” (3).
The “PayPal” window: the connection fields (2) and “Verify and connect” (3).

What happens on connection

  • The cabinet checks the Client ID and Secret pair by using it to get access to PayPal — no money is charged.
  • If the keys are accepted, the cabinet itself registers a webhook with PayPal — 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.

Testing in the sandbox (Sandbox)

The PayPal sandbox means test money and test accounts: you can go through the whole payment path without charging anything for real.

  1. On developer.paypal.com open Apps & Credentials, the Sandbox tab, and click Create App (type Merchant). PayPal creates the test seller and buyer accounts itself — they are under Testing Tools → Sandbox Accounts.
  2. Copy the Client ID and Secret of the Sandbox app.
  3. In the “PayPal” window choose the “Sandbox (test)” mode, paste the keys and click “Verify and connect”. The tile shows “Connected · Sandbox (test)”.
  4. Create a trial booking, click “Payment link” in it and open the link: it is a sandbox.paypal.com page. Log in with the test buyer account (type Personal) from Sandbox Accounts and pay.
  5. A few seconds later the booking shows a payment marked “Test (Sandbox)”. You can also try “Refund payment” there.
The “PayPal” window in sandbox mode: the “Mode” field set to “Sandbox (test)” (1).
The “PayPal” window in sandbox mode: the “Mode” field set to “Sandbox (test)” (1).

A test payment closes the booking debt just like a real one, so use a separate booking for the trial.

How to switch to live keys

  1. On developer.paypal.com, in Apps & Credentials, open the Live tab, choose or create an app and copy its Client ID and Secret.
  2. In the “PayPal” window choose the “Live” mode, paste the Live keys and click “Verify and connect”.
  3. The tile shows “Connected” without the “Sandbox” note. The cabinet removes the sandbox webhook and registers the live one itself.

Sandbox payments stay in the bookings marked “Test (Sandbox)”. If they get in the way, delete them in the booking card with the “Delete payment” cross.

How to check the connection

  • The status under the tile is “Connected”.
  • In the PayPal 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 PayPal 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 PayPal for the remaining debt of the booking. The link is copied to the clipboard at once — send it to the customer.
  • Payment in two steps. The customer only approves the payment on the PayPal page; the cabinet captures the money itself when PayPal reports the approval. If the customer closes the tab after approving, the payment still goes through.
  • The payment arrives automatically. After the capture, a payment appears in the booking with the method “Electronic money”, the status “Paid” and the comment “PayPal”.
  • Refund. The “Refund payment” button on such a payment returns the money to the customer through PayPal. A refund made in the PayPal account is also recorded in the booking.
  • Exchange log. Every link, payment and refund is shown in the PayPal window as log rows — along with the reason if something did not go through.
  • Test payments. A payment made in the sandbox and its refund are marked “Test (Sandbox)” — in the booking card and in the “Payments” section. There is no real money behind them.

If it did not work

  • “PayPal rejected the keys…” — the Client ID and Secret come from different apps, or the mode does not match the keys: Sandbox keys work only in “Sandbox (test)” mode, Live keys only in “Live” mode. Check the “Mode” field in the PayPal window.
  • “Could not set up the webhook with the provider” — PayPal did not accept the webhook registration; the reason text is next to it and in the exchange log.
  • The “Key error” status on an already connected tile — PayPal has stopped accepting the keys: enter current ones and click “Verify and connect”.

How to disconnect

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