Stripe and Automated payments bookings
This article describes a booking flow via API for supplier's or agent's integrations which process a credit card payment using Stripe or RezdyPay gateway or automated payment bookings. Which are essentially the following configurations:
- A product is setup with agentPaymentType=PAYOUTS. Full payment must be processed through Rezdy. We use Stripe to process payments, and you therefore need to implement an extra call directly to Stripe, before calling Rezdy Booking API.
- A product is setup with any manual payment type and you want process a credit card payment using Stripe or RezdyPay gateway. We use Stripe to process payments though Rezdy platform account, using your Stripe account as a charge destination, and you therefore need to implement an extra call directly to Stripe, before calling Rezdy Booking API.
For these booking configurations use the following 2 steps booking flow:
- Request a Stripe card token, by sending the customer’s credit card details directly from the customer's browser to Stripe. You must use a client-side library (Checkout, Elements, or mobile libraries) to perform this process, client-side. You must NOT use the Stripe API. Use Rezdy’s Stripe publishable key (see below) in your request, for the token to be generated on Rezdy’s account. The card is not charged at this stage.
- Call POST /bookings service, as above, but do not include any booking.payments data. You must instead send a creditCard.cardToken parameter that is Stripe’s generated token (id field from Stripe’s API response). Rezdy will confirm the booking, consume the token by processing the payment and record payment on the booking object.
Rezdy’s Stripe publishable keys are:
TEST keys are usable on api.rezdy-staging.com. PROD key must be used on api.rezdy.com.