Search⌘ K
AI Features

Generate Orders

Explore how to generate, clone, and calculate orders using Square APIs in JavaScript. Learn to create orders with detailed product and pricing info, clone existing orders in draft form, and estimate order totals before confirmation.

In this lesson, we'll start our discussion on very useful APIs for processing orders provided by Square. Mainly, we'll explore the following three APIs:

CreateOrder
https://connect.squareupsandbox.com/v2/orders
CloneOrder
https://connect.squareupsandbox.com/v2/orders/clone
CalculateOrder
https://connect.squareupsandbox.com/v2/orders/calculate

Create an order

The CreateOrder endpoint creates an order which includes information about the products and the settings to be applied to that purchase.

This endpoint requires an Order object as a request parameter. This object consists of ...