By the end, a Velocity customer will pay a refundable deposit to reserve a car and pay the balance at pickup. You added sign-in and a database to Velocity. Now turn it into a real booking business: hold each car with a refundable deposit at booking, then charge the balance on pickup. Replit handles payments through Stripe — you don’t write any Stripe code yourself.Documentation Index
Fetch the complete documentation index at: https://docs.replit.com/llms.txt
Use this file to discover all available pages before exploring further.
Decide the deposit and balance amounts
Before asking Agent to build, pick the math:- Deposit at booking: a flat amount or a percentage of the total? A flat $500 is simpler to communicate; 20% scales with the car.
- Balance at pickup: the rest of the rental cost, charged when the customer collects the keys.
- Refund window: how late can someone cancel and still get their deposit back? 48 hours is a common default.
Tell Agent to add Stripe checkout
Agent will set up Stripe under the hood, add the deposit and balance flows, and tell you which secret keys to grab from Stripe. Paste them into your app’s settings when Agent asks — your test keys live there, never in the code.
Test the full flow in test mode
Stripe gives you a special test card so you can run real-feeling payments without spending real money:4242 4242 4242 4242, any future expiry, any 3-digit CVC.
- Sign in to Velocity in Preview and reserve a car for next Saturday-Sunday.
- At checkout, you should see “Deposit today: 1,900” (or whatever your math produces).
- Pay the deposit with the
4242test card. You should return to a confirmation page showing the deposit paid and a payment method saved for the balance. - Open the booking from “My bookings” and use the admin or pickup action to charge the balance. Confirm the balance shows as paid.
- Make a second reservation, then cancel it more than 48 hours out. The deposit should refund to the test card (you can verify in your Stripe test-mode dashboard).
- Make a third reservation and cancel inside 48 hours. The deposit should be kept and clearly explained to the customer.
- Try checkout with Stripe’s decline test card (
4000 0000 0000 0002). The reservation should not be confirmed and the customer should see a clear failure message.
Switch to live payments when you’re ready
Test mode is for you. Live mode is for real customers handing over real money. When Velocity is ready:- In Stripe, switch from test mode to live mode and copy the live secret keys.
- In your app’s settings, replace the test keys with the live ones.
- Publish Velocity again from the Agent chat.
- Open the public URL, book a low-cost test car with your own real card, and confirm both the deposit and the balance flow work end-to-end.
Improve it next
Add integrations
Send each booking to the customer’s calendar.
Add a custom domain
Move Velocity to a branded URL before charging customers.
Need further help?
- Deposit succeeds but the reservation isn’t confirmed: ask Agent to connect the Stripe success event to the reservation status in the database.
- Test mode works, live mode doesn’t: make sure you replaced the test keys with the live ones in your app’s settings.
- You want one upfront payment instead of deposit + balance: tell Agent to switch Velocity to a single full payment at booking.
- You want recurring subscription pricing (monthly access to the fleet): Replit also supports RevenueCat — ask Agent to use it instead of Stripe.