RezdyPay 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 RezdyPay gateway or automated payment bookings. Which are essentially the following configurations:

  1. A product is setup with agentPaymentType=PAYOUTS. Full payment must be processed through Rezdy.
  2. A product is setup with any manual payment type and you want process a credit card payment using RezdyPay gateway.

RezdyPay payment gateway uses Stripe as an underlying payment provider to process payments though Rezdy platform account, using your Stripe account as a charge destination using Stripe Charge API. Therefore, you will need to implement an extra call directly to Stripe, before calling Rezdy Booking API.

Charge flow

Use the following 2 calls booking flow:

1. 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.

Rezdy’s Stripe publishable keys are:

Staging environment: pk_test_5nODbTMiGQCMOHg0Nt5LzQUV00CcWuIksX  
Production environment: pk_live_51H4gSPHO6p5n6bFnuGRLb84FCiptIUAwmgYaBubvp5A09HujFx54ExvLkXOufEcqrHsaCWvnmZfO33efkIFVbpIv00PkoJDRDA  

Staging environment keys are usable on Production environment key must be used on

2. Call POST /bookings service, 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.

    "creditCard": {
        "cardToken": "tok_1234zczx9xyzbkBzxcNoabcdef"