Skip to content

Bookings Cancel

Brad Ploeger edited this page Apr 3, 2019 · 2 revisions

Services \ Bookings \ Cancel

Purpose

Cancels an existing booking and send notifications about the cancellation.

NOTE: In case of an Automated Payment booking, will also refund payment.

Basic Usage:

$rezdyApi->bookings->cancel($orderNumber, $optionalSettings);

Required Parameters

  • string: $orderNumber

Optional Parameters

  • array: $optionalSettings

Returns

Throws (with errors)

Code Example

use Rezdy\RezdyAPI;

// Initialize the API
$rezdyAPI = new RezdyAPI('your api key');

// IMPORTANT! The order number must be passed as a string.
$orderNumber = '123456';

$options = [ 'sendNotifications' => false ];

// Send the request to the API
$response = $rezdyAPI->bookings->cancel($orderNumber, $options);

// View the response
echo $response;

Clone this wiki locally