Skip to content

Confirm a booking

POST
/api/v5/bookings/{id}/confirm

Confirms and pays for a booking, lodging it with the selected courier. Requires an API key and booking ownership. A payment-aware retry on an already-paid booking returns 204; returns 402 when payment is declined or fails.

id
required
string
/^\d+$/
Example
623630

Numeric booking ID.

object
courier
required

Courier string_id of the selected quote to confirm and pay.

string
>= 1 characters
pickup-date

Requested pickup date (YYYY-MM-DD); hyphenated alias of pickup_date.

string
/^\d{4}-\d{2}-\d{2}$/
pickup_date

Requested pickup date (YYYY-MM-DD); underscore alias of pickup-date.

string
/^\d{4}-\d{2}-\d{2}$/
pickup-time
Any of:
string
pickup_time
Any of:
string
tier

Selected quote tier number when the courier offers multiple tiers.

integer
payment_method

How to pay: “nab_” or “paypal_” (an id from GET /api/members/payment-methods), “credit” to bill your credit account, or “demo” for a sandbox booking. May be sent alongside payment only if the two agree.

string
/^(demo|credit|(nab|paypal)_\d{1,15})$/
payment
One of:
object
method
required

Charge the booking to the member account credit balance.

string
Allowed values: credit
agreed_terms

Explicit acceptance of the Transdirect Terms and Conditions for this booking. Omitted defaults to the account’s standing acceptance.

boolean
nullable
agreed_warranty

Explicit acceptance of the selected carrier’s Transit Warranty terms for this booking, when the carrier has one. Omitted defaults to the account’s standing acceptance.

boolean
nullable

Booking confirmed, or already-paid payment-aware confirmation retry accepted

Invalid booking confirmation request

object
errors
required
Any of:
Array<string>
payment_error

Details of the payment gateway failure, when a payment was attempted.

object
code

Gateway error code for the failed payment.

string
nullable
user_message

User-facing message explaining the payment failure.

string
nullable
log_id
Any of:
string
method

Payment method that failed, e.g. “card” or “paypal”.

string
nullable

Missing or invalid API key

Payment declined or failed

object
errors
required
Any of:
Array<string>
payment_error

Details of the payment gateway failure, when a payment was attempted.

object
code

Gateway error code for the failed payment.

string
nullable
user_message

User-facing message explaining the payment failure.

string
nullable
log_id
Any of:
string
method

Payment method that failed, e.g. “card” or “paypal”.

string
nullable

Booking not found

Unexpected confirmation failure

object
errors
required
Any of:
Array<string>
payment_error

Details of the payment gateway failure, when a payment was attempted.

object
code

Gateway error code for the failed payment.

string
nullable
user_message

User-facing message explaining the payment failure.

string
nullable
log_id
Any of:
string
method

Payment method that failed, e.g. “card” or “paypal”.

string
nullable