Checking the status of the modal

Learn how to check the status of Drop-in Checkout
Use getStatus() exposed by the DigitalRiverCheckout object to check the current status of the Prebuilt Checkout modal.
const status = drCheckout.getStatus();
The method returns a status that indicates the state of the modal and the customer’s currentStep in the experience:
"status": {
"modal": "active",
"currentStep": "addressInfo"
The following are the possible modal status values:
  • pending: The checkout-session identifier is not yet created
  • inactive: The checkout-session identifier is created and the modal is initialized
  • active: The modal window is displayed to the customer
  • failed: The modal window cannot be displayed to the customer
  • aborted: The customer closed the modal window
  • finished: The customer provided payment and submitted the order (i.e., Digital River associated the source with the checkout and created the order)
The following are the possible currentStep values: