The Zettle Purchase service provides read-only information about purchases made through Zettle. For example, the Purchase API lets you build integrations between Zettle and e-commerce systems, for exchange of purchase transaction data. Accounting integrations as well use Purchase API.
To integrate with Zettle, you need to access merchant data. To gain access, you need to set up authorisation for the merchant to grant access to the data. See Authorisation OAuth API.
In general a purchase means acquisition of an item or service that is typically paid for through an exchange of money or other asset. In the purchase API, a purchase represents a receipt. It contains information about sold items, and is immutable, meaning the information cannot be changed.
Through the Purchase API, purchase information is passed from the Purchase service. The information includes one or several payments received, products sold, taxes, discounts and so on. Refunds are represented by the same information model.
See the following example of the purchase information. For details about request/response information, see the Purchase API reference.
The following request returns information for a purchase with a given UUID. The
sourceattribute shows the origin of the purchase. This can be the Zettle POS app, a Zettle Payments SDK, or an online webshop.
In a refund, money is being exchanged as the result of a returned sale, and an amount is transferred from the seller back to the buyer. Refunds are represented by the same information model as for purchases, but with negative quantity. There are also specific refund-related flags and fields.
The following purchase attributes are associated with refunds:
amount. This will be negative in case of a refund.
truethe purchase is a refund.
truepurchase has been refunded.
refundsPurchaseUUID1. The ID of the purchase that was refunded.
refundedByPurchaseUUIDs1. List with IDs of purchases that refunded this particular one as UUIDs version 1.
See Purchase API reference for more details about parameters and attributes.
Parts of the purchase information are also consumed by other APIs, for example the Finance and Inventory APIs. See Purchase interactions.