Skip to content

Latest commit

 

History

History
45 lines (35 loc) · 2.81 KB

transaction.md

File metadata and controls

45 lines (35 loc) · 2.81 KB

Transaction

Represents a transaction processed with Square, either with the Connect API or with Square Point of Sale.

The tenders field of this object lists all methods of payment used to pay in the transaction.

Structure

Transaction

Fields

Name Type Tags Description
id string | undefined Optional The transaction's unique ID, issued by Square payments servers.
Constraints: Maximum Length: 192
locationId string | undefined Optional The ID of the transaction's associated location.
Constraints: Maximum Length: 50
createdAt string | undefined Optional The timestamp for when the transaction was created, in RFC 3339 format.
Constraints: Maximum Length: 32
tenders Tender[] | undefined Optional The tenders used to pay in the transaction.
refunds Refund[] | undefined Optional Refunds that have been applied to any tender in the transaction.
referenceId string | undefined Optional If the transaction was created with the Charge
endpoint, this value is the same as the value provided for the reference_id
parameter in the request to that endpoint. Otherwise, it is not set.
Constraints: Maximum Length: 40
product string | undefined Optional Indicates the Square product used to process a transaction.
clientId string | undefined Optional If the transaction was created in the Square Point of Sale app, this value
is the ID generated for the transaction by Square Point of Sale.

This ID has no relationship to the transaction's canonical id, which is
generated by Square's backend servers. This value is generated for bookkeeping
purposes, in case the transaction cannot immediately be completed (for example,
if the transaction is processed in offline mode).

It is not currently possible with the Connect API to perform a transaction
lookup by this value.
Constraints: Maximum Length: 192
shippingAddress Address | undefined Optional Represents a postal address in a country.
For more information, see Working with Addresses.
orderId string | undefined Optional The order_id is an identifier for the order associated with this transaction, if any.
Constraints: Maximum Length: 192

Example (as JSON)

{
  "id": null,
  "location_id": null,
  "created_at": null,
  "tenders": null,
  "refunds": null,
  "reference_id": null,
  "product": null,
  "client_id": null,
  "shipping_address": null,
  "order_id": null
}