Cart payment sessions

Start a checkout session when a payment is needed

14401440

Overview

A cart in Roqqett is the technical construct used to wrap the Roqqett payment flow and thus should be created when a payment is needed.

A cart payment session is initiated by a merchant and completes when either:

  • the customer authorises and completes payment
  • the customer cancels payments
  • the customer abandons the payment
    NB: a cart session by default expires after 20mins but a merchant can provide their own expiry time via the /cart endpoint.

If the cart session successfully completes, then an order with an embedded payment will be created that will be visible in the Roqqett portal (info / link). If the session completes unsuccessfully, then the order and payment will not be created, ie Roqqett are not reporting on unsuccessful carts in the Roqqett portal.

Within a cart session, there may be many payment attempts. This essentially mean that your consumers can easily retry payments as many times as they like - without restarting - and the cart session will only complete when with they have successfully paid.

It's good to understand the relationship between cart session and payments so you can leverage and optimise your cart sessions as much as possible.

Test carts

Cart functionality and different payment outcomes may also be tested using the test mode operation provided by carts.

First in the Roqqett portal ensure that a Checkout instance has the property 'test mode' set to true. This will enable test carts to be processed by the Checkout. Non test mode carts will still be possible with Checkout instances that have test mode set to true.

Second when initiating the creation of a cart at the /carts endpoint pass the HTTP body value testMode = true in order to enable test mode for the resultant cart.

Third when following the authorisation link to pay this cart the authenticating user will be presented with a Roqqett screen offering which payment outcome they desire. Options to pick from include: Paid / Cancelled / Failed / Abandoned.

Upon selection of the desired outcome, the payment journey will progress to the selected state and if Paid was selected the order complete webhook will be dispatched to your configured endpoint.

Test payments will be marked as such when viewed by the payments screen in the Roqqett portal.

Key callouts

  • Payment attempts are unlimited - The payment process is repeatable (by design) within a cart session.
  • Cart sessions do not fail - Unsuccessful cart sessions do not fail. They are either cancelled or abandoned.

Any questions? Ask us via chat here (bottom right) or on our help center.