Square
Record a sale in Square
POST
Creates a Square order and an EXTERNAL payment with the terminal's Square token, so the sale appears in the merchant's Square Reports → Sales.
application/json- body
bu_id*integerterminal_id*integerA terminal connected to Square.
items*array<>Items
1 <= itemsnote?stringlocation_id?stringSquare location. Defaults to the merchant's first active location.
Order and payment created.
application/json- response
success*unknownsquare_order_id*stringsquare_payment_id*stringstatus*stringtotal_amount*integerSmallest currency unit.
total_amount_display*stringcurrency*stringreceipt_url*|Format
uridashboard_url*stringSquare dashboard's sales report.
Format
uricurl -X POST "https://example.com/square/sales/record" \ -H "Content-Type: application/json" \ -d '{ "bu_id": 1, "terminal_id": 31, "items": [ { "name": "Coffee", "quantity": 2, "price": 350, "currency": "USD" } ], "note": "Walk-in customer sale" }'{ "success": true, "square_order_id": "string", "square_payment_id": "string", "status": "COMPLETED", "total_amount": 0, "total_amount_display": "7.00 USD", "currency": "string", "receipt_url": "http://example.com", "dashboard_url": "http://example.com"}