Confirming an Uplift Booking
  • 20 Jun 2023
  • 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.

/**
 * You can find a Kotlin example in the example project's PayViewModel.kt file 
 * in the "handleAction" method.
 */
ULOrderManager.orderSuccessWithId(UUID.randomUUID().toString(), 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.
    }
})

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.

/**
 * You can find a Kotlin example in the example project's PayViewModel.swift file
 * in the "handleAction" method.
 */
val error = ULOrderError(
    ULOrderErrorType.ULOrderErrorTypePayment,
    "Something went wrong!"
)
ULOrderManager.orderFailWithErrors(error, 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.
    }
})

Deleting an Order

To delete an order once the booking is complete and confirmation has been sent to UpLift, call this method

ULOrderManager.deleteOrder()

Was this article helpful?

What's Next