MyNearStoresPartners
Square

Record a sale in Square

POST
/square/sales/record

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.

Request Body

application/json
  1. body
bu_id*integer
terminal_id*integer

A terminal connected to Square.

items*array<>
Items1 <= items
note?string
location_id?string

Square location. Defaults to the merchant's first active location.

Response Body

Order and payment created.

application/json
  1. response
success*unknown
square_order_id*string
square_payment_id*string
status*string
total_amount*integer

Smallest currency unit.

total_amount_display*string
currency*string
receipt_url*|
Formaturi
dashboard_url*string

Square dashboard's sales report.

Formaturi
curl -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"}