Create Cart via API

When using the VRIO Checkout, you may want to pre-populate customer information that was collected at a previous stage of the funnel. This is doable through creating a cart from the API. 

 

To create a cart via the API: 

When using the order/doAdd or order/doEdit you can pass a flag of create_cart.

This will create a cart.

In the response you will see the connection_cart details, which will include a checkout_url value.

This is the cart URL for checkout. Depending on how much data you pass on the order, will determine what step you will go to on the checkout.

 

Here is an example of only passing the email

Example Here

Here is an example of passing first & last name / email / phone

Example Here

 

Sublytics Validation

if you pass bill_fname or bill_lname you need to pass ALL billing details, in order to get completely past step 1, you can also pass first_name and last_name, these will be on the customer

This can also be accomplished creating an order first, with no offers. Adding the Offers later: 

1. order/doAdd then
2. adding an offer to that order, order_offer/doAdd
3. then doing an order/doEdit and passing the create_cart flag, it will then return the cart

 

  Requirements

  • An order MUST have offers to create the cart
  • The campaign MUST have a VRIO checkout connection on it
  • The order CANNOT already be associated with a cart. So this means you must have all your offers on it by the time you create the cart.
  • The API call will fail if any of the above are true. Meaning if you try and create an order and one of the above fails, the order will not be created.
Was this article helpful?
0 out of 0 found this helpful