Building for an omni-channel business with Square’s APIs has never been easier

Building for an omni-channel business with Square’s APIs has never been easier

Use the full power of Square’s Connect APIs and reporting tools to supercharge your online or omni-channel business.

Starting with the launch of our E-Commerce API, we’ve worked to create a powerful commerce platform for both online-only and multi-channel businesses. In the last few months we’ve introduced our Catalog API, a tool to help businesses manage their products more efficiently, as well as Square Checkout, an out-of-the-box, hosted checkout for Square developers. And today, we are tying it all together to make sure developers can provide all the necessary tools for every omni-channel business eCommerce and in person.

With the new Orders API, the tools developers build for Square sellers connect their Catalog to their online sales through our APIs for online payments. This full itemization translates to more meaningful reporting for online businesses, and especially for those who also sell in-person and share a catalog between channels.

Implementation

To implement full itemization, all a developer needs to do is create an Order and reference the order_id in our Charge endpoint or directly pass the order as part of the Checkout POST request.

{
   "idempotency_key": "74ae1696-b1e3-4328-af6d-f1e04d947a13",
   "reference_id": "my-order-001",
   "line_items": [
      {
         "catalog_object_id": "7WBTDGGMYEJYU2GINA7HHKO2",
         "note": "catalog-note",
         "quantity": "1",
         "discounts": [
            {
               "catalog_object_id": "JYAQQC6AE7WUL5DPAYW7IH3O"
            }
         ],
         "modifiers": [
            {
               "catalog_object_id": "YZ4TIQBFGOYFGEISYTVWGM4A"
            }
         ]
      },
      {
         "name": "T-Shirt",
         "note": "custom-note",
         "variation_name": "Mini",
         "quantity": "1",
         "base_price_money": {
            "amount": 1000,
            "currency": "USD"
         },
         "taxes": [
            {
               "name": "Sales Tax",
               "type": "ADDITIVE",
               "percentage": "12"
            }
         ],
         "discounts": [
            {
               "name": "$3 off Discount",
               "amount_money": {
                  "amount": 3,
                  "currency": "USD"
               }
            }
         ]
      }
   ]
}

Like the earlier release of Checkout we didn’t limit this to just merchants who have catalogs stored on Square. You can still use the feature even if you just want to create, one-off, ad hoc items.

Reporting

Now, when creating an Order and charging it, the full itemization will be available via Square dashboard with full discount, taxes and item breakdown. Custom amounts are still available if you don’t use itemization. We also allow you to consume that information directly via our API. All you need to do to see your order information is: ListTransactions to get the order_id and then BatchRetrieveOrders.

When creating custom items, Square’s internal systems will take care to aggregate your custom item sales data to show you the full picture of your business.

Additional Reading

Table Of Contents