> For the complete documentation index, see [llms.txt](https://docs.phptravels.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.phptravels.com/payments/stripe.md).

# Stripe

Connect Stripe to PHPTRAVELS: enable the gateway, add your publishable and secret keys, run a test booking with test cards, then take live card payments.

Learn how to seamlessly integrate Stripe, a secure and reliable payment gateway, into your PHPTRAVELS platform. This guide covers everything from configuring your Stripe account to enabling payments for hotels, tours, cars, and flights. Follow our step-by-step instructions to enhance your customers' payment experience.

{% embed url="<https://youtu.be/Qy3a1xpzTxI>" %}

### Stripe setup in writing

Stripe is a card payment gateway. In PHPTRAVELS it sits in the payment gateway list next to PayPal, Adyen, bank transfer and wallet balance. You connect your **own** Stripe account, so card payments settle in your Stripe balance and pay out to your bank; PHPTRAVELS never holds the money. The booking, the charge and any refund stay linked in your admin.

### What you need

* A Stripe account for your business, activated for the country and currencies you sell in. Stripe's own fees and country rules apply.
* Your Stripe **publishable key** and **secret key** from the Stripe dashboard. Start with the **test** keys; use live keys only after testing.
* Admin access to your PHPTRAVELS website, served over HTTPS (see [SSL Force](https://docs.phptravels.com/startup/ssl-force)).

### Connect Stripe

1. Log in to the admin panel at `yourdomain.com/admin`.
2. Go to **Settings > Payment Gateways** and open **Stripe**.
3. Make sure the gateway status is active and set **Dev mode** to development.
4. Paste the test publishable key and test secret key into their fields and save.

### Test a payment

1. On your website, book any product and choose Stripe at checkout.
2. Pay with one of Stripe's published test card numbers.
3. Try a card that requires 3-D Secure and complete the authentication step.
4. Check that the booking is marked paid in the admin and that the payment appears in your Stripe test dashboard.
5. Refund the test payment and confirm the refund shows in both places.

### Go live

Replace the test keys with your live publishable and secret keys, set **Dev mode** to production, and make one small real payment to confirm.

### Common errors

* **Invalid API key** -- keys swapped, copied with spaces, or test keys used with production mode.
* **Payment declined in test mode** -- use Stripe's test cards, not a real card.
* **Currency not supported** -- charge in a currency your Stripe account supports.
* **Booking unpaid after payment** -- the return to your site failed; check HTTPS and your site URL.

Need help? [Submit a ticket](https://docs.phptravels.com/support/submit-ticket) with your Order ID.
