Intro

Violet utilizes e-commerce platforms to natively facilitate orders for merchants. Nearly all e-commerce platforms have rate limits on the API’s Violet uses in this process. During normal e-commerce use it is unlikely that your application will hit the rate limits of the e-commerce platforms Violet integrates with. However, there are moments and sales styles where spikes in traffic happen for a single merchant and hitting the rate limit becomes more likely. This is why we introduced Quick Checkout, processing more sales in times of higher traffic.

Currently Violet passes all failures in checkout relating to surpassing rate limits downstream. When integrating with Violet you must consider and prepare for such scenarios in all API calls to Violet. Handling rate limits with Violet

Why and When

Why use Quick Checkout? The primary benefit of Quick Checkout is reducing the number of requests to external platforms, allowing you to process more sales before hitting the e-commerce API rate limits that exist beyond Violet’s control. The standard checkout can require 8 or more calls to e-commerce APIs. By consolidating the amount of calls, Quick Checkout reduces this number to 4 (and even less with some platforms). This allows you to process twice as many orders before reaching the platform’s rate limit for that merchant connection.

As an example, Shopify has a rate limit of 40 request bucket per second per merchant, once the bucket is empty it refills at 2 requests per second. So when doing a Product Drop with a single merchant you could make 10 sales with Quick Checkout before hitting the rate limit versus 5 sales with standard Checkout options.

When should I use Quick Checkout? As you may have figured from our examples above, we recommend using Quick Checkout anytime you expect spikes in traffic for a merchant.

Example times to consider using Quick Checkout

  • Product Drops
  • New Merchant Launch
  • Holiday Sales
  • Single Product Orders
  • Merchant Sales consistently exceeding rate limits.

Considerations for Quick Checkout

Dynamic price information

During checkout Violet doesn’t handle monetary calculations, instead we retrieve the information from the e-commerce platform itself. Subtotal, Tax, Shipping Costs, Total, all are calculated by the e-commerce platform making orders as native as possible. During checkout when using the ?price_cart=true param on the end of checkout requests they will call out to the e-commerce platform. So by removing this property, we can avoid these calls for cart pricing; however, the cart is still priced after applying shipping methods for the final time, so the user will be shown and charged the correct amount at the end. Until the shipping methods have been applied and final price information has been retrieved, it is possible that cart totals will not be entirely accurate and in-sync with the e-commerce platform.

Step by Step Implementation

If you are thinking “this looks like the standard checkout flow”, that’s because it contains all the same elements consolidated into fewer calls. Quick Checkout is fully compatible with the standard checkout flow, it is more a way to structure the calls when doing specific sales types.

1. Create Cart (+1 E-Comm Request)

POST /v1/checkout/cart

Create Cart

Using the create cart endpoint to pass more information is the primary difference for the Quick Checkout flow, it allows you to pass in customer info, both addresses, and one or more items that will be in the cart instead of separating this into potentially 5 requests like the standard checkout flow would. Saving at minimum 4 requests to the e-commerce platform. Any additional Add SKU, Update SKU, or Remove SKU will add to the number of e-commerce requests that are being made.

When including the customer data in the cart creation request. It follows the same schema as the POST /v1/checkout/cart/{cart_id}/customer endpoint (Apply Guest Customer to Cart, Set Billing Address).

Text
    {
    "skus": [
        {
            "sku_id": 00000,
            "quantity": 1
        }
    ],
    "customer": {
        "first_name": "First",
        "last_name": "Last",
        "email": "example@violet.io",
        "shipping_address": {
            "address_1": "2815 Elliott Ave",
            "address_2": "Unit 100",
            "city": "Seattle",
            "state": "WA",
            "country": "US",
            "postal_code": "98121"
        },
        "same_address": true
    }
}

2. Get Shipping Methods (+1 E-Comm Request)

GET /v1/checkout/cart/{cart_id}/shipping/available

Get Available Shipping Methods

3. Apply Shipping Method (+1 E-Comm Request)

POST /v1/checkout/cart/{cart_id}/shipping

Set Shipping Methods

4. Apply Payment Method

POST /v1/checkout/cart/{cart_id}/payment

Apply Payment Method

5. Submit Cart (+1 E-Comm Request)

POST /v1/checkout/cart/10720/submit

Submit Cart

Supported Platforms

  • Shopify
  • WooCommerce
  • BigCommerce
  • Magento
  • Salesforce Commerce Cloud
  • Ecwid
  • Prestashop

Quick Checkout FAQs

Is it possible for me to use quick checkout with guest orders who have to enter their address and info?