Skip to main content
This page is part of the REST API Guides. Card capture happens in the frontend through the Payments Library; see the Payments Library Guides.
Prerequisites: API key, a Payment Gateway Account for each operator, and the Payments Library in your booking page. This guide is for rental, tour, venue and other booking platforms. Each operator on your platform has its own payment gateway, and a booking produces several payments over time: a deposit, a balance, extras, and sometimes a refund.

The Pattern

  1. At booking, place a hold on the card and save a token for it in one step.
  2. Later, capture the hold, charge the balance, charge for extras or damage, and refund part of a payment. Every call uses the same token.
  3. Every payment goes through the operator’s own Payment Gateway Account.
The token is an Orchestra token. It is not tied to one payment gateway, so the same card can be charged through whichever Payment Gateway Account you name on each call. A token only works in the Orchestra account that created it.

1. At Booking: Hold and Tokenize

Start a Payments Library session with the PREAUTH_AND_TOKENIZE operation. Set amount to the amount you want to hold and paymentGatewayAccountId to the operator’s Payment Gateway Account.
The customer enters their card in your page. Orchestra places the hold through the operator’s Payment Gateway Account. If the hold succeeds, Orchestra also saves the card and returns a token. If 3D Secure is set up for the session, it runs at this point. See Library 3D Secure. When the session completes, send the results token to validateResults from your server (see Result Handling). The response contains the parts you need to keep:
Store these values with the booking:
If the session lists fallback gateways and the operator’s gateway declines, the hold may be placed by a fallback gateway. upgChargeResults always holds the final attempt, and its gatewayName shows which gateway placed the hold. Capture or void the hold through that gateway’s Payment Gateway Account.

2. Collect the Deposit: Capture the Hold

When you are ready to take the deposit, capture the hold. Send the capture to the Payment Gateway Account that placed the hold, with the hold reference in refTransId:
Send this body with PUT /PaymentGateway/capture. See Capture for full examples in each language.
A hold does not last forever. How long it stays valid depends on your payment processor and the card, so check with your payment processor and capture before it expires.

3. Charge the Balance on a Set Date

You have two options. Both use the token you stored at booking.
Your system calls POST /PaymentGateway/charge on the due date, with the balance amount and the operator’s Payment Gateway Account:
The result comes back on the request, including the transaction reference you need for a later refund. You can also add fallback gateways. See Charge Payments.
A payment contract charges only through the template’s Payment Gateway Account. It does not use fallback gateways. It sends the charge without a security code (CVV) and without 3D Secure data. If the charge fails, the contract stays Active and Orchestra tries again on the template’s schedule until a charge succeeds. If you collect the balance another way, cancel the contract.
Choose your own charge if you need the transaction reference straight away, for example to refund part of the balance later. The contract API reports whether the charge succeeded, but it does not return the transaction reference.

4. Charge for Extras or Damage

For extras, incidentals or damage found after the stay, charge the stored token with POST /PaymentGateway/charge. The request body is the same as in Your own charge above, with the new amount. The security code (cvv) is optional for a tokenized card.

5. Refund Part of a Payment

To return part of a captured deposit or a charge, send PUT /PaymentGateway/refund with a smaller amount. Use the Payment Gateway Account that processed the payment and the transaction reference it returned:
See Partial Refunds.

6. Release a Hold You Will Not Use

If the booking is cancelled before you capture, void the hold with DELETE /PaymentGateway/void. Send the same hold reference, amount and Payment Gateway Account as for the capture. See Void.
Do not wait for a hold to expire. If you are not going to capture it, void it so the customer’s funds are released.

Authorize & Capture

Capture and void in detail

Scheduled Payments

Templates and payment contracts

Refunds & Voids

Return funds or release a hold

Result Handling

Validate the session result on your server