In this article, you can learn about the MyCashflow single-page checkout's work logic.

The single-page checkout is one out of three checkout types available in MyCashflow, in which all checkout forms are displayed on one page. Individual checkout sections are updated with AJAX requests.

Different parts of the checkout are printed by using separate tags. They are:

The same tags are used to print checkout forms in the multi-page-checkout. The only difference is that, in the single-page checkout, forms are saved by using asynchronous AJAX requests to avoid unnecessary page reloads at checkout when the customer fills in the forms.

The ajax:true attribute is added to all checkout form tags so that the tags return only their own value and potential error notifications.

Depending on the customer's location, the contents of each checkout part are sent as a POST request either to the /cart or /checkout address. The filled-in form is returned together with the modifications and if the form contains an error, the relevant error notifications are added to the return value.

Once the information entered to a checkout form has been sent to the server and the response has been received, the other checkout forms can be updated with the GET request. For instance, if changes are made to the delivery address, you may want to update the shipping methods too as they often depend on the country of delivery.

See also the instructions for updating single-page checkout parts.