Categorizing an order on successful payment transaction

Is there documentation that someone can point me to on what fields are accepted by Square on a purchase transaction? I’m looking to assign an order to a Category when the transaction takes place. Is this possible? I’m using Gravity Forms and submitting purchase info from a web form. Thanks.

:wave: Would you mind sharing more about how you would like to categorize orders? Currently we do have Types of orders but that is only PICKUP and SHIPMENT. Also it will all depend on how Gravity Forms is generating the order.

Sure. In the dashboard for the Square account at “Items > Categories” you can create custom categories. When an order is made from the website I want to assign the order to one of these custom categories that have been created.

Gravity forms is sending an array of data to Square on completion of the order. Some of the fields are dempotency_key, source_id, location_id, note, billing_address, customer_id, all of which are accepted by Square. What I am looking for is the field key for the custom categories and what data Square api is expecting as a “key =>value” in the array that is sent to Square.

The array sent to the Square api looks like this. It works fine, I just want to be able to categorize when the order is made and not have to go to the Category list in the Square admin to assign the item to the category. Want to be able to assign as it’s created since orders from the website always go into the same category in Square. Thanks!

Array
(
[idempotency_key] => c8f7a3e8700db45e968bcb40cd
[amount_money] => Array
(
[amount] => 4966
[currency] => USD
)

[source_id] => cnon:CBASENdMtAo4QccQp40m4c
[autocomplete] =>
[location_id] => LEGGYWXKBT
[note] => Gravity Forms - Order
[billing_address] => Array
(
[first_name] => joe
[last_name] => tester
)

[buyer_email_address] => [email protected]
[customer_id] => 0RWSNF2H6GAWQZQHGW4
[order_id] => p2xs8NdGBE13VgZOlwgTZY
)

Those categories are for items in your catalog, not for the categorization of orders. With Square you can have an itemized order with the Orders API. You can categorize the items to track item category sales. Unfortunately, there isn’t an order categorization available. We’re constantly working to improve our features based on feedback like this, so I’ll be sure to share your request to the API product team. :slightly_smiling_face:

Thanks for sharing this information. It was very useful.