Skip to content
Last updated

Get started with payments

This guide explains how payment data flows through the Demand API and how to integrate payments into your booking flow. It applies to both accommodation and car rental products.


Payment overview

Payment information is distributed across multiple endpoints in the booking flow.

Use different endpoints to:

✅ Discover payment options.
✅ Retrieve payment requirements.
✅ Preview the full payment breakdown.
✅ Create a booking with the correct configuration.

How to use payments

EndpointUse it to ...
/search and /availabilityRetrieve high-level payment availability and payment timings for a product.
/detailsRetrieve supported payment methods for the selected product.
/orders/previewFull payment breakdown and schedule.
/orders/createComplete bookings with correct payment configuration.

Payment flow

A typical integration follows this sequence:

  1. Search for available products.
  2. Retrieve payment options and methods.
  3. Preview the full order and payment breakdown.
  4. Create the order using selected payment configuration.

Step 1 - Search available products

Use

  • /search
  • /availability

These endpoints return high-level payment availability, including:

  • Available payment options.
  • Whether a product is eligible for specific payment flows.

At this stage, payment data is indicative only.

Step 2 - Retrieve payment methods

Use

  • /details

This endpoint returns:

  • Supported payment methods per product.
  • Card types or alternative payment options (if applicable).

This determines how a booking can be paid or guaranteed.

Step 3 - Preview payment breakdown

Use

  • /orders/preview

At this stage, you must treat the response as authoritative for checkout behaviour.

It returns the complete payment configuration, including:

Always treat /orders/preview as the source of truth for checkout

Step 4 - Create the order

Use

  • /orders/create

This finalises the booking.

Ensure:

  • The selected payment option matches orders/preview.
  • Required payment methods are included (if applicable)
  • Payment structure is unchanged from orders/preview.

Core integration rules

Core integration ruleGuidance
Do not hardcode payment behaviour
  • Payment behaviour is dynamic and driven by supplier configuration.
  • It must not be assumed or fixed in the integration.
Always validate against /orders/preview
  • This endpoint defines the final payment structure, required constraints, and authoritative checkout behaviour.
Do not assume a single payment event per order
  • A booking may include multiple charges, split payments, deposits, or guarantees.
Ensure consistency between preview and create
  • /orders/create must strictly match /orders/preview in payment timing selection, required payment method rules, and schedule structure.

Handling multiple payment options

If multiple payment options are returned:

  • Display all available options.
  • Allow the traveller to choose one.
  • Ensure only one timing is used in /orders/create.

Cross-endpoint consistency

Payment data may vary slightly between endpoints due to:

  • Availability updates.
  • Supplier policy changes.
  • Dynamic pricing rules.

tip Always prioritise /orders/preview for checkout logic.


Testing recommendations

Before going live:

  • Test full payment flows in sandbox (for accommodation)
  • Validate real payment method behaviour where required.
  • Ensure order creation matches orders/preview exactly.

Troubleshooting

IssueCauseRecommendation
400 – missing payment methodIn accommodation method_required is true, but no method provided.Use a supported VCC or card in /orders/create
Unexpected payment timingPreview returns multiple payment options.Choose one and match it in your order.
Card ID mismatchProvided card ID not supported.Use IDs returned in the preview response.

Key takeaways

✅ Payments are driven entirely by API responses.
✅ /orders/preview is the authoritative checkout model.
✅ Payment behaviour is not static or hardcoded.
✅ Multiple payment events per booking are expected.
✅ Method + timing + schedule must always be aligned at checkout.


Next steps