Overview
The V1 Transactions client provides methods for:- Listing online store orders
- Retrieving individual order details
- Updating order status (complete, cancel, refund)
Client Initialization
Methods
V1ListOrders
Provides summary information for a merchant’s online store orders.v1transactions.go:470
The ID of the location to list online store orders for.
The order in which payments are listed in the response.
The maximum number of payments to return in a single response. This value cannot exceed 200.
A pagination cursor to retrieve the next set of results for your original query to the endpoint.
The list of online store orders.
V1RetrieveOrder
Provides comprehensive information for a single online store order, including the order’s history.v1transactions.go:559
The ID of the order’s associated location.
The order’s Square-issued ID. You obtain this value from Order objects returned by the List Orders endpoint.
The complete order details including history.
V1UpdateOrder
Updates the details of an online store order. Every update corresponds to one of three actions: complete, cancel, or refund.v1transactions.go:630
The ID of the order’s associated location.
The order’s Square-issued ID.
The action to perform on the order:
COMPLETE- Mark the order as completeCANCEL- Cancel the orderREFUND- Refund the order
The tracking number of the shipment associated with the order. Only valid if action is COMPLETE.
A merchant-specified note about the completion of the order. Only valid if action is COMPLETE.
A merchant-specified note about the refunding of the order. Only valid if action is REFUND.
A merchant-specified note about the canceling of the order. Only valid if action is CANCEL.
The updated order.
Use Cases
List Recent Orders
Retrieve the most recent online store orders:Complete Order with Tracking
Mark an order as complete and add tracking information:Cancel Order
Cancel an order with a reason:Refund Order
Process a refund for an order:Migration to Orders API
For new integrations, use the Orders API which provides more features and better functionality.
- Support for multiple payment types
- More flexible order states
- Better support for modifiers and customizations
- Integration with other Square services
- Modern API design patterns
Migration Example
V1 Transactions:Limitations
- Only works with legacy Square Online Store orders
- Limited update actions (complete, cancel, refund)
- No support for modern payment methods
- Cannot create new orders through this API
- Pagination uses batch tokens instead of cursors
Best Practices
- Migrate to Orders API: Plan migration to the modern Orders API
- Use for legacy only: Only use this API for existing integrations
- Handle pagination: Implement proper pagination using batch tokens
- Add order notes: Include descriptive notes when updating orders
- Track shipments: Always include tracking numbers when completing orders
Related Resources
- Orders API (Recommended)
- Payments API
- Refunds API
