Confirming an Uplift Booking
  • 01 Aug 2025
  • 1 Minute to read
  • Dark
    Light

Confirming an Uplift Booking

  • Dark
    Light

Article summary

Once a virtual payment card has been processed and the booking has been confirmed by you, a call containing a confirmation number for the booking must be sent to Uplift’s API. This call informs Uplift that the booking was successfully completed and allows Uplift to provide a better customer service experience for all customers, as it will be used as a reference by Uplift’s customer support representatives.

val orderConfirmationCallback = object : OrderConfirmationCallback {
    override fun onSuccess() {
        // Callback method which is called when a successful confirmation has happened.
    }
    override fun onError(error: ULError) {
        // Callback method which is called when an error has happened during the confirmation.
    }
}
runCatching {
    ULOrderManager.getInstance().orderSuccessWithId(
        confirmationId = UUID.randomUUID().toString(),
        orderConfirmationCallback = orderConfirmationCallback
    )
}.onFailure {
    Log.d("UpliftSDK", "SDK has not been initialized properly.")
}

Should an error occur in your system that prevents a traveler from successfully booking a trip and/or receiving a confirmation, a brief, human-friendly message describing the error that occurred must be passed to the API. This will be used as a reference by Uplift’s customer support representatives also.

val error = ULOrderError(
    type = ULOrderErrorType.ULOrderErrorTypePayment,
    message = "Something went wrong!"
)
val orderConfirmationCallback = object : OrderConfirmationCallback {
    override fun onSuccess() {
        // Callback method which is called when a successful confirmation has happened.
    }
    override fun onError(error: ULError) {
        // Callback method which is called when an error has happened during the confirmation.
    }
}
runCatching {
    ULOrderManager.getInstance().orderFailWithErrors(
        error = error,
        orderConfirmationCallback = orderConfirmationCallback
    )
}.onFailure {
    Log.d("UpliftSDK", "SDK has not been initialized properly.")
}

Deleting an Order

The purpose of the deleteOrder method is to reset an already active checkout session. While it is not mandatory, it can be useful to call this method in cases of successful payment, canceled payment, or payment error to ensure that all previous checkout data is cleared from the cache.

runCatching {
    ULOrderManager.getInstance().deleteOrder()
}.onFailure {
    Log.d("UpliftSDK", "SDK has not been initialized properly.")
}

Was this article helpful?

What's Next