Purchases
Purchase history, transaction details, and refunds
Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Path Parameters
Adyen session ID (psp_request_ref)
Query Parameters
Location ID for permission validation
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/purchase/lookup-session/string?locationId=0"{ "status": "success", "data": { "purchaseIntentId": "7c933f97-ad75-490a-be55-2ca143239cc3", "locationId": 0 }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Query Parameters
Location ID to filter purchases (required for permissions)
Include authorized descendants of locationId.
falseOptional comma-separated subset of the resolved location hierarchy.
^[0-9]+(,[0-9]+)*$length <= 11000Start date for date range filter (ISO 8601)
date-timeEnd date for date range filter (ISO 8601)
date-timeFilter by user ID
Minimum amount in cents
Maximum amount in cents
Minimum refunded amount in cents
Maximum refunded amount in cents
Filter by payment method
Filter by payment provider (comma-separated: adyen, stripe, swish, invoice, prepaid, gift_card)
Filter by payment method brand (comma-separated, case-insensitive)
Filter by prepaid type code stored on the payment event (comma-separated)
Filter by payment status
Filter by customer email (partial match)
Filter by last 4 digits of the paying card (exact match)
^[0-9]{4}$Filter purchases containing a specific inventory item ID
Filter by table/storefront QR code UUID
Filter by tab UUID
uuidFilter by tab type (comma-separated: takeaway, over_the_counter, table)
Filter by cost center (comma-separated cost center ids). Resolved as COALESCE(tabs.cost_center_id, storefront_qr_codes.cost_center_id) — a tab tag beats the table default — the same rule analytics and the SIE export use.
^[0-9]+(,[0-9]+)*$Narrow to the sales credited to the calling staff member. Attribution is per line item — who rang the item in, falling back to the tab's initiator — the same rule the POS sales report uses. There is deliberately no parameter for scoping to another staff member: narrowing is only ever to the caller. Requires a staff (retailer user) token.
falsePage number for pagination
1 <= value1Number of results per page (max 1000, enforced with a 400 error beyond that)
1 <= value <= 100050Opaque keyset pagination cursor from a previous response's pagination.nextCursor. Recommended over page/offset for locations with a large purchase history, since deep offset pages get progressively more expensive to compute. When provided, page/offset params are ignored and the total count is not computed (pagination.total is omitted).
Pagination mode. 'cursor' opts into keyset pagination: the expensive count query is skipped and pagination.hasMore/nextCursor are returned even on the first page (before any cursor value exists). Defaults to 'offset' (page/total) for backwards compatibility.
Value in
- "cursor"
- "offset"
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/purchases?locationId=0"{ "status": "success", "data": { "purchases": [ { "customFields": [ { "fieldId": "string", "key": "string", "label": "string", "group": "string", "type": "string", "displayValue": "string", "value": null, "version": 0, "status": "string" } ], "metadata": { "customFields": {} }, "id": 0, "locationId": 0, "userId": 0, "amount": 0, "currency": "string", "paymentMethod": "string", "paymentProvider": "string", "status": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "tabId": "f4c36190-e358-41c0-b3ad-58e9e89eba63", "costCenterId": 0, "costCenterName": "string", "costCenterCode": "string", "costCenter": { "customFields": [ { "fieldId": "string", "key": "string", "label": "string", "group": "string", "type": "string", "displayValue": "string", "value": null, "version": 0, "status": "string" } ], "metadata": { "customFields": {} }, "id": 0, "name": "string", "code": "string" }, "servedBy": [ { "retailerUserId": 0, "name": "string" } ], "lineItems": [ { "measurement": { "unit": "string", "amountMicros": 0, "priceQuantityMicros": 0, "unitPriceCents": 0 }, "id": 0, "type": "string", "title": "string", "quantity": 0, "quantityCents": 0, "finalAmountCents": 0, "totalAmountCents": 0, "vatRateBasisPoints": 0, "vatAmountCents": 0, "totalVatAmountCents": 0, "appliedTotalDiscountAmountCents": 0, "articleNo": "string", "originItemId": 0, "parentLineItemId": 0, "kitchenDispatchItemId": "string", "appliedModifications": [ {} ], "channel": "POS", "isTakeaway": true, "createdAt": "2019-08-24T14:15:22Z" } ] } ], "pagination": { "page": 1, "limit": 1, "total": 0, "totalPages": 0, "hasMore": true, "nextCursor": "string" } }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Path Parameters
Purchase ID
Query Parameters
Location ID for permission validation
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/purchases/string?locationId=0"{ "status": "success", "data": { "purchase": { "customFields": [ { "fieldId": "string", "key": "string", "label": "string", "group": "string", "type": "string", "displayValue": "string", "value": null, "version": 0, "status": "string" } ], "metadata": { "customFields": {} }, "id": 0, "locationId": 0, "userId": 0, "amount": 0, "currency": "string", "paymentMethod": "string", "paymentProvider": "string", "status": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "tabId": "f4c36190-e358-41c0-b3ad-58e9e89eba63", "costCenterId": 0, "costCenterName": "string", "costCenterCode": "string", "costCenter": { "customFields": [ { "fieldId": "string", "key": "string", "label": "string", "group": "string", "type": "string", "displayValue": "string", "value": null, "version": 0, "status": "string" } ], "metadata": { "customFields": {} }, "id": 0, "name": "string", "code": "string" }, "servedBy": [ { "retailerUserId": 0, "name": "string" } ], "lineItems": [ { "measurement": { "unit": "string", "amountMicros": 0, "priceQuantityMicros": 0, "unitPriceCents": 0 }, "id": 0, "type": "string", "title": "string", "quantity": 0, "quantityCents": 0, "finalAmountCents": 0, "totalAmountCents": 0, "vatRateBasisPoints": 0, "vatAmountCents": 0, "totalVatAmountCents": 0, "appliedTotalDiscountAmountCents": 0, "articleNo": "string", "originItemId": 0, "parentLineItemId": 0, "kitchenDispatchItemId": "string", "appliedModifications": [ {} ], "channel": "POS", "isTakeaway": true, "createdAt": "2019-08-24T14:15:22Z" } ] } }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Path Parameters
^[1-9][0-9]*$Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Optional custom field operations, saved atomically with this record. Omitted values are unchanged; null clears. Use fieldId or a stable key. expectedVersion is optional; supply it to reject conflicting edits.
items <= 100Response Body
application/json
curl -X PATCH "https://example.com/api/v1/purchases/string" \ -H "Content-Type: application/json" \ -d '{ "customFields": [ {} ] }'{ "status": "string", "data": { "id": "string", "locationId": 0, "customFields": [ { "fieldId": "string", "key": "string", "label": "string", "group": "string", "type": "string", "displayValue": "string", "value": null, "version": 0, "status": "string" } ], "metadata": { "customFields": {} } }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Path Parameters
Purchase intent UUID
uuidQuery Parameters
Location ID for permission validation
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/purchases/497f6eca-6276-4993-bfeb-53cbbbba6f08/cash-register/fetch?locationId=0"{ "status": "success", "data": { "purchaseIntentId": "7c933f97-ad75-490a-be55-2ca143239cc3", "cashRegister": { "receiptNumber": 0, "registerId": "string", "controlUnit": "string" } }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Path Parameters
Purchase intent UUID
uuidQuery Parameters
Location ID for permission validation
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/purchases/497f6eca-6276-4993-bfeb-53cbbbba6f08/cash-register/register?locationId=0"{ "status": "success", "data": { "purchaseIntentId": "7c933f97-ad75-490a-be55-2ca143239cc3", "cashRegister": { "receiptNumber": 0, "registerId": "string", "controlUnit": "string" } }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Path Parameters
Purchase intent UUID
uuidQuery Parameters
Location ID for permission validation
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Customer email address (used to find or create user)
emailCustomer name (optional, used to update user profile)
Customer phone number (optional)
Enroll customer in location loyalty program and award retroactive points
Optional custom field operations, saved atomically with this record. Omitted values are unchanged; null clears. Use fieldId or a stable key. expectedVersion is optional; supply it to reject conflicting edits.
items <= 100Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/purchases/497f6eca-6276-4993-bfeb-53cbbbba6f08/connect-customer?locationId=0" \ -H "Content-Type: application/json" \ -d '{ "email": "user@example.com" }'{ "status": "success", "data": { "success": true, "userId": 0, "isNewUser": true, "loyaltyEnrolled": true, "pointsAwarded": 0, "message": "string" }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Path Parameters
The purchase intent ID
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Email address to send the receipt to
emailResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/purchases/497f6eca-6276-4993-bfeb-53cbbbba6f08/email-receipt" \ -H "Content-Type: application/json" \ -d '{ "email": "user@example.com" }'{ "status": "success", "data": { "purchaseIntentId": "7c933f97-ad75-490a-be55-2ca143239cc3", "email": "string" }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Path Parameters
Purchase intent UUID
uuidQuery Parameters
Location ID for permission validation
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/purchases/497f6eca-6276-4993-bfeb-53cbbbba6f08/order-details?locationId=0"{ "status": "success", "data": { "orderInfo": { "orderState": "initial", "deliveryKind": "takeaway", "orderNumber": 0, "tableName": "string", "paymentFlow": "instant", "tabId": "f4c36190-e358-41c0-b3ad-58e9e89eba63", "hasBeenScheduled": true, "desiredPickupTime": 0, "phoneNumber": "string" }, "purchaseInfo": { "purchasedAtEpochSeconds": 0, "totalAmountCents": 0, "serviceFeeCents": 0, "lineItems": [ { "measurement": { "unit": "string", "amountMicros": 0, "priceQuantityMicros": 0, "unitPriceCents": 0 }, "type": "product", "title": "string", "amountCents": 0, "appliedTotalDiscountAmountCents": 0, "quantity": 0, "appliedModifications": [ { "title": "string", "priceAdjustmentCents": 0 } ], "itemId": 0, "itemType": "string", "imageUrl": "string" } ], "vatBreakdown": { "vatPercentage": 0, "vatAmountCents": 0, "netAmountCents": 0, "grossAmountCents": 0 }, "currency": "string" }, "tabInfo": { "tabId": "f4c36190-e358-41c0-b3ad-58e9e89eba63", "remainingAmountCents": 0, "qrCodeId": "8a619d64-dbe8-4c9d-9490-babe22a53a28" } }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Path Parameters
Purchase intent UUID
uuidQuery Parameters
Location ID for permission validation
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/purchases/497f6eca-6276-4993-bfeb-53cbbbba6f08/receipt?locationId=0"{ "status": "success", "data": { "purchaseIntentId": "7c933f97-ad75-490a-be55-2ca143239cc3", "shopLayoutId": "string", "purchasedAt": "2019-08-24T14:15:22Z", "currency": "string", "orderNumber": 0, "location": { "name": "string", "address": "string", "phone": "string", "vatId": "string", "logoUrl": "string", "storefrontSlug": "string", "language": "string" }, "lineItems": [ { "measurement": { "unit": "string", "amountMicros": 0, "priceQuantityMicros": 0, "unitPriceCents": 0 }, "type": "product", "title": "string", "quantity": 0, "unitPriceCents": 0, "totalPriceCents": 0, "appliedDiscountCents": 0, "appliedModifications": [ { "title": "string", "priceAdjustmentCents": 0 } ], "children": [ { "title": "string", "quantity": 0, "unitPriceCents": 0, "totalPriceCents": 0, "appliedModifications": [ { "title": "string", "priceAdjustmentCents": 0 } ] } ] } ], "subtotalCents": 0, "totalDiscountCents": 0, "vatBreakdown": [ { "rate": 0, "baseAmountCents": 0, "vatAmountCents": 0 } ], "totalCents": 0, "serviceFeeCents": 0, "appliedVouchers": [ { "code": "string", "appliedAmountCents": 0 } ], "customerEmail": "string", "paymentMethod": "string", "paymentBrand": "string", "paymentLast4": "string", "tableName": "string", "deliveryKind": "string", "cashRegister": { "receiptNumber": 0, "registerId": "string", "controlUnit": "string" } }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Path Parameters
Purchase intent UUID
uuidQuery Parameters
Location ID for permission validation
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/purchases/497f6eca-6276-4993-bfeb-53cbbbba6f08/receipt/print?locationId=0"{ "status": "success", "data": { "outputText": [ { "Text": "string", "CharacterStyle": "Bold", "Alignment": "Left", "EndOfLineFlag": true } ], "qrCode": { "url": "string" } }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Path Parameters
Purchase intent ID (UUID)
uuidQuery Parameters
Location ID for permission validation
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/purchases/by-intent/497f6eca-6276-4993-bfeb-53cbbbba6f08?locationId=0"{ "status": "success", "data": { "purchase": { "customFields": [ { "fieldId": "string", "key": "string", "label": "string", "group": "string", "type": "string", "displayValue": "string", "value": null, "version": 0, "status": "string" } ], "metadata": { "customFields": {} }, "id": 0, "locationId": 0, "userId": 0, "amount": 0, "currency": "string", "paymentMethod": "string", "paymentProvider": "string", "status": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "tabId": "f4c36190-e358-41c0-b3ad-58e9e89eba63", "costCenterId": 0, "costCenterName": "string", "costCenterCode": "string", "costCenter": { "customFields": [ { "fieldId": "string", "key": "string", "label": "string", "group": "string", "type": "string", "displayValue": "string", "value": null, "version": 0, "status": "string" } ], "metadata": { "customFields": {} }, "id": 0, "name": "string", "code": "string" }, "servedBy": [ { "retailerUserId": 0, "name": "string" } ], "lineItems": [ { "measurement": { "unit": "string", "amountMicros": 0, "priceQuantityMicros": 0, "unitPriceCents": 0 }, "id": 0, "type": "string", "title": "string", "quantity": 0, "quantityCents": 0, "finalAmountCents": 0, "totalAmountCents": 0, "vatRateBasisPoints": 0, "vatAmountCents": 0, "totalVatAmountCents": 0, "appliedTotalDiscountAmountCents": 0, "articleNo": "string", "originItemId": 0, "parentLineItemId": 0, "kitchenDispatchItemId": "string", "appliedModifications": [ {} ], "channel": "POS", "isTakeaway": true, "createdAt": "2019-08-24T14:15:22Z" } ] } }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Response Body
curl -X GET "https://example.com/api/v1/refunds"Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Path Parameters
Response Body
curl -X GET "https://example.com/api/v1/refunds/string"Authorization
ApiKeyAuth API key authentication. Format: karma_live_* or karma_dev_*
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Value in
- "amount"
- "products"
8 <= length <= 200UUID of the purchase intent to refund
Reason for the refund
length <= 500Who covers the transaction fees for this refund
Value in
- "karma"
- "seller"
Line items to refund with monetary amounts (amount mode) or quantities in hundredths (products mode)
1 <= itemsResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/refunds/purchase" \ -H "Content-Type: application/json" \ -d '{ "purchaseIntentId": "string", "reason": "string", "feeCoveredBy": "karma", "lineItems": [ { "purchaseLineItemId": 0 } ] }'{ "status": "success", "data": { "success": true, "purchaseRefundId": null, "message": "string" }, "meta": { "requestId": "string", "timestamp": "2019-08-24T14:15:22Z", "executionTimeMs": 0 }}