Skip to content

Payment Gateways

Akram El Assas edited this page Feb 6, 2025 · 3 revisions

BookCars supports Stripe and PayPal payment gateways. You can choose either to use Stripe or PayPal for payments.

Supported countries

If your country is not supported by Stripe, you can check if it is supported by PayPal. And if so, you can use PayPal payment gateway instead of Stripe.

Stripe Configuration

API

To use Stripe, you need to set the following settings in api/.env:

BC_STRIPE_SECRET_KEY=STRIPE_SECRET_KEY

You can find Stripe secret key in Stripe Developer Dashboard.

Frontend

To use Stripe, you need to set the following settings in frontend/.env:

VITE_BC_PAYMENT_GATEWAY=Stripe # Stripe or PayPal
VITE_BC_STRIPE_PUBLISHABLE_KEY=STRIPE_PUBLISHABLE_KEY

You can find Stripe publishable key in Stripe Developer Dashboard.

Mobile App

To use Stripe, you need to set the following settings in mobile/.env:

BC_STRIPE_PUBLISHABLE_KEY=STRIPE_PUBLISHABLE_KEY
BC_STRIPE_MERCHANT_IDENTIFIER=MERCHANT_IDENTIFIER
BC_STRIPE_COUNTRY_CODE=US

Paypal Configuration

API

To use PayPal, you need to set the following settings in api/.env:

BC_PAYPAL_CLIENT_ID=PAYPAL_CLIENT_ID
BC_PAYPAL_CLIENT_SECRET=PAYPAL_CLIENT_SECRET
BC_PAYPAL_SANDBOX=true

You can find PayPal keys in PayPal Developer Dashboard.

For production, once your PayPal app is verified you need to set:

BC_PAYPAL_SANDBOX=false

At the beginning, toggle sandbox mode in PayPal Developer Dashboard and test that everything is working in sandbox mode.

When you want to go live, you need to register your application with PayPal.

Important: Before you register your PayPal application, make sure the status of the PayPal account used to submit the application is verified.

To submit your website, log into the PayPal Developer website by using the credentials of the PayPal account registered to the application owner.

Note: The PayPal account associated with the application must be a verified Premier or verified Business account.

Click My Apps & Credentials and toggle to the Live tab.

That's it. Your app will be reviewed and registered by PayPal. You can find more details about the review process here.

Frontend

To use PayPal, you need to set the following settings in frontend/.env:

VITE_BC_PAYMENT_GATEWAY=PayPal # Stripe or PayPal
VITE_BC_PAYPAL_CLIENT_ID=PAYPAL_CLIENT_ID

Mobile App

The mobile app only supports Stripe. PayPal is not supported yet.