From 6fc9b9f57690a0ccdcdf5c9ce4e29b7c042acbfc Mon Sep 17 00:00:00 2001 From: "sumup-release-bot[bot]" <241716704+sumup-release-bot[bot]@users.noreply.github.com> Date: Tue, 3 Nov 2026 10:46:16 +0000 Subject: [PATCH 1/2] chore: synced local 'openapi.json' with remote 'specs/openapi31.json' --- openapi.json | 7571 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 4844 insertions(+), 2727 deletions(-) diff --git a/openapi.json b/openapi.json index a08e3f0..2275863 100644 --- a/openapi.json +++ b/openapi.json @@ -104,6 +104,19 @@ } ] }, + { + "name": "Sales", + "description": "Operations related to reading sales data.", + "x-core-objects": [ + { + "$ref": "#/components/schemas/Sale" + }, + { + "$ref": "#/components/schemas/PublicPaymentV10" + } + ], + "x-displayName": "Sales" + }, { "name": "Tokens", "description": "Merchant tokens let your application accept card-present payments with SumUp SDKs that support token-based authentication. Use them when you want users to sign in to your application with your own authentication, then accept payments for a SumUp merchant account.\n\nCreate tokens on your backend using one of the [supported authentication methods](https://developer.sumup.com/api/authentication). Keep your authentication credentials on your backend. Return only the short-lived merchant token to your application and pass its `access_token` to the SDK.\n\nBefore returning a token, authenticate the user in your application and check that they can accept payments for the requested merchant account. A merchant token is limited to that account and the requested actions, and does not grant permissions beyond those of the identity that created it.\n\nTokens expire 15 minutes after creation. Use `expires_in` to determine the remaining lifetime and create a new token when needed. This endpoint does not return a refresh token. Treat merchant tokens as secrets: send them over HTTPS and keep them out of URLs, logs, and source code.", @@ -329,7 +342,21 @@ "description": "A sample checkout", "hosted_checkout": { "enabled": true - } + }, + "redirect_url": "https://example.com/orders/123/complete" + } + }, + "Tokenization": { + "summary": "Save a customer card", + "description": "Create a checkout to collect consent and save a card through the Payment Widget.", + "value": { + "checkout_reference": "save-card-123", + "amount": 1, + "currency": "EUR", + "merchant_code": "MCXXXXXX", + "description": "Save a card for future payments", + "customer_id": "831ff8d4cd5958ab5670", + "purpose": "SETUP_RECURRING_PAYMENT" } } } @@ -472,6 +499,22 @@ "hosted_checkout_url": "https://checkout.sumup.com/pay/8f9316a3-cda9-42a9-9771-54d534315676", "transactions": [] } + }, + "Tokenization": { + "summary": "Checkout for saving a card", + "value": { + "checkout_reference": "save-card-123", + "amount": 1, + "currency": "EUR", + "merchant_code": "MCXXXXXX", + "description": "Save a card for future payments", + "customer_id": "831ff8d4cd5958ab5670", + "purpose": "SETUP_RECURRING_PAYMENT", + "id": "7164c99b-13cb-42a1-8ba1-3c2c46a29de7", + "status": "PENDING", + "date": "2026-10-30T12:00:00+00:00", + "transactions": [] + } } } } @@ -694,17 +737,65 @@ "schema": { "$ref": "#/components/schemas/CheckoutSuccess" }, - "example": { - "checkout_reference": "f00a8f74-b05d-4605-bd73-2a901bae5802", - "amount": 10.1, - "currency": "EUR", - "merchant_code": "MH4H92C7", - "description": "Purchase", - "id": "4e425463-3e1b-431d-83fa-1e51c2925e99", - "status": "PENDING", - "date": "2020-02-29T10:56:56+00:00", - "transaction_code": "TEENSK4W2K", - "transaction_id": "410fc44a-5956-44e1-b5cc-19c6f8d727a4" + "examples": { + "Checkout": { + "value": { + "checkout_reference": "f00a8f74-b05d-4605-bd73-2a901bae5802", + "amount": 10.1, + "currency": "EUR", + "merchant_code": "MH4H92C7", + "description": "Purchase", + "id": "4e425463-3e1b-431d-83fa-1e51c2925e99", + "status": "PENDING", + "date": "2020-02-29T10:56:56+00:00", + "transaction_code": "TEENSK4W2K", + "transaction_id": "410fc44a-5956-44e1-b5cc-19c6f8d727a4" + } + }, + "PaidCheckout": { + "summary": "Paid checkout with a transaction to refund", + "value": { + "checkout_reference": "f00a8f74-b05d-4605-bd73-2a901bae5802", + "amount": 42.42, + "currency": "EUR", + "merchant_code": "MH4H92C7", + "description": "Purchase", + "id": "4e425463-3e1b-431d-83fa-1e51c2925e99", + "status": "PAID", + "date": "2020-02-29T10:56:56+00:00", + "transaction_code": "TEENSK4W2K", + "transaction_id": "410fc44a-5956-44e1-b5cc-19c6f8d727a4", + "transactions": [ + { + "id": "410fc44a-5956-44e1-b5cc-19c6f8d727a4", + "transaction_code": "TEENSK4W2K", + "amount": 42.42, + "currency": "EUR", + "status": "SUCCESSFUL", + "timestamp": "2026-10-30T12:00:00+00:00" + } + ] + } + }, + "TokenizedCheckout": { + "summary": "Checkout with a saved card", + "value": { + "checkout_reference": "save-card-123", + "amount": 1, + "currency": "EUR", + "merchant_code": "MCXXXXXX", + "description": "Save a card for future payments", + "customer_id": "831ff8d4cd5958ab5670", + "purpose": "SETUP_RECURRING_PAYMENT", + "id": "7164c99b-13cb-42a1-8ba1-3c2c46a29de7", + "status": "PAID", + "date": "2026-10-30T12:00:00+00:00", + "transactions": [], + "payment_instrument": { + "token": "6878cb7f-6515-47bf-bdd9-1408d270fdce" + } + } + } } } } @@ -923,9 +1014,8 @@ "description": "Process a checkout with a token", "value": { "payment_type": "card", - "installments": 1, - "token": "ba85dfee-c3cf-48a6-84f5-d7d761fbba50", - "customer_id": "MEDKHDTI" + "token": "6878cb7f-6515-47bf-bdd9-1408d270fdce", + "customer_id": "831ff8d4cd5958ab5670" } }, "ProcessBoleto": { @@ -2223,9 +2313,6 @@ "description": "Optional amount for partial refunds.", "content": { "application/json": { - "example": { - "amount": 5 - }, "schema": { "type": "object", "description": "Optional amount for partial refunds of transactions.", @@ -2237,6 +2324,18 @@ "example": 5 } } + }, + "examples": { + "FullRefund": { + "summary": "Full refund", + "value": {} + }, + "PartialRefund": { + "summary": "Partial refund", + "value": { + "amount": 24.42 + } + } } } } @@ -5534,466 +5633,420 @@ ] } }, - "/v0.1/merchants/{merchant_code}/readers/{reader_id}/checkout": { - "post": { - "callbacks": { - "ReaderCheckoutStatusChange": { - "{$request.body#/return_url}": { - "post": { - "callbacks": {}, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReaderCheckoutStatusChange" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Your server returns this code if it accepts the callback.\nIf the server returns any other code, the callback will be retried up to 5 times with exponential backoff.\n" - } - } - } - } + "/v1.0/merchants/{merchant_code}/sales": { + "get": { + "tags": [ + "Sales" + ], + "summary": "Lists sales", + "description": "Returns a paginated list of `Sale` objects. Results are sorted **newest first** by the\n**newest event** recorded for each sale. Pagination tokens follow that order.\n\nCovers the merchant’s **last two years** of sales. Non-finalised sales are never returned;\nonly fully-paid sales. Use `POST /sales/search` for filtered queries.", + "operationId": "ListSalesV10", + "security": [ + { + "apiKey": [] + }, + { + "oauth2": [ + "sales.read" + ] } - }, - "description": "Creates a Checkout for a Reader.\n\nThis process is asynchronous and the actual transaction may take some time to be started on the device.\n\n\nThere are some caveats when using this endpoint:\n* The target device must be online, otherwise checkout won't be accepted\n* After the checkout is accepted, the system has 60 seconds to start the payment on the target device. During this time, any other checkout for the same device will be rejected.\n\n\n**Note**: If the target device is a Solo, it must be in version 3.3.24.3 or higher.\n\n\nOptionally include an `affiliate` object to attach integrator metadata to the payment.\nProvide both `app_id` and `key` when including this object.\n", - "operationId": "CreateReaderCheckout", + ], + "x-scopes": [ + "sales.read" + ], + "x-permissions": [ + "merchant_read" + ], "parameters": [ { - "description": "Merchant Code", - "example": "MC0X0ABC", - "in": "path", "name": "merchant_code", + "in": "path", + "description": "The merchant code.", "required": true, "schema": { - "type": "string" + "type": "string", + "example": "MCZM9TGQ", + "maxLength": 30 } }, { - "description": "The unique identifier of the Reader", - "example": "rdr_3MSAFM23CK82VSTT4BN6RWSQ65", - "in": "path", - "name": "reader_id", - "required": true, + "name": "pagination_token", + "in": "query", + "required": false, + "description": "Pagination token for subsequent requests. Should only be set by clients if they have\nreceived a token in the previous response, and this request is an immediate follow-up\nrequest to that response to load the subsequent page. Clients should treat this as an\nopaque token and should not attempt to parse it in any way.", "schema": { "type": "string" - } + }, + "example": "66bcbtzelrubzeuzruzgu76678trncH" + }, + { + "name": "pagination_limit", + "in": "query", + "required": false, + "description": "Maximum number of results per page.", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 25, + "default": 10 + }, + "example": 10 } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateReaderCheckoutRequest" - } - } - }, - "description": "A checkout initial attributes", - "required": true - }, "responses": { - "201": { + "200": { + "description": "Successful response with a page of sales.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateReaderCheckoutResponse" + "$ref": "#/components/schemas/SalePage" } } - }, - "description": "The Checkout got successfully created for the given reader." + } }, "400": { + "description": "Validation error on the request.", "content": { - "application/json": { - "example": { - "errors": { - "detail": "Invalid affiliate key.", - "type": "INVALID_AFFILIATE_KEY" - } - }, - "schema": { - "$ref": "#/components/schemas/CreateReaderCheckoutError" - } - }, "application/problem+json": { - "example": { - "detail": "Invalid affiliate key.", - "status": 400, - "title": "Invalid Affiliate Key", - "type": "https://developer.sumup.com/problem/invalid-affiliate-key" - }, "schema": { - "$ref": "#/components/schemas/Problem" + "$ref": "#/components/schemas/ProblemV10" } } - }, - "description": "Response when given params (or one of them) are invalid" + } }, "401": { + "description": "The client is not authenticated (auth header is empty or invalid).", "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateReaderCheckoutError" - } - }, "application/problem+json": { - "example": { - "detail": "Unauthorized", - "status": 401, - "title": "Unauthorized", - "type": "https://developer.sumup.com/problem/unauthorized" - }, "schema": { - "$ref": "#/components/schemas/Problem" + "$ref": "#/components/schemas/ProblemV10" } } - }, - "description": "Unauthorized" + } }, - "404": { + "403": { + "description": "Missing `sales.read`, merchant code mismatch on the token, or no `merchant_read` permission.", "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotFound" - } - }, "application/problem+json": { - "example": { - "detail": "The requested resource doesn't exist or does not belong to you.", - "status": 404, - "title": "Requested resource couldn't be found.", - "type": "https://developer.sumup.com/problem/not-found" - }, "schema": { - "$ref": "#/components/schemas/Problem" + "$ref": "#/components/schemas/ProblemV10" } } - }, - "description": "Response when given reader is not found" + } }, - "422": { + "412": { + "description": "User-Agent header is not present or is empty.", "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateReaderCheckoutUnprocessableEntity" - } - }, "application/problem+json": { - "examples": { - "PaymentMethodNotAllowed": { - "value": { - "detail": "Payment method not allowed for this merchant.", - "status": 422, - "title": "Payment Method Not Allowed", - "type": "https://developer.sumup.com/problem/payment-method-not-allowed" - } - }, - "ValidationError": { - "value": { - "detail": "Validation failed", - "status": 422, - "title": "Unprocessable Content", - "type": "https://developer.sumup.com/problem/validation-error" - } - } - }, "schema": { - "$ref": "#/components/schemas/Problem" + "$ref": "#/components/schemas/ProblemV10" } } - }, - "description": "Response when given params (or one of them) are invalid" + } } - }, - "security": [ - { + } + } + }, + "/v1.0/merchants/{merchant_code}/sales/search": { + "post": { + "tags": [ + "Sales" + ], + "summary": "Searches sales", + "description": "Returns a paginated list of `SaleSearchItem` rows matching filter criteria. Results are\nsorted **newest first** by **sale close date**.\n\nFilters from different categories stack with **logical AND**; multiple values in one array\nfield stack with **logical OR**. Results cover the merchant’s **last two years** of sales\n(narrow further with `start_date` / `end_date`). Pagination tokens are not interchangeable\nwith `GET /sales`.", + "operationId": "SearchSalesV10", + "security": [ + { "apiKey": [] }, { "oauth2": [ - "readers.write" + "sales.read" ] } ], - "summary": "Create a Reader Checkout", - "tags": [ - "Readers" + "x-scopes": [ + "sales.read" ], - "x-codegen": { - "method_name": "create_checkout" - }, "x-permissions": [ - "readers.checkouts.create" + "merchant_read" ], - "x-scopes": [ - "readers.write" - ] - } - }, - "/v0.1/merchants/{merchant_code}/readers/{reader_id}/status": { - "get": { - "callbacks": {}, - "description": "Provides the last known status for a Reader.\n\nThis endpoint allows you to retrieve updates from the connected card reader, including the current screen being displayed during the payment process and the device status (battery level, connectivity, and update state).\n\nSupported States\n\n* `IDLE` – Reader ready for next transaction\n* `SELECTING_TIP` – Waiting for tip input\n* `WAITING_FOR_CARD` – Awaiting card insert/tap\n* `WAITING_FOR_PIN` – Waiting for PIN entry\n* `WAITING_FOR_SIGNATURE` – Waiting for customer signature\n* `UPDATING_FIRMWARE` – Firmware update in progress\n\nDevice Status\n\n* `ONLINE` – Device connected and operational\n* `OFFLINE` – Device disconnected (last state persisted)\n\n**Note**: If the target device is a Solo, it must be in version 3.3.39.0 or higher.\n", - "operationId": "GetReaderStatus", "parameters": [ { - "description": "Merchant Code", - "example": "MC0X0ABC", - "in": "path", "name": "merchant_code", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "The unique identifier of the Reader", - "example": "rdr_3MSAFM23CK82VSTT4BN6RWSQ65", "in": "path", - "name": "reader_id", + "description": "The merchant code.", "required": true, "schema": { - "type": "string" + "type": "string", + "example": "MCZM9TGQ", + "maxLength": 30 } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SaleSearchRequest" + } + } + } + }, "responses": { "200": { + "description": "Successful response with search results.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StatusResponse" + "$ref": "#/components/schemas/SaleSearchResponse" } } - }, - "description": "Response with the device status." + } }, "400": { + "description": "Validation error on the request.", "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BadRequest" - } - }, "application/problem+json": { - "example": { - "detail": "Bad Request", - "status": 400, - "title": "Bad Request", - "type": "https://developer.sumup.com/problem/bad-request" - }, "schema": { - "$ref": "#/components/schemas/Problem" + "$ref": "#/components/schemas/ProblemV10" } } - }, - "description": "Response when given params (or one of them) are invalid" + } }, "401": { + "description": "The client is not authenticated (auth header is empty or invalid).", "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Unauthorized" - } - }, "application/problem+json": { - "example": { - "detail": "Unauthorized", - "status": 401, - "title": "Unauthorized", - "type": "https://developer.sumup.com/problem/unauthorized" - }, "schema": { - "$ref": "#/components/schemas/Problem" + "$ref": "#/components/schemas/ProblemV10" } } - }, - "description": "Response when given merchant's token is invalid" + } }, - "404": { + "403": { + "description": "Missing `sales.read`, merchant code mismatch on the token, or no `merchant_read` permission.", "content": { - "application/json": { + "application/problem+json": { "schema": { - "$ref": "#/components/schemas/NotFound" + "$ref": "#/components/schemas/ProblemV10" } - }, + } + } + }, + "412": { + "description": "User-Agent header is not present or is empty.", + "content": { "application/problem+json": { - "example": { - "detail": "The requested resource doesn't exist or does not belong to you.", - "status": 404, - "title": "Requested resource couldn't be found.", - "type": "https://developer.sumup.com/problem/not-found" - }, "schema": { - "$ref": "#/components/schemas/Problem" + "$ref": "#/components/schemas/ProblemV10" } } - }, - "description": "Response when given reader is not found" + } } - }, + } + } + }, + "/v1.0/merchants/{merchant_code}/sales/{sale_id}": { + "get": { + "tags": [ + "Sales" + ], + "summary": "Gets a sale", + "description": "Returns `Sale` for `sale_id`, including item lines and `payments[]`.\nNon-finalised sales are never returned; only fully-paid sales.", + "operationId": "GetSaleV10", "security": [ { "apiKey": [] }, { "oauth2": [ - "readers.read" + "sales.read" ] } ], - "summary": "Get a Reader Status", - "tags": [ - "Readers" + "x-scopes": [ + "sales.read" ], - "x-codegen": { - "method_name": "get_status" - }, "x-permissions": [ - "readers.view" + "merchant_read" ], - "x-scopes": [ - "readers.read" - ] - } - }, - "/v0.1/merchants/{merchant_code}/readers/{reader_id}/settings": { - "get": { - "callbacks": {}, - "description": "Returns the menu lock settings for a Solo reader.\n\nFor an online reader, returns the current settings. For an offline reader,\nreturns the last saved settings, which may differ from its current configuration.\nReturns `404` if the reader is offline and no saved settings are available.\n\nThe response may include the menu lock PIN.\n", - "operationId": "GetReaderSettings", "parameters": [ { - "description": "The merchant code of the account that owns the reader.", - "example": "MC0X0ABC", - "in": "path", "name": "merchant_code", + "in": "path", + "description": "The merchant code.", "required": true, "schema": { - "type": "string" + "type": "string", + "example": "MCZM9TGQ", + "maxLength": 30 } }, { - "description": "The unique identifier of the reader.", - "example": "rdr_3MSAFM23CK82VSTT4BN6RWSQ65", + "name": "sale_id", "in": "path", - "name": "reader_id", + "description": "The sale ID.", "required": true, "schema": { - "type": "string" + "type": "string", + "example": "5965aa65-e45a-4cc1-9063-c1c1e3b8607f" } } ], "responses": { "200": { + "description": "Sale data with item lines and payments.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetReaderSettingsResponse" + "$ref": "#/components/schemas/Sale" + }, + "example": { + "id": "dbe3178d-4b83-5024-9b26-9b8e1b280514", + "currency": { + "code": "EUR", + "scale": 2 + }, + "tax_mode": "GROSS", + "state": "CLOSED", + "price": { + "net_amount": 777, + "gross_amount": 925, + "taxes": [ + { + "id": "tax-vat-19", + "net_amount": 777, + "gross_amount": 925, + "tax_amount": 148 + } + ] + }, + "created_at": "2026-06-02T10:15:00Z", + "closed_at": "2026-06-02T10:20:00Z", + "source": { + "channel": "POS" + }, + "items": [ + { + "id": "line-1", + "type": "CATALOG", + "name": "Cappuccino", + "quantity": 1, + "price": { + "unit_amount": 300, + "total_net_amount": 252, + "total_gross_amount": 300, + "taxes": [ + { + "id": "tax-vat-19", + "net_amount": 252, + "gross_amount": 300, + "tax_amount": 48 + } + ], + "total_net_amount_final": 252, + "total_gross_amount_final": 300, + "taxes_final": [ + { + "id": "tax-vat-19", + "net_amount": 252, + "gross_amount": 300, + "tax_amount": 48 + } + ] + } + } + ], + "payments": [ + { + "method": "apple_pay", + "reference": "TERTYFQ4G3", + "type": "purchase", + "amount": 975, + "status": "SUCCESSFUL", + "processed_at": "2026-06-02T10:20:00Z" + } + ] } } - }, - "description": "Reader settings retrieved successfully." + } }, "401": { + "description": "The client is not authenticated (auth header is empty or invalid).", "content": { - "application/json": { + "application/problem+json": { "schema": { - "$ref": "#/components/schemas/UpdateReaderSettingsError" + "$ref": "#/components/schemas/ProblemV10" } - }, + } + } + }, + "403": { + "description": "Missing `sales.read`, merchant code mismatch on the token, or no `merchant_read` permission.", + "content": { "application/problem+json": { - "example": { - "detail": "Unauthorized", - "status": 401, - "title": "Unauthorized", - "type": "https://developer.sumup.com/problem/unauthorized" - }, "schema": { - "$ref": "#/components/schemas/Problem" + "$ref": "#/components/schemas/ProblemV10" } } - }, - "description": "Unauthorized" + } }, "404": { + "description": "Sale not found. Non-finalised sales are never returned; only fully-paid sales.", "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotFound" - } - }, "application/problem+json": { - "example": { - "detail": "The requested resource doesn't exist or does not belong to you.", - "status": 404, - "title": "Requested resource couldn't be found.", - "type": "https://developer.sumup.com/problem/not-found" - }, "schema": { - "$ref": "#/components/schemas/Problem" + "$ref": "#/components/schemas/ProblemV10" } } - }, - "description": "The reader was not found, or it is offline and has no saved settings." + } }, - "422": { + "412": { + "description": "User-Agent header is not present or is empty.", "content": { - "application/json": { + "application/problem+json": { "schema": { - "$ref": "#/components/schemas/UpdateReaderSettingsUnprocessableEntity" + "$ref": "#/components/schemas/ProblemV10" } - }, - "application/problem+json": { - "example": { - "detail": "Reader settings are only supported for Solo readers.", - "status": 422, - "title": "Unsupported Device Model", - "type": "https://developer.sumup.com/problem/unsupported-device-model" + } + } + } + } + } + }, + "/v0.1/merchants/{merchant_code}/readers/{reader_id}/checkout": { + "post": { + "callbacks": { + "ReaderCheckoutStatusChange": { + "{$request.body#/return_url}": { + "post": { + "callbacks": {}, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReaderCheckoutStatusChange" + } + } + }, + "required": true }, - "schema": { - "$ref": "#/components/schemas/Problem" + "responses": { + "200": { + "description": "Your server returns this code if it accepts the callback.\nIf the server returns any other code, the callback will be retried up to 5 times with exponential backoff.\n" + } } } - }, - "description": "The reader model is not supported, or the reader could not return its settings." + } } }, - "security": [ - { - "apiKey": [] - }, + "description": "Creates a Checkout for a Reader.\n\nThis process is asynchronous and the actual transaction may take some time to be started on the device.\n\n\nThere are some caveats when using this endpoint:\n* The target device must be online, otherwise checkout won't be accepted\n* After the checkout is accepted, the system has 60 seconds to start the payment on the target device. During this time, any other checkout for the same device will be rejected.\n\n\n**Note**: If the target device is a Solo, it must be in version 3.3.24.3 or higher.\n\n\nOptionally include an `affiliate` object to attach integrator metadata to the payment.\nProvide both `app_id` and `key` when including this object.\n", + "operationId": "CreateReaderCheckout", + "parameters": [ { - "oauth2": [ - "readers.read" - ] - } - ], - "summary": "Get Reader Settings", - "tags": [ - "Readers" - ], - "x-codegen": { - "method_name": "get_reader_settings" - }, - "x-permissions": [ - "readers.checkouts.view" - ], - "x-scopes": [ - "readers.read" - ] - }, - "patch": { - "callbacks": {}, - "description": "Updates the menu lock settings for a Solo reader. The reader must be online.\nA successful response confirms that the reader applied the update.\n\nInclude at least one of `menu_lock.enabled` or `menu_lock.passcode`.\nOmitted settings keep their current values. The response contains only the\nsettings included in the request.\n\nWhen enabling menu lock for a reader without a PIN, include a four-digit PIN\nin `menu_lock.passcode` in the same request.\n", - "operationId": "UpdateReaderSettings", - "parameters": [ - { - "description": "The merchant code of the account that owns the reader.", + "description": "Merchant Code", "example": "MC0X0ABC", "in": "path", "name": "merchant_code", @@ -6003,7 +6056,7 @@ } }, { - "description": "The unique identifier of the reader.", + "description": "The unique identifier of the Reader", "example": "rdr_3MSAFM23CK82VSTT4BN6RWSQ65", "in": "path", "name": "reader_id", @@ -6016,51 +6069,65 @@ "requestBody": { "content": { "application/json": { + "example": { + "return_url": "https://example.com/sumup/webhook", + "total_amount": { + "currency": "EUR", + "minor_unit": 2, + "value": 1500 + } + }, "schema": { - "$ref": "#/components/schemas/UpdateReaderSettingsRequest" + "$ref": "#/components/schemas/CreateReaderCheckoutRequest" } } }, - "description": "Menu lock settings to update.", + "description": "A checkout initial attributes", "required": true }, "responses": { - "200": { + "201": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateReaderSettingsResponse" + "$ref": "#/components/schemas/CreateReaderCheckoutResponse" } } }, - "description": "Reader settings updated successfully." + "description": "The Checkout got successfully created for the given reader." }, "400": { "content": { "application/json": { + "example": { + "errors": { + "detail": "Invalid affiliate key.", + "type": "INVALID_AFFILIATE_KEY" + } + }, "schema": { - "$ref": "#/components/schemas/UpdateReaderSettingsError" + "$ref": "#/components/schemas/CreateReaderCheckoutError" } }, "application/problem+json": { "example": { - "detail": "Bad Request", + "detail": "Invalid affiliate key.", "status": 400, - "title": "Bad Request", - "type": "https://developer.sumup.com/problem/bad-request" + "title": "Invalid Affiliate Key", + "type": "https://developer.sumup.com/problem/invalid-affiliate-key" }, "schema": { "$ref": "#/components/schemas/Problem" } } }, - "description": "The request body is malformed." + "description": "Response when given params (or one of them) are invalid" }, "401": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateReaderSettingsError" + "$ref": "#/components/schemas/CreateReaderCheckoutError" } }, "application/problem+json": { @@ -6096,34 +6163,40 @@ } } }, - "description": "The reader was not found." + "description": "Response when given reader is not found" }, "422": { "content": { "application/json": { - "example": { - "errors": { - "detail": "The device is offline.", - "type": "READER_OFFLINE" - } - }, "schema": { - "$ref": "#/components/schemas/UpdateReaderSettingsUnprocessableEntity" + "$ref": "#/components/schemas/CreateReaderCheckoutUnprocessableEntity" } }, "application/problem+json": { - "example": { - "detail": "The device is offline.", - "status": 422, - "title": "Reader Offline", - "type": "https://developer.sumup.com/problem/reader-offline" + "examples": { + "PaymentMethodNotAllowed": { + "value": { + "detail": "Payment method not allowed for this merchant.", + "status": 422, + "title": "Payment Method Not Allowed", + "type": "https://developer.sumup.com/problem/payment-method-not-allowed" + } + }, + "ValidationError": { + "value": { + "detail": "Validation failed", + "status": 422, + "title": "Unprocessable Content", + "type": "https://developer.sumup.com/problem/validation-error" + } + } }, "schema": { "$ref": "#/components/schemas/Problem" } } }, - "description": "The settings are invalid, the reader is offline, the reader model is not supported, or the reader could not apply the update." + "description": "Response when given params (or one of them) are invalid" } }, "security": [ @@ -6136,12 +6209,12 @@ ] } ], - "summary": "Update Reader Settings", + "summary": "Create a Reader Checkout", "tags": [ "Readers" ], "x-codegen": { - "method_name": "update_reader_settings" + "method_name": "create_checkout" }, "x-permissions": [ "readers.checkouts.create" @@ -6151,11 +6224,11 @@ ] } }, - "/v0.1/merchants/{merchant_code}/readers/{reader_id}/terminate": { - "post": { + "/v0.1/merchants/{merchant_code}/readers/{reader_id}/status": { + "get": { "callbacks": {}, - "description": "Terminate a Reader Checkout stops the current transaction on the target device.\n\nThis process is asynchronous and the actual termination may take some time to be performed on the device.\n\n\nThere are some caveats when using this endpoint:\n* The target device must be online, otherwise terminate won't be accepted\n* The action will succeed only if the device is waiting for cardholder action: e.g: waiting for card, waiting for PIN, etc.\n* There is no confirmation of the termination.\n\nIf a transaction is successfully terminated and `return_url` was provided on Checkout, the transaction status will be sent as `failed` to the provided URL.\n\n\n**Note**: If the target device is a Solo, it must be in version 3.3.28.0 or higher.\n", - "operationId": "CreateReaderTerminate", + "description": "Provides the last known status for a Reader.\n\nThis endpoint allows you to retrieve updates from the connected card reader, including the current screen being displayed during the payment process and the device status (battery level, connectivity, and update state).\n\nSupported States\n\n* `IDLE` – Reader ready for next transaction\n* `SELECTING_TIP` – Waiting for tip input\n* `WAITING_FOR_CARD` – Awaiting card insert/tap\n* `WAITING_FOR_PIN` – Waiting for PIN entry\n* `WAITING_FOR_SIGNATURE` – Waiting for customer signature\n* `UPDATING_FIRMWARE` – Firmware update in progress\n\nDevice Status\n\n* `ONLINE` – Device connected and operational\n* `OFFLINE` – Device disconnected (last state persisted)\n\n**Note**: If the target device is a Solo, it must be in version 3.3.39.0 or higher.\n", + "operationId": "GetReaderStatus", "parameters": [ { "description": "Merchant Code", @@ -6178,25 +6251,22 @@ } } ], - "requestBody": { - "content": { - "application/json": {} - }, - "description": "A checkout initial attributes", - "required": false - }, "responses": { - "202": { + "200": { "content": { - "application/json": {} + "application/json": { + "schema": { + "$ref": "#/components/schemas/StatusResponse" + } + } }, - "description": "The Terminate action was successfully dispatched for the given reader." + "description": "Response with the device status." }, "400": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateReaderTerminateError" + "$ref": "#/components/schemas/BadRequest" } }, "application/problem+json": { @@ -6217,7 +6287,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateReaderTerminateError" + "$ref": "#/components/schemas/Unauthorized" } }, "application/problem+json": { @@ -6232,7 +6302,7 @@ } } }, - "description": "Unauthorized" + "description": "Response when given merchant's token is invalid" }, "404": { "content": { @@ -6254,27 +6324,6 @@ } }, "description": "Response when given reader is not found" - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateReaderTerminateUnprocessableEntity" - } - }, - "application/problem+json": { - "example": { - "detail": "The device is offline.", - "status": 422, - "title": "Reader Offline", - "type": "https://developer.sumup.com/problem/reader-offline" - }, - "schema": { - "$ref": "#/components/schemas/Problem" - } - } - }, - "description": "Response when given params (or one of them) are invalid" } }, "security": [ @@ -6283,33 +6332,33 @@ }, { "oauth2": [ - "readers.write" + "readers.read" ] } ], - "summary": "Terminate a Reader Checkout", + "summary": "Get a Reader Status", "tags": [ "Readers" ], "x-codegen": { - "method_name": "terminate_checkout" + "method_name": "get_status" }, "x-permissions": [ - "readers.checkouts.delete" + "readers.view" ], "x-scopes": [ - "readers.write" + "readers.read" ] } }, - "/v0.1/merchants/{merchant_code}/readers/{reader_id}/checkout/{checkout_id}": { + "/v0.1/merchants/{merchant_code}/readers/{reader_id}/settings": { "get": { "callbacks": {}, - "description": "Get a Checkout for a Reader.\n", - "operationId": "GetReaderCheckout", + "description": "Returns the menu lock settings for a Solo reader.\n\nFor an online reader, returns the current settings. For an offline reader,\nreturns the last saved settings, which may differ from its current configuration.\nReturns `404` if the reader is offline and no saved settings are available.\n\nThe response may include the menu lock PIN.\n", + "operationId": "GetReaderSettings", "parameters": [ { - "description": "Merchant Code", + "description": "The merchant code of the account that owns the reader.", "example": "MC0X0ABC", "in": "path", "name": "merchant_code", @@ -6319,7 +6368,7 @@ } }, { - "description": "The unique identifier of the Reader", + "description": "The unique identifier of the reader.", "example": "rdr_3MSAFM23CK82VSTT4BN6RWSQ65", "in": "path", "name": "reader_id", @@ -6327,16 +6376,6 @@ "schema": { "type": "string" } - }, - { - "description": "The unique identifier of the Checkout", - "example": "74ecff66-1655-43ed-8ce3-193f49fa602f", - "in": "path", - "name": "checkout_id", - "required": true, - "schema": { - "type": "string" - } } ], "responses": { @@ -6344,17 +6383,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetReaderCheckoutResponse" + "$ref": "#/components/schemas/GetReaderSettingsResponse" } } }, - "description": "The Checkout got successfully retrieved for the given reader." + "description": "Reader settings retrieved successfully." }, "401": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateReaderCheckoutError" + "$ref": "#/components/schemas/UpdateReaderSettingsError" } }, "application/problem+json": { @@ -6390,7 +6429,28 @@ } } }, - "description": "Response when given reader or checkout is not found" + "description": "The reader was not found, or it is offline and has no saved settings." + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateReaderSettingsUnprocessableEntity" + } + }, + "application/problem+json": { + "example": { + "detail": "Reader settings are only supported for Solo readers.", + "status": 422, + "title": "Unsupported Device Model", + "type": "https://developer.sumup.com/problem/unsupported-device-model" + }, + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + }, + "description": "The reader model is not supported, the firmware version is unsupported, or the reader could not return its settings." } }, "security": [ @@ -6403,12 +6463,12 @@ ] } ], - "summary": "Get a Reader Checkout", + "summary": "Get Reader Settings", "tags": [ "Readers" ], "x-codegen": { - "method_name": "get_checkout" + "method_name": "get_reader_settings" }, "x-permissions": [ "readers.checkouts.view" @@ -6416,353 +6476,783 @@ "x-scopes": [ "readers.read" ] - } - }, - "/v0.1/merchants/{merchant_code}/tokens": { - "post": { - "summary": "Create a merchant token", - "description": "Creates a short-lived token for the merchant account identified by `merchant_code` and the requested actions.\n\nCall this endpoint from your backend using a [supported authentication method](https://developer.sumup.com/api/authentication). You must have access to the merchant account. Before returning the token, check that the user signed in to your application is allowed to accept payments for that account.\n\nPass the returned `access_token` to the SDK. The token expires 15 minutes after creation; use `expires_in` for its remaining lifetime. To continue after it expires, create a new token through this endpoint.", - "operationId": "CreateMerchantToken", - "tags": [ - "Tokens" - ], - "security": [ - { - "apiKey": [] - }, - { - "oauth2": [] - } - ], - "x-scopes": [], - "x-codegen": { - "method_name": "create" - }, - "x-permissions": [ - { - "relation": "tokens.create", - "object_type": "merchant", - "object_id_param": "merchant_code" - } - ], + }, + "patch": { + "callbacks": {}, + "description": "Updates the menu lock settings for a Solo reader. The reader must be online.\nA successful response confirms that the reader applied the update.\n\nInclude at least one of `menu_lock.enabled` or `menu_lock.passcode`.\nOmitted settings keep their current values. The response contains only the\nsettings included in the request.\n\nWhen enabling menu lock for a reader without a PIN, include a four-digit PIN\nin `menu_lock.passcode` in the same request.\n", + "operationId": "UpdateReaderSettings", "parameters": [ { + "description": "The merchant code of the account that owns the reader.", + "example": "MC0X0ABC", "in": "path", "name": "merchant_code", - "description": "Unique code of the merchant account that will receive the payments.", "required": true, "schema": { - "type": "string", - "example": "MC0X0ABC" + "type": "string" } - } - ], - "requestBody": { - "description": "Actions the merchant token should allow.", - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "actions" - ], - "properties": { - "actions": { - "type": "array", - "description": "Actions the token allows for this merchant account.", - "minItems": 1, - "uniqueItems": true, - "items": { - "type": "string", - "enum": [ - "checkout" - ] - }, - "example": [ - "checkout" - ] - } - } - }, - "example": { - "actions": [ - "checkout" - ] - } + }, + { + "description": "The unique identifier of the reader.", + "example": "rdr_3MSAFM23CK82VSTT4BN6RWSQ65", + "in": "path", + "name": "reader_id", + "required": true, + "schema": { + "type": "string" } } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateReaderSettingsRequest" + } + } + }, + "description": "Menu lock settings to update.", + "required": true }, "responses": { "200": { - "description": "Merchant token created. Pass its access_token to the SDK.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Token" - }, - "example": { - "access_token": "MERCHANT_TOKEN", - "token_type": "Bearer", - "expires_in": 899 + "$ref": "#/components/schemas/UpdateReaderSettingsResponse" } } - } + }, + "description": "Reader settings updated successfully." }, "400": { - "description": "The request body is invalid or contains unsupported or duplicate actions.", "content": { - "application/problem+json": { + "application/json": { "schema": { - "$ref": "#/components/schemas/Problem" - }, + "$ref": "#/components/schemas/UpdateReaderSettingsError" + } + }, + "application/problem+json": { "example": { - "type": "https://developer.sumup.com/problem/bad-request", - "title": "Bad Request", + "detail": "Bad Request", "status": 400, - "detail": "The request contains an unsupported action." + "title": "Bad Request", + "type": "https://developer.sumup.com/problem/bad-request" + }, + "schema": { + "$ref": "#/components/schemas/Problem" } } - } + }, + "description": "The request body is malformed." }, "401": { - "description": "Authentication is missing, invalid, or expired.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Problem" - }, - "example": { - "type": "https://developer.sumup.com/problem/unauthorized", - "title": "Unauthorized", - "status": 401 + "$ref": "#/components/schemas/UpdateReaderSettingsError" } }, "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - }, "example": { - "type": "https://developer.sumup.com/problem/unauthorized", - "title": "Unauthorized", + "detail": "Unauthorized", "status": 401, - "detail": "Token is invalid or expired." + "title": "Unauthorized", + "type": "https://developer.sumup.com/problem/unauthorized" + }, + "schema": { + "$ref": "#/components/schemas/Problem" } } - } + }, + "description": "Unauthorized" }, - "403": { - "description": "The authenticated identity does not have permission to create tokens for this merchant account.", + "404": { "content": { "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFound" + } + }, + "application/problem+json": { + "example": { + "detail": "The requested resource doesn't exist or does not belong to you.", + "status": 404, + "title": "Requested resource couldn't be found.", + "type": "https://developer.sumup.com/problem/not-found" + }, "schema": { "$ref": "#/components/schemas/Problem" + } + } + }, + "description": "The reader was not found." + }, + "422": { + "content": { + "application/json": { + "example": { + "errors": { + "detail": "The device is offline.", + "type": "READER_OFFLINE" + } }, + "schema": { + "$ref": "#/components/schemas/UpdateReaderSettingsUnprocessableEntity" + } + }, + "application/problem+json": { "example": { - "type": "https://developer.sumup.com/problem/forbidden", - "title": "Forbidden", - "status": 403 + "detail": "The device is offline.", + "status": 422, + "title": "Reader Offline", + "type": "https://developer.sumup.com/problem/reader-offline" + }, + "schema": { + "$ref": "#/components/schemas/Problem" } } - } + }, + "description": "The settings are invalid, the reader is offline, the reader model is not supported, the firmware version is unsupported, or the reader could not apply the update." } - } + }, + "security": [ + { + "apiKey": [] + }, + { + "oauth2": [ + "readers.write" + ] + } + ], + "summary": "Update Reader Settings", + "tags": [ + "Readers" + ], + "x-codegen": { + "method_name": "update_reader_settings" + }, + "x-permissions": [ + "readers.checkouts.create" + ], + "x-scopes": [ + "readers.write" + ] } - } - }, - "components": { - "schemas": { - "AddressLegacy": { - "title": "Address Legacy", - "type": "object", - "description": "Profile's personal address information.", - "properties": { - "city": { - "type": "string", - "description": "City name from the address.", - "example": "Berlin" + }, + "/v0.1/merchants/{merchant_code}/readers/{reader_id}/terminate": { + "post": { + "callbacks": {}, + "description": "Terminate a Reader Checkout stops the current transaction on the target device.\n\nThis process is asynchronous and the actual termination may take some time to be performed on the device.\n\n\nThere are some caveats when using this endpoint:\n* The target device must be online, otherwise terminate won't be accepted\n* The action will succeed only if the device is waiting for cardholder action: e.g: waiting for card, waiting for PIN, etc.\n* There is no confirmation of the termination.\n\nIf a transaction is successfully terminated and `return_url` was provided on Checkout, the transaction status will be sent as `failed` to the provided URL.\n\n\n**Note**: If the target device is a Solo, it must be in version 3.3.28.0 or higher.\n", + "operationId": "CreateReaderTerminate", + "parameters": [ + { + "description": "Merchant Code", + "example": "MC0X0ABC", + "in": "path", + "name": "merchant_code", + "required": true, + "schema": { + "type": "string" + } }, - "country": { - "type": "string", - "description": "Two letter country code formatted according to [ISO3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).", - "example": "DE" + { + "description": "The unique identifier of the Reader", + "example": "rdr_3MSAFM23CK82VSTT4BN6RWSQ65", + "in": "path", + "name": "reader_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": {} }, - "line_1": { - "type": "string", - "description": "First line of the address with details of the street name and number.", - "example": "Sample street" + "description": "A checkout initial attributes", + "required": false + }, + "responses": { + "202": { + "content": { + "application/json": {} + }, + "description": "The Terminate action was successfully dispatched for the given reader." }, - "line_2": { - "type": "string", - "description": "Second line of the address with details of the building, unit, apartment, and floor numbers.", - "example": "ap. 5" + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateReaderTerminateError" + } + }, + "application/problem+json": { + "example": { + "detail": "Bad Request", + "status": 400, + "title": "Bad Request", + "type": "https://developer.sumup.com/problem/bad-request" + }, + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + }, + "description": "Response when given params (or one of them) are invalid" }, - "postal_code": { - "type": "string", - "description": "Postal code from the address.", - "example": "10115" - }, - "state": { - "type": "string", - "description": "State name or abbreviation from the address.", - "example": "Berlin" - } - } - }, - "Card": { - "title": "Card", - "type": "object", - "description": "__Required when payment type is `card`.__ Details of the payment card.", - "properties": { - "name": { - "type": "string", - "description": "Name of the cardholder as it appears on the payment card.", - "writeOnly": true, - "example": "FIRSTNAME LASTNAME" - }, - "number": { - "type": "string", - "description": "Number of the payment card (without spaces).", - "writeOnly": true, - "example": "1234567890123456" - }, - "expiry_year": { - "type": "string", - "description": "Two- or four-digit expiration year in `YY` or `YYYY` format.", - "writeOnly": true, - "pattern": "^[0-9]{2}([0-9]{2})?$", - "example": "2030" - }, - "expiry_month": { - "type": "string", - "description": "Two-digit expiration month, from `01` through `12`.", - "writeOnly": true, - "minLength": 2, - "maxLength": 2, - "pattern": "^(0[1-9]|1[0-2])$", - "example": "12" + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateReaderTerminateError" + } + }, + "application/problem+json": { + "example": { + "detail": "Unauthorized", + "status": 401, + "title": "Unauthorized", + "type": "https://developer.sumup.com/problem/unauthorized" + }, + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + }, + "description": "Unauthorized" }, - "cvv": { - "type": "string", - "description": "Three or four-digit card verification value (security code) of the payment card.", - "writeOnly": true, - "maxLength": 4, - "minLength": 3, - "example": "123" + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFound" + } + }, + "application/problem+json": { + "example": { + "detail": "The requested resource doesn't exist or does not belong to you.", + "status": 404, + "title": "Requested resource couldn't be found.", + "type": "https://developer.sumup.com/problem/not-found" + }, + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + }, + "description": "Response when given reader is not found" }, - "zip_code": { - "type": "string", - "description": "Required five-digit ZIP code. Applicable only to merchant users in the USA.", - "writeOnly": true, - "maxLength": 5, - "minLength": 5, - "example": "12345" + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateReaderTerminateUnprocessableEntity" + } + }, + "application/problem+json": { + "example": { + "detail": "The device is offline.", + "status": 422, + "title": "Reader Offline", + "type": "https://developer.sumup.com/problem/reader-offline" + }, + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + }, + "description": "Response when given params (or one of them) are invalid" + } + }, + "security": [ + { + "apiKey": [] }, - "type": { - "$ref": "#/components/schemas/CardType" + { + "oauth2": [ + "readers.write" + ] } + ], + "summary": "Terminate a Reader Checkout", + "tags": [ + "Readers" + ], + "x-codegen": { + "method_name": "terminate_checkout" }, - "required": [ - "name", - "number", - "expiry_month", - "expiry_year", - "cvv", - "type" + "x-permissions": [ + "readers.checkouts.delete" + ], + "x-scopes": [ + "readers.write" ] - }, - "CardResponse": { - "title": "Card Response", - "type": "object", - "description": "Details of the payment card.", - "properties": { - "last_4_digits": { - "type": "string", - "description": "Last 4 digits of the payment card number.", - "readOnly": true, - "minLength": 4, - "maxLength": 4, - "example": "3456" + } + }, + "/v0.1/merchants/{merchant_code}/readers/{reader_id}/checkout/{checkout_id}": { + "get": { + "callbacks": {}, + "description": "Get a Checkout for a Reader.\n", + "operationId": "GetReaderCheckout", + "parameters": [ + { + "description": "Merchant Code", + "example": "MC0X0ABC", + "in": "path", + "name": "merchant_code", + "required": true, + "schema": { + "type": "string" + } }, - "type": { - "$ref": "#/components/schemas/CardType" + { + "description": "The unique identifier of the Reader", + "example": "rdr_3MSAFM23CK82VSTT4BN6RWSQ65", + "in": "path", + "name": "reader_id", + "required": true, + "schema": { + "type": "string" + } }, - "payment_account_reference": { - "type": "string", - "description": "Payment Account Reference (PAR) defined by [EMVCo](https://www.emvco.com/emv-technologies/payment-tokenisation/). It links a card's primary account number (PAN) with its affiliated payment tokens, allowing transactions made with the physical card and tokenized versions of that card, such as digital wallets, to be correlated when PAR is available.\n\nThis reference cannot be used to initiate a payment and is separate from the saved payment instrument `token` used to process checkouts. Returned only when available for the card; integrations must handle its absence.", - "example": "5665ABCDEFGHIJKLMNOPQRSTUVWXY" + { + "description": "The unique identifier of the Checkout", + "example": "74ecff66-1655-43ed-8ce3-193f49fa602f", + "in": "path", + "name": "checkout_id", + "required": true, + "schema": { + "type": "string" + } } - } - }, - "Device": { - "title": "Device", - "description": "Details of the device used to create the transaction.", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Device name.", - "example": "m0xx" - }, - "system_name": { - "type": "string", - "description": "Device OS.", - "example": "Android" + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetReaderCheckoutResponse" + } + } + }, + "description": "The Checkout got successfully retrieved for the given reader." }, - "model": { - "type": "string", - "description": "Device model.", - "example": "GT-I9300" + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateReaderCheckoutError" + } + }, + "application/problem+json": { + "example": { + "detail": "Unauthorized", + "status": 401, + "title": "Unauthorized", + "type": "https://developer.sumup.com/problem/unauthorized" + }, + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + }, + "description": "Unauthorized" }, - "system_version": { - "type": "string", - "description": "Device OS version.", - "example": "4.3" + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotFound" + } + }, + "application/problem+json": { + "example": { + "detail": "The requested resource doesn't exist or does not belong to you.", + "status": 404, + "title": "Requested resource couldn't be found.", + "type": "https://developer.sumup.com/problem/not-found" + }, + "schema": { + "$ref": "#/components/schemas/Problem" + } + } + }, + "description": "Response when given reader or checkout is not found" + } + }, + "security": [ + { + "apiKey": [] }, - "uuid": { - "type": "string", - "description": "Device UUID.", - "example": "3ae2a6b7-fb0d-3b50-adbf-cb7e2db30cd2" + { + "oauth2": [ + "readers.read" + ] + } + ], + "summary": "Get a Reader Checkout", + "tags": [ + "Readers" + ], + "x-codegen": { + "method_name": "get_checkout" + }, + "x-permissions": [ + "readers.checkouts.view" + ], + "x-scopes": [ + "readers.read" + ] + } + }, + "/v0.1/merchants/{merchant_code}/tokens": { + "post": { + "summary": "Create a merchant token", + "description": "Creates a short-lived token for the merchant account identified by `merchant_code` and the requested actions.\n\nCall this endpoint from your backend using a [supported authentication method](https://developer.sumup.com/api/authentication). You must have access to the merchant account. Before returning the token, check that the user signed in to your application is allowed to accept payments for that account.\n\nPass the returned `access_token` to the SDK. The token expires 15 minutes after creation; use `expires_in` for its remaining lifetime. To continue after it expires, create a new token through this endpoint.", + "operationId": "CreateMerchantToken", + "tags": [ + "Tokens" + ], + "security": [ + { + "apiKey": [] + }, + { + "oauth2": [] + } + ], + "x-scopes": [], + "x-codegen": { + "method_name": "create" + }, + "x-permissions": [ + { + "relation": "tokens.create", + "object_type": "merchant", + "object_id_param": "merchant_code" + } + ], + "parameters": [ + { + "in": "path", + "name": "merchant_code", + "description": "Unique code of the merchant account that will receive the payments.", + "required": true, + "schema": { + "type": "string", + "example": "MC0X0ABC" + } + } + ], + "requestBody": { + "description": "Actions the merchant token should allow.", + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "actions" + ], + "properties": { + "actions": { + "type": "array", + "description": "Actions the token allows for this merchant account.", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "string", + "enum": [ + "checkout" + ] + }, + "example": [ + "checkout" + ] + } + } + }, + "example": { + "actions": [ + "checkout" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Merchant token created. Pass its access_token to the SDK.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Token" + }, + "example": { + "access_token": "MERCHANT_TOKEN", + "token_type": "Bearer", + "expires_in": 899 + } + } + } + }, + "400": { + "description": "The request body is invalid or contains unsupported or duplicate actions.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + }, + "example": { + "type": "https://developer.sumup.com/problem/bad-request", + "title": "Bad Request", + "status": 400, + "detail": "The request contains an unsupported action." + } + } + } + }, + "401": { + "description": "Authentication is missing, invalid, or expired.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Problem" + }, + "example": { + "type": "https://developer.sumup.com/problem/unauthorized", + "title": "Unauthorized", + "status": 401 + } + }, + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + }, + "example": { + "type": "https://developer.sumup.com/problem/unauthorized", + "title": "Unauthorized", + "status": 401, + "detail": "Token is invalid or expired." + } + } + } + }, + "403": { + "description": "The authenticated identity does not have permission to create tokens for this merchant account.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Problem" + }, + "example": { + "type": "https://developer.sumup.com/problem/forbidden", + "title": "Forbidden", + "status": 403 + } + } + } } } - }, - "ElvCardAccount": { - "title": "ELV Card Account", - "description": "Details of the ELV card account associated with the transaction.", + } + } + }, + "components": { + "schemas": { + "AddressLegacy": { + "title": "Address Legacy", "type": "object", + "description": "Profile's personal address information.", "properties": { - "sort_code": { + "city": { "type": "string", - "description": "ELV card sort code.", - "example": "87096214" + "description": "City name from the address.", + "example": "Berlin" }, - "last_4_digits": { + "country": { "type": "string", - "description": "ELV card account number last 4 digits.", - "example": "5674" + "description": "Two letter country code formatted according to [ISO3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).", + "example": "DE" }, - "sequence_no": { - "type": "integer", - "description": "ELV card sequence number.", - "example": 1 + "line_1": { + "type": "string", + "description": "First line of the address with details of the street name and number.", + "example": "Sample street" }, - "iban": { + "line_2": { "type": "string", - "description": "ELV IBAN.", - "example": "DE60870962140012345674" + "description": "Second line of the address with details of the building, unit, apartment, and floor numbers.", + "example": "ap. 5" + }, + "postal_code": { + "type": "string", + "description": "Postal code from the address.", + "example": "10115" + }, + "state": { + "type": "string", + "description": "State name or abbreviation from the address.", + "example": "Berlin" } } }, - "HostedCheckout": { - "title": "Hosted Checkout", + "Card": { + "title": "Card", "type": "object", - "description": "Hosted Checkout configuration. Enable it to receive a SumUp-hosted payment page URL in the checkout response.", + "description": "__Required when payment type is `card`.__ Details of the payment card.", "properties": { - "enabled": { - "type": "boolean", - "description": "Whether the checkout should include a SumUp-hosted payment page.", - "example": true - } + "name": { + "type": "string", + "description": "Name of the cardholder as it appears on the payment card.", + "writeOnly": true, + "example": "FIRSTNAME LASTNAME" + }, + "number": { + "type": "string", + "description": "Number of the payment card (without spaces).", + "writeOnly": true, + "example": "1234567890123456" + }, + "expiry_year": { + "type": "string", + "description": "Two- or four-digit expiration year in `YY` or `YYYY` format.", + "writeOnly": true, + "pattern": "^[0-9]{2}([0-9]{2})?$", + "example": "2030" + }, + "expiry_month": { + "type": "string", + "description": "Two-digit expiration month, from `01` through `12`.", + "writeOnly": true, + "minLength": 2, + "maxLength": 2, + "pattern": "^(0[1-9]|1[0-2])$", + "example": "12" + }, + "cvv": { + "type": "string", + "description": "Three or four-digit card verification value (security code) of the payment card.", + "writeOnly": true, + "maxLength": 4, + "minLength": 3, + "example": "123" + }, + "zip_code": { + "type": "string", + "description": "Required five-digit ZIP code. Applicable only to merchant users in the USA.", + "writeOnly": true, + "maxLength": 5, + "minLength": 5, + "example": "12345" + }, + "type": { + "$ref": "#/components/schemas/CardType" + } + }, + "required": [ + "name", + "number", + "expiry_month", + "expiry_year", + "cvv", + "type" + ] + }, + "CardResponse": { + "title": "Card Response", + "type": "object", + "description": "Details of the payment card.", + "properties": { + "last_4_digits": { + "type": "string", + "description": "Last 4 digits of the payment card number.", + "readOnly": true, + "minLength": 4, + "maxLength": 4, + "example": "3456" + }, + "type": { + "$ref": "#/components/schemas/CardType" + }, + "payment_account_reference": { + "type": "string", + "description": "Payment Account Reference (PAR) defined by [EMVCo](https://www.emvco.com/emv-technologies/payment-tokenisation/). It links a card's primary account number (PAN) with its affiliated payment tokens, allowing transactions made with the physical card and tokenized versions of that card, such as digital wallets, to be correlated when PAR is available.\n\nThis reference cannot be used to initiate a payment and is separate from the saved payment instrument `token` used to process checkouts. Returned only when available for the card; integrations must handle its absence.", + "example": "5665ABCDEFGHIJKLMNOPQRSTUVWXY" + } + } + }, + "Device": { + "title": "Device", + "description": "Details of the device used to create the transaction.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Device name.", + "example": "m0xx" + }, + "system_name": { + "type": "string", + "description": "Device OS.", + "example": "Android" + }, + "model": { + "type": "string", + "description": "Device model.", + "example": "GT-I9300" + }, + "system_version": { + "type": "string", + "description": "Device OS version.", + "example": "4.3" + }, + "uuid": { + "type": "string", + "description": "Device UUID.", + "example": "3ae2a6b7-fb0d-3b50-adbf-cb7e2db30cd2" + } + } + }, + "ElvCardAccount": { + "title": "ELV Card Account", + "description": "Details of the ELV card account associated with the transaction.", + "type": "object", + "properties": { + "sort_code": { + "type": "string", + "description": "ELV card sort code.", + "example": "87096214" + }, + "last_4_digits": { + "type": "string", + "description": "ELV card account number last 4 digits.", + "example": "5674" + }, + "sequence_no": { + "type": "integer", + "description": "ELV card sequence number.", + "example": 1 + }, + "iban": { + "type": "string", + "description": "ELV IBAN.", + "example": "DE60870962140012345674" + } + } + }, + "HostedCheckout": { + "title": "Hosted Checkout", + "type": "object", + "description": "Hosted Checkout configuration. Enable it to receive a SumUp-hosted payment page URL in the checkout response.", + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether the checkout should include a SumUp-hosted payment page.", + "example": true + } }, "required": [ "enabled" @@ -7750,2511 +8240,4051 @@ "maxLength": 255, "example": "423.378.593-47" }, - "address": { - "$ref": "#/components/schemas/AddressLegacy" + "address": { + "$ref": "#/components/schemas/AddressLegacy" + } + } + }, + "Product": { + "title": "Product", + "type": "object", + "description": "Product details associated with a transaction.", + "properties": { + "name": { + "type": "string", + "description": "Product name.", + "example": "Purchase reader for merchant with code ME3FCAVF" + }, + "price_label": { + "type": "string", + "description": "Human-readable label for the product price.", + "example": "EUR 100.00" + }, + "price": { + "type": "number", + "format": "decimal", + "description": "Product price.", + "example": 100 + }, + "vat_rate": { + "type": "number", + "format": "decimal", + "description": "VAT rate as a decimal fraction, for example `0.19` for 19%.", + "example": 0.19 + }, + "single_vat_amount": { + "type": "number", + "format": "decimal", + "description": "VAT amount for a single product.", + "example": 19 + }, + "price_with_vat": { + "type": "number", + "format": "decimal", + "description": "Product price including VAT.", + "example": 119 + }, + "vat_amount": { + "type": "number", + "format": "decimal", + "description": "Total VAT amount for the product quantity.", + "example": 19 + }, + "quantity": { + "type": "integer", + "description": "Product quantity.", + "example": 1 + }, + "total_price": { + "type": "number", + "format": "decimal", + "description": "Total price calculated as the product price multiplied by the quantity.", + "example": 100 + }, + "total_with_vat": { + "type": "number", + "format": "decimal", + "description": "Total product price including VAT.", + "example": 119 + } + } + }, + "Receipt": { + "type": "object", + "title": "Receipt", + "description": "Structured receipt details for a transaction. The transaction's `amount`, `vat_amount`, and `tip_amount`, as well as event amounts, are returned as decimal strings in major currency units, for example `\"10.10\"` for EUR 10.10.", + "properties": { + "transaction_data": { + "$ref": "#/components/schemas/ReceiptTransaction" + }, + "merchant_data": { + "$ref": "#/components/schemas/ReceiptMerchantData" + }, + "emv_data": { + "type": "object", + "description": "EMV-specific metadata returned for card-present payments.", + "example": {} + }, + "acquirer_data": { + "type": "object", + "description": "Acquirer-specific metadata related to the card authorization.", + "example": { + "authorization_code": "053201", + "return_code": "00" + }, + "properties": { + "tid": { + "type": "string", + "description": "Identifier of the terminal used for the authorization.", + "example": "12345678" + }, + "authorization_code": { + "type": "string", + "description": "Authorization code returned by the acquirer.", + "example": "053201" + }, + "return_code": { + "type": "string", + "description": "Return code reported by the acquirer.", + "example": "00" + }, + "local_time": { + "type": "string", + "description": "Local timestamp of the card authorization.", + "example": "2020-02-29T11:56:56+01:00" + } + } + } + } + }, + "ReceiptEvent": { + "title": "Receipt Event", + "description": "Transaction event details as rendered on the receipt.", + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/TransactionEventID" + }, + "transaction_id": { + "$ref": "#/components/schemas/TransactionID" + }, + "type": { + "$ref": "#/components/schemas/TransactionEventType" + }, + "status": { + "$ref": "#/components/schemas/TransactionEventStatus" + }, + "amount": { + "type": "string", + "format": "double", + "description": "Amount associated with the transaction event, in major units.", + "example": "10.10" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "The timestamp of when the transaction event occurred.", + "example": "2020-05-25T10:49:42.784Z" + }, + "receipt_no": { + "type": "string", + "description": "Receipt number associated with the event.", + "example": "123456" + } + } + }, + "ReceiptCard": { + "title": "Receipt Card", + "description": "Payment card details displayed on the receipt.", + "type": "object", + "properties": { + "last_4_digits": { + "type": "string", + "description": "Last four digits of the payment card number.", + "example": "3456" + }, + "type": { + "type": "string", + "description": "Issuing card network of the payment card.", + "example": "VISA" + } + } + }, + "ReceiptReader": { + "title": "Receipt Reader", + "description": "Card reader details displayed on the receipt.", + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Unique identifier of the physical card reader.", + "example": "U1DT3NA00-CN" + }, + "type": { + "type": "string", + "description": "Model of the physical card reader.", + "example": "solo" + } + } + }, + "ReceiptMerchantData": { + "title": "Receipt Merchant Data", + "type": "object", + "description": "Merchant details displayed on a transaction receipt.", + "properties": { + "merchant_profile": { + "type": "object", + "description": "Merchant profile details displayed on the receipt.", + "properties": { + "merchant_code": { + "type": "string", + "description": "Short unique identifier for the merchant.", + "example": "MH4H92C7" + }, + "business_name": { + "type": "string", + "description": "Business name of the merchant.", + "example": "Coffee House" + }, + "company_registration_number": { + "type": "string", + "description": "Company registration number of the merchant.", + "example": "HRB 123456" + }, + "vat_id": { + "type": "string", + "description": "VAT identification number of the merchant.", + "example": "DE123456789" + }, + "website": { + "type": "string", + "description": "Website of the merchant.", + "example": "https://example.com" + }, + "email": { + "type": "string", + "description": "Email address of the merchant.", + "example": "merchant@example.com" + }, + "language": { + "type": "string", + "description": "Language configured for the merchant profile.", + "example": "de" + }, + "address": { + "type": "object", + "description": "Business address of the merchant.", + "properties": { + "address_line1": { + "type": "string", + "description": "First line of the merchant address.", + "example": "Sample street 1" + }, + "address_line2": { + "type": "string", + "description": "Second line of the merchant address.", + "example": "Floor 2" + }, + "city": { + "type": "string", + "description": "City of the merchant address.", + "example": "Berlin" + }, + "country": { + "type": "string", + "description": "Two-letter ISO 3166-1 alpha-2 country code of the merchant address.", + "example": "DE" + }, + "country_en_name": { + "type": "string", + "description": "English name of the country in the merchant address.", + "example": "Germany" + }, + "country_native_name": { + "type": "string", + "description": "Localized name of the country in the merchant address.", + "example": "Deutschland" + }, + "region_name": { + "type": "string", + "description": "Region or state of the merchant address.", + "example": "Berlin" + }, + "post_code": { + "type": "string", + "description": "Postal code of the merchant address.", + "example": "10115" + }, + "landline": { + "type": "string", + "description": "Landline phone number of the merchant.", + "example": "+493012345678" + } + } + } + } + }, + "locale": { + "type": "string", + "description": "Locale used for rendering localized receipt fields.", + "example": "de-DE" + } + } + }, + "ReceiptTransaction": { + "title": "Receipt Transaction", + "type": "object", + "description": "Transaction details displayed on a receipt.", + "example": { + "transaction_code": "TEENSK4W2K", + "transaction_id": "410fc44a-5956-44e1-b5cc-19c6f8d727a4", + "merchant_code": "MH4H92C7", + "amount": "10.10", + "vat_amount": "6.00", + "tip_amount": "3.00", + "currency": "EUR", + "timestamp": "2020-02-29T10:56:56.876Z", + "status": "SUCCESSFUL", + "payment_type": "ECOM", + "entry_mode": "CUSTOMER_ENTRY", + "installments_count": 1, + "process_as": "CREDIT" + }, + "properties": { + "transaction_code": { + "type": "string", + "description": "Transaction code returned after processing the transaction.", + "example": "TEENSK4W2K" + }, + "transaction_id": { + "$ref": "#/components/schemas/TransactionID" + }, + "merchant_code": { + "type": "string", + "description": "Short unique identifier for the merchant.", + "example": "MH4H92C7" + }, + "amount": { + "type": "string", + "description": "Total transaction amount, in major units.", + "example": "10.10" + }, + "vat_amount": { + "type": "string", + "description": "VAT included in the transaction amount, in major units.", + "example": "6.00" + }, + "tip_amount": { + "type": "string", + "description": "Tip included in the transaction amount, in major units.", + "example": "3.00" + }, + "currency": { + "type": "string", + "description": "Three-letter ISO 4217 currency code of the transaction.", + "example": "EUR" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "The timestamp of when the transaction was created.", + "example": "2020-02-29T10:56:56.876Z" + }, + "status": { + "type": "string", + "description": "Current processing status of the transaction.", + "example": "SUCCESSFUL" + }, + "payment_type": { + "type": "string", + "description": "Payment type used for the transaction.", + "example": "ECOM" + }, + "entry_mode": { + "type": "string", + "description": "Entry mode of the payment details.", + "example": "CUSTOMER_ENTRY" + }, + "verification_method": { + "type": "string", + "description": "Cardholder verification method.", + "example": "none" + }, + "card_reader": { + "$ref": "#/components/schemas/ReceiptReader" + }, + "card": { + "$ref": "#/components/schemas/ReceiptCard" + }, + "installments_count": { + "type": "integer", + "description": "Number of installments.", + "example": 1 + }, + "process_as": { + "type": "string", + "description": "Whether the transaction was processed as credit or debit.", + "enum": [ + "CREDIT", + "DEBIT" + ], + "example": "CREDIT" + }, + "products": { + "type": "array", + "description": "Products associated with the transaction.", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Product name.", + "example": "Coffee" + }, + "description": { + "type": "string", + "description": "Product description.", + "example": "Cappuccino" + }, + "price": { + "type": "string", + "format": "double", + "description": "Product price.", + "example": "150.0" + }, + "vat_rate": { + "type": "string", + "format": "double", + "description": "VAT rate.", + "example": "0.0" + }, + "single_vat_amount": { + "type": "string", + "format": "double", + "description": "VAT amount for a single product.", + "example": "0.0" + }, + "price_with_vat": { + "type": "string", + "format": "double", + "description": "Product price including VAT.", + "example": "150.0" + }, + "vat_amount": { + "type": "string", + "format": "double", + "description": "Total VAT amount for the product quantity.", + "example": "0.0" + }, + "quantity": { + "type": "integer", + "format": "int64", + "description": "Product quantity.", + "example": 1 + }, + "total_price": { + "type": "string", + "format": "double", + "description": "Total price calculated as the product price multiplied by the quantity.", + "example": "150.0" + }, + "total_with_vat": { + "type": "string", + "format": "double", + "description": "Total product price including VAT.", + "example": "150.0" + } + } + } + }, + "vat_rates": { + "type": "array", + "description": "VAT breakdown for the transaction.", + "items": { + "type": "object", + "properties": { + "gross": { + "type": "number", + "format": "float", + "description": "Gross amount to which the VAT rate applies.", + "example": 10.1 + }, + "net": { + "type": "number", + "format": "float", + "description": "Net amount to which the VAT rate applies.", + "example": 8.49 + }, + "rate": { + "type": "number", + "format": "float", + "description": "VAT rate applied to the transaction amount.", + "example": 0.19 + }, + "vat": { + "type": "number", + "format": "float", + "description": "VAT amount included in the gross amount.", + "example": 1.61 + } + } + } + }, + "events": { + "type": "array", + "description": "Transaction events displayed on the receipt.", + "items": { + "$ref": "#/components/schemas/ReceiptEvent" + } + }, + "receipt_no": { + "type": "string", + "description": "Receipt number associated with the transaction.", + "example": "123456" + } + } + }, + "TransactionEvent": { + "title": "Transaction Event", + "type": "object", + "description": "Detailed information about a transaction event.", + "properties": { + "id": { + "$ref": "#/components/schemas/TransactionEventID" + }, + "event_type": { + "$ref": "#/components/schemas/TransactionEventType" + }, + "status": { + "$ref": "#/components/schemas/TransactionEventStatus" + }, + "amount": { + "type": "number", + "format": "decimal", + "description": "Amount of the event in major units of the associated transaction's currency.", + "example": 58.8 + }, + "due_date": { + "type": "string", + "format": "date", + "description": "Date when the transaction event is due to occur.", + "example": "2020-05-25" + }, + "date": { + "type": "string", + "format": "date", + "description": "Date when the transaction event occurred.", + "example": "2020-05-25" + }, + "installment_number": { + "type": "integer", + "description": "Consecutive number of the installment that is paid. Applicable only to payout events, i.e. `event_type = PAYOUT`.", + "example": 1 + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Date and time of the transaction event.", + "example": "2020-05-25T10:49:42.784Z" + } + } + }, + "TransactionBase": { + "title": "Transaction Base", + "type": "object", + "description": "Core details shared by transaction resources.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier of the transaction.", + "example": "6b425463-3e1b-431d-83fa-1e51c2925e99" + }, + "transaction_code": { + "type": "string", + "description": "SumUp transaction code, for example `TEENSK4W2K`. Use it to look up the transaction with the `transaction_code` query parameter. This is separate from the transaction's `id` and the card issuer's `auth_code`.", + "example": "TEENSK4W2K" + }, + "amount": { + "type": "number", + "format": "float", + "description": "Total amount of the transaction in major units of `currency`, for example `10.1` for EUR 10.10.", + "example": 10.1 + }, + "currency": { + "$ref": "#/components/schemas/Currency" + }, + "timestamp": { + "type": "string", + "example": "2020-02-29T10:56:56.876Z", + "format": "date-time", + "description": "The timestamp of when the transaction was created." + }, + "status": { + "$ref": "#/components/schemas/TransactionStatus" + }, + "payment_type": { + "$ref": "#/components/schemas/PaymentType" + }, + "installments_count": { + "type": "integer", + "description": "Number of installments for a deferred payment.", + "minimum": 1, + "example": 1 + } + } + }, + "TransactionCheckoutInfo": { + "title": "Transaction Checkout Info", + "description": "Checkout-specific fields associated with a transaction.", + "type": "object", + "properties": { + "merchant_code": { + "type": "string", + "description": "Unique code of the registered merchant to whom the payment is made.", + "example": "MH4H92C7" + }, + "vat_amount": { + "type": "number", + "format": "float", + "description": "VAT included in the total transaction amount, in major units of the transaction's currency.", + "example": 6 + }, + "tip_amount": { + "type": "number", + "format": "float", + "description": "Tip included in the total transaction amount, in major units of the transaction's currency.", + "example": 3 + }, + "entry_mode": { + "$ref": "#/components/schemas/EntryMode" + }, + "auth_code": { + "type": "string", + "description": "Authorization code for the transaction sent by the payment card issuer or bank. Applicable only to card payments.", + "example": "053201" + } + } + }, + "TransactionMixinHistory": { + "title": "Transaction Mixin History", + "description": "Additional transaction fields used by history and detailed views.", + "type": "object", + "properties": { + "product_summary": { + "type": "string", + "description": "Short description of the payment. The value is taken from the `description` property of the related checkout resource.", + "example": "Purchase" + }, + "payouts_total": { + "type": "integer", + "description": "Total number of payouts to the registered user specified in the `user` property.", + "example": 1 + }, + "payouts_received": { + "type": "integer", + "description": "Number of payouts that are made to the registered user specified in the `user` property.", + "example": 1 + }, + "payout_plan": { + "type": "string", + "description": "Payout plan of the registered user at the time when the transaction was made.", + "enum": [ + "SINGLE_PAYMENT", + "TRUE_INSTALLMENT", + "ACCELERATED_INSTALLMENT" + ], + "example": "SINGLE_PAYMENT" + } + } + }, + "TransactionHistory": { + "title": "Transaction History", + "description": "Transaction entry returned in history listing responses.", + "allOf": [ + { + "$ref": "#/components/schemas/TransactionBase" + }, + { + "$ref": "#/components/schemas/TransactionMixinHistory" + }, + { + "type": "object", + "properties": { + "transaction_id": { + "$ref": "#/components/schemas/TransactionID" + }, + "client_transaction_id": { + "type": "string", + "description": "Client-supplied identifier of the transaction.", + "example": "urn:sumup:pos:sale:MNKKNGST:1D4E3B2D-111D-48D7-9AF0-832DAEF63DD7;2" + }, + "user": { + "type": "string", + "format": "email", + "description": "Email address of the registered user (merchant) to whom the payment is made.", + "example": "merchant@example.com" + }, + "type": { + "type": "string", + "description": "Type of the transaction for the registered user specified in the `user` property.", + "enum": [ + "PAYMENT", + "REFUND", + "CHARGE_BACK" + ], + "example": "PAYMENT" + }, + "card_type": { + "$ref": "#/components/schemas/CardType" + }, + "payout_date": { + "type": "string", + "format": "date", + "description": "Payout date (if paid out at once).", + "example": "2019-08-28" + }, + "payout_type": { + "type": "string", + "description": "Payout type.", + "enum": [ + "BANK_ACCOUNT", + "PREPAID_CARD" + ], + "example": "BANK_ACCOUNT" + }, + "refunded_amount": { + "type": "number", + "format": "decimal", + "description": "Total amount refunded for this transaction, in major units of the transaction's currency.", + "example": 0 + } + } + } + ] + }, + "PaymentType": { + "title": "Payment Type", + "type": "string", + "description": "Payment category recorded on a transaction, for example `POS` for a point-of-sale card payment, `ECOM` for an online card payment, or `RECURRING` for a recurring card payment. These reporting values are separate from the lowercase `payment_type` values used to process checkouts.", + "enum": [ + "CASH", + "POS", + "ECOM", + "RECURRING", + "BITCOIN", + "BALANCE", + "MOTO", + "BOLETO", + "DIRECT_DEBIT", + "APM", + "UNKNOWN" + ], + "example": "ECOM" + }, + "EntryMode": { + "title": "Entry Mode", + "type": "string", + "description": "How the payment details were captured, for example `CHIP` or `CONTACTLESS` for card-present payments and `CUSTOMER_ENTRY` for card details entered by the payer. For wallet and alternative payment methods, this can identify the method, such as `APPLE_PAY` or `BLIK`.", + "enum": [ + "BOLETO", + "SOFORT", + "IDEAL", + "BANCONTACT", + "EPS", + "MYBANK", + "SATISPAY", + "BLIK", + "P24", + "GIROPAY", + "PIX", + "QR_CODE_PIX", + "APPLE_PAY", + "GOOGLE_PAY", + "PAYPAL", + "TWINT", + "NONE", + "CHIP", + "MANUAL_ENTRY", + "CUSTOMER_ENTRY", + "MAGSTRIPE_FALLBACK", + "MAGSTRIPE", + "DIRECT_DEBIT", + "CONTACTLESS", + "MOTO", + "CONTACTLESS_MAGSTRIPE", + "N/A" + ], + "example": "CUSTOMER_ENTRY" + }, + "CardType": { + "title": "Card Type", + "type": "string", + "description": "Issuing card network of the payment card used for the transaction.", + "enum": [ + "ALELO", + "AMEX", + "BANCOMAT", + "CONECS", + "CUP", + "DINERS", + "DISCOVER", + "EFTPOS", + "ELO", + "ELV", + "GIROCARD", + "HIPERCARD", + "INTERAC", + "JCB", + "MAESTRO", + "MASTERCARD", + "PLUXEE", + "SUMUP", + "SWILE", + "TICKET", + "VISA", + "VISA_ELECTRON", + "VISA_VPAY", + "VPAY", + "VR", + "UNKNOWN" + ], + "example": "VISA" + }, + "TransactionFull": { + "title": "Transaction Full", + "description": "Full transaction resource with checkout, payout, and event details.", + "allOf": [ + { + "$ref": "#/components/schemas/TransactionBase" + }, + { + "$ref": "#/components/schemas/TransactionCheckoutInfo" + }, + { + "$ref": "#/components/schemas/TransactionMixinHistory" + }, + { + "type": "object", + "properties": { + "foreign_transaction_id": { + "type": "string", + "description": "External transaction identifier supplied by the client.", + "example": "J13253253x1" + }, + "client_transaction_id": { + "type": "string", + "description": "Client-supplied identifier of the transaction.", + "example": "urn:sumup:pos:sale:MNKKNGST:1D4E3B2D-111D-48D7-9AF0-832DAEF63DD7;2" + }, + "username": { + "type": "string", + "format": "email", + "description": "Email address of the registered user (merchant) to whom the payment is made.", + "example": "merchant@example.com" + }, + "fee_amount": { + "type": "number", + "format": "decimal", + "description": "Total SumUp transaction fee in major units of the transaction's currency.", + "example": 8 + }, + "lat": { + "$ref": "#/components/schemas/Lat" + }, + "lon": { + "$ref": "#/components/schemas/Lon" + }, + "horizontal_accuracy": { + "$ref": "#/components/schemas/HorizontalAccuracy" + }, + "merchant_id": { + "type": "integer", + "format": "int64", + "description": "Internal SumUp identifier of the merchant.", + "example": 136902 + }, + "device_info": { + "$ref": "#/components/schemas/Device" + }, + "simple_payment_type": { + "type": "string", + "description": "Simple name of the payment type.", + "enum": [ + "CASH", + "CC_SIGNATURE", + "ELV", + "ELV_WITHOUT_SIGNATURE", + "CC_CUSTOMER_ENTERED", + "MANUAL_ENTRY", + "EMV", + "RECURRING", + "BALANCE", + "MOTO", + "BOLETO", + "APM", + "BITCOIN", + "CARD" + ], + "example": "CARD" + }, + "verification_method": { + "type": "string", + "description": "Verification method used for the transaction.", + "enum": [ + "none", + "signature", + "offline PIN", + "online PIN", + "offline PIN + signature", + "na" + ], + "example": "none" + }, + "card": { + "$ref": "#/components/schemas/CardResponse" + }, + "elv_account": { + "$ref": "#/components/schemas/ElvCardAccount" + }, + "local_time": { + "type": "string", + "format": "date-time", + "description": "Local timestamp of when the transaction was created.", + "example": "2020-02-29T11:56:56+01:00" + }, + "payout_date": { + "type": "string", + "format": "date", + "description": "The date of the payout.", + "example": "2019-08-28" + }, + "payout_type": { + "type": "string", + "description": "Payout type for the transaction.", + "enum": [ + "BANK_ACCOUNT", + "PREPAID_CARD" + ], + "example": "BANK_ACCOUNT" + }, + "process_as": { + "type": "string", + "description": "Whether the transaction was processed as credit or debit.", + "enum": [ + "CREDIT", + "DEBIT" + ], + "example": "CREDIT" + }, + "products": { + "type": "array", + "description": "List of products from the merchant's catalogue for which the transaction serves as a payment.", + "items": { + "$ref": "#/components/schemas/Product" + } + }, + "vat_rates": { + "type": "array", + "description": "List of VAT rates applicable to the transaction.", + "items": { + "type": "object", + "properties": { + "rate": { + "type": "number", + "format": "decimal", + "description": "VAT rate.", + "example": 0.045 + }, + "net": { + "type": "number", + "format": "decimal", + "description": "NET amount of products having this VAT rate applied.", + "example": 1.36 + }, + "vat": { + "type": "number", + "format": "decimal", + "description": "VAT amount of this rate applied.", + "example": 0.06 + }, + "gross": { + "type": "number", + "format": "decimal", + "description": "Gross amount of products having this VAT rate applied.", + "example": 1.42 + } + } + } + }, + "transaction_events": { + "type": "array", + "description": "Detailed list of events related to the transaction.", + "items": { + "$ref": "#/components/schemas/TransactionEvent" + } + }, + "simple_status": { + "type": "string", + "description": "High-level status of the transaction from the merchant's perspective.\n\n- `PENDING`: The payment has been initiated and is still being processed. A final outcome is not available yet.\n- `SUCCESSFUL`: The payment was completed successfully.\n- `PAID_OUT`: The payment was completed successfully and the funds have already been included in a payout to the merchant.\n- `FAILED`: The payment did not complete successfully.\n- `CANCELLED`: The payment was cancelled or reversed and is no longer payable or payable to the merchant.\n- `CANCEL_FAILED`: An attempt to cancel or reverse the payment was not completed successfully.\n- `REFUNDED`: The payment was refunded in full or in part.\n- `REFUND_FAILED`: An attempt to refund the payment was not completed successfully.\n- `CHARGEBACK`: The payment was subject to a chargeback.\n- `NON_COLLECTION`: The amount could not be collected from the merchant after a chargeback or related adjustment.", + "enum": [ + "SUCCESSFUL", + "PAID_OUT", + "CANCEL_FAILED", + "CANCELLED", + "CHARGEBACK", + "FAILED", + "REFUND_FAILED", + "REFUNDED", + "NON_COLLECTION", + "PENDING" + ], + "example": "SUCCESSFUL" + }, + "links": { + "type": "array", + "description": "List of hyperlinks for accessing related resources.", + "items": { + "$ref": "#/components/schemas/Link" + } + }, + "events": { + "type": "array", + "description": "Compact list of events related to the transaction.", + "items": { + "$ref": "#/components/schemas/Event" + } + }, + "location": { + "type": "object", + "description": "Details of the payment location as received from the payment terminal.", + "properties": { + "lat": { + "$ref": "#/components/schemas/Lat" + }, + "lon": { + "$ref": "#/components/schemas/Lon" + }, + "horizontal_accuracy": { + "$ref": "#/components/schemas/HorizontalAccuracy" + } + } + }, + "tax_enabled": { + "type": "boolean", + "description": "Indicates whether tax deduction is enabled for the transaction.", + "example": true + } + } + } + ] + }, + "Currency": { + "title": "Currency", + "type": "string", + "description": "Three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code of the amount.", + "enum": [ + "BRL", + "CHF", + "CLP", + "COP", + "CZK", + "DKK", + "EUR", + "GBP", + "HRK", + "HUF", + "NOK", + "PLN", + "RON", + "SEK", + "USD" + ], + "example": "EUR" + }, + "TransactionStatus": { + "title": "Transaction Status", + "type": "string", + "description": "Current status of the transaction.\n\n- `PENDING`: The transaction has been created but its final outcome is not known yet.\n- `SUCCESSFUL`: The transaction completed successfully.\n- `CANCELLED`: The transaction was cancelled or otherwise reversed before completion.\n- `FAILED`: The transaction attempt did not complete successfully.\n- `REFUNDED`: The transaction was refunded in full or in part.", + "enum": [ + "SUCCESSFUL", + "CANCELLED", + "FAILED", + "PENDING", + "REFUNDED" + ], + "example": "SUCCESSFUL" + }, + "TransactionEventType": { + "title": "Transaction Event Type", + "type": "string", + "description": "Financial event associated with a transaction.\n\n- `PAYOUT`: Funds from the transaction being prepared for or included in a merchant payout. Check the event status to determine whether they have been paid out.\n- `REFUND`: Money returned to the payer.\n- `CHARGE_BACK`: A reversal of the payment following a chargeback.\n- `PAYOUT_DEDUCTION`: An amount deducted from a merchant payout, for example to cover a refund or chargeback.", + "enum": [ + "PAYOUT", + "CHARGE_BACK", + "REFUND", + "PAYOUT_DEDUCTION" + ], + "example": "REFUND" + }, + "TransactionEventStatus": { + "title": "Transaction Event Status", + "type": "string", + "description": "Status of the transaction event.\n\nNot every value is used for every event type.\n\n- `PENDING`: The event has been created but is not final yet. Used for events that are still being processed and whose final outcome is not known yet.\n- `SCHEDULED`: The event is planned for a future payout cycle but has not been executed yet. This applies to payout events before money is actually sent out.\n- `RECONCILED`: The underlying payment has been matched with settlement data and is ready to continue through payout processing, but the funds have not been paid out yet. This applies to payout events.\n- `PAID_OUT`: The payout event has been completed and the funds were included in a merchant payout.\n- `REFUNDED`: A refund event has been accepted and recorded in the refund flow. This is the status returned for refund events once the transaction amount is being or has been returned to the payer.\n- `SUCCESSFUL`: The event completed successfully. Use this as the generic terminal success status for event types that do not expose a more specific business outcome such as `PAID_OUT` or `REFUNDED`.\n- `FAILED`: The event could not be completed. Typical examples are a payout that could not be executed or an event that was rejected during processing.", + "enum": [ + "FAILED", + "PAID_OUT", + "PENDING", + "RECONCILED", + "REFUNDED", + "SCHEDULED", + "SUCCESSFUL" + ], + "example": "SUCCESSFUL" + }, + "TransactionEventID": { + "title": "Transaction Event ID", + "type": "integer", + "format": "int64", + "description": "Numeric identifier of a transaction event. Use it as `tx_event_id` when requesting receipt details for a specific event. This is separate from the transaction ID and the transaction history pagination references.", + "example": 9567461191 + }, + "HorizontalAccuracy": { + "title": "Horizontal Accuracy", + "type": "number", + "format": "float", + "description": "Indication of the precision of the geographical position received from the payment terminal.", + "example": 5 + }, + "Lat": { + "title": "Latitude", + "type": "number", + "format": "float", + "description": "Latitude value from the coordinates of the payment location (as received from the payment terminal reader).", + "minimum": -90, + "maximum": 90, + "example": 52.520008 + }, + "Lon": { + "title": "Longitude", + "type": "number", + "format": "float", + "description": "Longitude value from the coordinates of the payment location (as received from the payment terminal reader).", + "minimum": -180, + "maximum": 180, + "example": 13.404954 + }, + "TransactionID": { + "title": "Transaction ID", + "type": "string", + "description": "Unique identifier of the transaction.", + "example": "410fc44a-5956-44e1-b5cc-19c6f8d727a4" + }, + "Affiliate": { + "properties": { + "app_id": { + "example": "com.example.app", + "type": "string" + }, + "key": { + "example": "123e4567-e89b-12d3-a456-426614174000", + "type": "string" } - } + }, + "required": [ + "app_id", + "key" + ], + "type": "object" }, - "Product": { - "title": "Product", - "type": "object", - "description": "Product details associated with a transaction.", + "Amount": { "properties": { - "name": { - "type": "string", - "description": "Product name.", - "example": "Purchase reader for merchant with code ME3FCAVF" - }, - "price_label": { - "type": "string", - "description": "Human-readable label for the product price.", - "example": "EUR 100.00" - }, - "price": { - "type": "number", - "format": "decimal", - "description": "Product price.", - "example": 100 - }, - "vat_rate": { - "type": "number", - "format": "decimal", - "description": "VAT rate as a decimal fraction, for example `0.19` for 19%.", - "example": 0.19 - }, - "single_vat_amount": { - "type": "number", - "format": "decimal", - "description": "VAT amount for a single product.", - "example": 19 - }, - "price_with_vat": { - "type": "number", - "format": "decimal", - "description": "Product price including VAT.", - "example": 119 - }, - "vat_amount": { - "type": "number", - "format": "decimal", - "description": "Total VAT amount for the product quantity.", - "example": 19 - }, - "quantity": { - "type": "integer", - "description": "Product quantity.", - "example": 1 - }, - "total_price": { - "type": "number", - "format": "decimal", - "description": "Total price calculated as the product price multiplied by the quantity.", - "example": 100 + "currency": { + "description": "Currency ISO 4217 code", + "example": "MXN", + "type": "string" }, - "total_with_vat": { - "type": "number", - "format": "decimal", - "description": "Total product price including VAT.", - "example": 119 + "value": { + "description": "Amount in minor units (e.g. cents).", + "example": 1000, + "type": "integer" } - } + }, + "required": [ + "currency", + "value" + ], + "type": "object" }, - "Receipt": { - "type": "object", - "title": "Receipt", - "description": "Structured receipt details for a transaction. The transaction's `amount`, `vat_amount`, and `tip_amount`, as well as event amounts, are returned as decimal strings in major currency units, for example `\"10.10\"` for EUR 10.10.", + "ReaderID": { + "type": "string", + "description": "Unique identifier of the reader that the payment is initiated on.", + "example": "rdr_3MSAFM23CK82VSTT4BN6RWSQ65", + "minLength": 30, + "maxLength": 30 + }, + "ReaderPaymentRequestParams": { "properties": { - "transaction_data": { - "$ref": "#/components/schemas/ReceiptTransaction" + "affiliate": { + "allOf": [ + { + "description": "Optional caller-supplied context about the integration initiating the payment.", + "type": "object" + }, + { + "$ref": "#/components/schemas/Affiliate" + } + ] }, - "merchant_data": { - "$ref": "#/components/schemas/ReceiptMerchantData" + "client_transaction_id": { + "description": "Caller-supplied correlation identifier, used as the idempotency key.", + "example": "19e12390-72cf-4f9f-80b5-b0c8a67fa43f", + "type": "string" }, - "emv_data": { - "type": "object", - "description": "EMV-specific metadata returned for card-present payments.", - "example": {} + "tip_amount": { + "description": "Portion of total_amount that is a tip, in minor units.", + "example": 200, + "type": "integer" }, - "acquirer_data": { - "type": "object", - "description": "Acquirer-specific metadata related to the card authorization.", - "example": { - "authorization_code": "053201", - "return_code": "00" - }, - "properties": { - "tid": { - "type": "string", - "description": "Identifier of the terminal used for the authorization.", - "example": "12345678" - }, - "authorization_code": { - "type": "string", - "description": "Authorization code returned by the acquirer.", - "example": "053201" - }, - "return_code": { - "type": "string", - "description": "Return code reported by the acquirer.", - "example": "00" + "total_amount": { + "allOf": [ + { + "description": "Amount charged on the reader, including any tip. The amount is represented as an integer value altogether with the currency and the minor unit. For example, MXN 10.00 is represented as value 1000 with minor unit of 2.", + "example": { + "currency": "MXN", + "value": 1000 + } }, - "local_time": { - "type": "string", - "description": "Local timestamp of the card authorization.", - "example": "2020-02-29T11:56:56+01:00" + { + "$ref": "#/components/schemas/Amount" } - } + ] } - } + }, + "required": [ + "total_amount", + "client_transaction_id" + ], + "type": "object" }, - "ReceiptEvent": { - "title": "Receipt Event", - "description": "Transaction event details as rendered on the receipt.", + "ReaderPaymentResponse": { + "properties": { + "data": { + "$ref": "#/components/schemas/ReaderPaymentResponseData" + } + }, + "type": "object" + }, + "ReaderPaymentResponseData": { + "properties": { + "client_transaction_id": { + "description": "Caller-supplied correlation identifier that was provided in the request.", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "type": "string" + }, + "transaction_code": { + "description": "Transaction code returned by the acquirer/processing entity after processing the transaction.", + "example": "TEENSK4W2K", + "type": "string" + } + }, + "type": "object" + }, + "MembershipStatus": { + "type": "string", + "description": "The status of the membership.", + "enum": [ + "accepted", + "pending", + "expired", + "disabled", + "unknown" + ] + }, + "ResourceType": { + "type": "string", + "description": "The type of the membership resource.\nPossible values are:\n* `merchant` - merchant account(s)\n* `organization` - organization(s)", + "example": "merchant" + }, + "Membership": { + "title": "Membership", "type": "object", + "description": "A membership associates a user with a resource, memberships is defined by user, resource, resource type, and associated roles.", + "required": [ + "id", + "resource_id", + "type", + "roles", + "permissions", + "created_at", + "updated_at", + "status", + "resource" + ], "properties": { "id": { - "$ref": "#/components/schemas/TransactionEventID" + "type": "string", + "description": "ID of the membership.", + "example": "mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP" }, - "transaction_id": { - "$ref": "#/components/schemas/TransactionID" + "resource_id": { + "type": "string", + "description": "ID of the resource the membership is in.", + "example": "M2DDT39A" }, "type": { - "$ref": "#/components/schemas/TransactionEventType" + "$ref": "#/components/schemas/ResourceType" + }, + "roles": { + "type": "array", + "description": "User's roles.", + "example": [ + "role_admin" + ], + "items": { + "type": "string" + } }, - "status": { - "$ref": "#/components/schemas/TransactionEventStatus" + "permissions": { + "type": "array", + "description": "User's permissions.", + "deprecated": true, + "x-deprecation-notice": "Permissions include only legacy permissions, please use roles instead. Member access is based on their roles within a given resource and the permissions these roles grant.", + "items": { + "type": "string" + }, + "example": [ + "members_read", + "members_write", + "create_moto_payments", + "full_transaction_history_view", + "refund_transactions", + "create_referral", + "developer_settings_edit", + "developer_settings_access" + ] }, - "amount": { + "created_at": { "type": "string", - "format": "double", - "description": "Amount associated with the transaction event, in major units.", - "example": "10.10" + "description": "The timestamp of when the membership was created.", + "format": "date-time", + "example": "2023-01-20T15:16:17Z" }, - "timestamp": { + "updated_at": { "type": "string", + "description": "The timestamp of when the membership was last updated.", "format": "date-time", - "description": "The timestamp of when the transaction event occurred.", - "example": "2020-05-25T10:49:42.784Z" + "example": "2023-01-20T15:16:17Z" }, - "receipt_no": { - "type": "string", - "description": "Receipt number associated with the event.", - "example": "123456" - } - } - }, - "ReceiptCard": { - "title": "Receipt Card", - "description": "Payment card details displayed on the receipt.", - "type": "object", - "properties": { - "last_4_digits": { - "type": "string", - "description": "Last four digits of the payment card number.", - "example": "3456" + "invite": { + "$ref": "#/components/schemas/Invite" }, - "type": { - "type": "string", - "description": "Issuing card network of the payment card.", - "example": "VISA" - } - } - }, - "ReceiptReader": { - "title": "Receipt Reader", - "description": "Card reader details displayed on the receipt.", - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "Unique identifier of the physical card reader.", - "example": "U1DT3NA00-CN" + "status": { + "$ref": "#/components/schemas/MembershipStatus" }, - "type": { - "type": "string", - "description": "Model of the physical card reader.", - "example": "solo" - } - } - }, - "ReceiptMerchantData": { - "title": "Receipt Merchant Data", - "type": "object", - "description": "Merchant details displayed on a transaction receipt.", - "properties": { - "merchant_profile": { - "type": "object", - "description": "Merchant profile details displayed on the receipt.", - "properties": { - "merchant_code": { - "type": "string", - "description": "Short unique identifier for the merchant.", - "example": "MH4H92C7" - }, - "business_name": { - "type": "string", - "description": "Business name of the merchant.", - "example": "Coffee House" - }, - "company_registration_number": { - "type": "string", - "description": "Company registration number of the merchant.", - "example": "HRB 123456" - }, - "vat_id": { - "type": "string", - "description": "VAT identification number of the merchant.", - "example": "DE123456789" - }, - "website": { - "type": "string", - "description": "Website of the merchant.", - "example": "https://example.com" - }, - "email": { - "type": "string", - "description": "Email address of the merchant.", - "example": "merchant@example.com" - }, - "language": { - "type": "string", - "description": "Language configured for the merchant profile.", - "example": "de" - }, - "address": { - "type": "object", - "description": "Business address of the merchant.", - "properties": { - "address_line1": { - "type": "string", - "description": "First line of the merchant address.", - "example": "Sample street 1" - }, - "address_line2": { - "type": "string", - "description": "Second line of the merchant address.", - "example": "Floor 2" - }, - "city": { - "type": "string", - "description": "City of the merchant address.", - "example": "Berlin" - }, - "country": { - "type": "string", - "description": "Two-letter ISO 3166-1 alpha-2 country code of the merchant address.", - "example": "DE" - }, - "country_en_name": { - "type": "string", - "description": "English name of the country in the merchant address.", - "example": "Germany" - }, - "country_native_name": { - "type": "string", - "description": "Localized name of the country in the merchant address.", - "example": "Deutschland" - }, - "region_name": { - "type": "string", - "description": "Region or state of the merchant address.", - "example": "Berlin" - }, - "post_code": { - "type": "string", - "description": "Postal code of the merchant address.", - "example": "10115" - }, - "landline": { - "type": "string", - "description": "Landline phone number of the merchant.", - "example": "+493012345678" - } - } - } - } + "metadata": { + "$ref": "#/components/schemas/Metadata" }, - "locale": { - "type": "string", - "description": "Locale used for rendering localized receipt fields.", - "example": "de-DE" + "attributes": { + "$ref": "#/components/schemas/Attributes" + }, + "resource": { + "$ref": "#/components/schemas/MembershipResource" } } }, - "ReceiptTransaction": { - "title": "Receipt Transaction", + "MembershipResource": { + "title": "Resource", "type": "object", - "description": "Transaction details displayed on a receipt.", - "example": { - "transaction_code": "TEENSK4W2K", - "transaction_id": "410fc44a-5956-44e1-b5cc-19c6f8d727a4", - "merchant_code": "MH4H92C7", - "amount": "10.10", - "vat_amount": "6.00", - "tip_amount": "3.00", - "currency": "EUR", - "timestamp": "2020-02-29T10:56:56.876Z", - "status": "SUCCESSFUL", - "payment_type": "ECOM", - "entry_mode": "CUSTOMER_ENTRY", - "installments_count": 1, - "process_as": "CREDIT" - }, + "description": "Information about the resource the membership is in.", + "required": [ + "id", + "type", + "name", + "created_at", + "updated_at" + ], "properties": { - "transaction_code": { - "type": "string", - "description": "Transaction code returned after processing the transaction.", - "example": "TEENSK4W2K" - }, - "transaction_id": { - "$ref": "#/components/schemas/TransactionID" - }, - "merchant_code": { + "id": { "type": "string", - "description": "Short unique identifier for the merchant.", - "example": "MH4H92C7" + "description": "ID of the resource the membership is in.", + "example": "M2DDT39A" }, - "amount": { - "type": "string", - "description": "Total transaction amount, in major units.", - "example": "10.10" + "type": { + "$ref": "#/components/schemas/ResourceType" }, - "vat_amount": { + "name": { "type": "string", - "description": "VAT included in the transaction amount, in major units.", - "example": "6.00" + "description": "Display name of the resource.", + "example": "Acme Corp" }, - "tip_amount": { + "logo": { "type": "string", - "description": "Tip included in the transaction amount, in major units.", - "example": "3.00" + "description": "Logo fo the resource.", + "format": "uri", + "maxLength": 256, + "example": "https://images.sumup.com/img_2x4y6z8a0b1c2d3e4f5g6h7j8k.png" }, - "currency": { + "created_at": { "type": "string", - "description": "Three-letter ISO 4217 currency code of the transaction.", - "example": "EUR" + "description": "The timestamp of when the membership resource was created.", + "format": "date-time", + "example": "2023-01-20T15:16:17Z" }, - "timestamp": { + "updated_at": { "type": "string", + "description": "The timestamp of when the membership resource was last updated.", "format": "date-time", - "description": "The timestamp of when the transaction was created.", - "example": "2020-02-29T10:56:56.876Z" + "example": "2023-01-20T15:16:17Z" }, - "status": { + "attributes": { + "$ref": "#/components/schemas/Attributes" + } + } + }, + "Member": { + "title": "Member", + "type": "object", + "description": "A member is user within specific resource identified by resource id, resource type, and associated roles.", + "required": [ + "id", + "roles", + "permissions", + "created_at", + "updated_at", + "status" + ], + "properties": { + "id": { "type": "string", - "description": "Current processing status of the transaction.", - "example": "SUCCESSFUL" + "description": "ID of the member.", + "example": "mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP" }, - "payment_type": { - "type": "string", - "description": "Payment type used for the transaction.", - "example": "ECOM" + "roles": { + "type": "array", + "description": "User's roles.", + "example": [ + "role_admin" + ], + "items": { + "type": "string" + } }, - "entry_mode": { - "type": "string", - "description": "Entry mode of the payment details.", - "example": "CUSTOMER_ENTRY" + "permissions": { + "type": "array", + "description": "User's permissions.", + "deprecated": true, + "x-deprecation-notice": "Permissions include only legacy permissions, please use roles instead. Member access is based on roles within a given resource and the permissions these roles grant.", + "items": { + "type": "string" + }, + "example": [ + "members_read", + "members_write", + "create_moto_payments", + "full_transaction_history_view", + "refund_transactions", + "create_referral", + "developer_settings_edit", + "developer_settings_access" + ] }, - "verification_method": { + "created_at": { "type": "string", - "description": "Cardholder verification method.", - "example": "none" + "description": "The timestamp of when the member was created.", + "format": "date-time", + "example": "2023-01-20T15:16:17Z" }, - "card_reader": { - "$ref": "#/components/schemas/ReceiptReader" + "updated_at": { + "type": "string", + "description": "The timestamp of when the member was last updated.", + "format": "date-time", + "example": "2023-01-20T15:16:17Z" }, - "card": { - "$ref": "#/components/schemas/ReceiptCard" + "user": { + "$ref": "#/components/schemas/MembershipUser" }, - "installments_count": { - "type": "integer", - "description": "Number of installments.", - "example": 1 + "invite": { + "$ref": "#/components/schemas/Invite" }, - "process_as": { - "type": "string", - "description": "Whether the transaction was processed as credit or debit.", - "enum": [ - "CREDIT", - "DEBIT" - ], - "example": "CREDIT" + "status": { + "$ref": "#/components/schemas/MembershipStatus" }, - "products": { - "type": "array", - "description": "Products associated with the transaction.", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Product name.", - "example": "Coffee" - }, - "description": { - "type": "string", - "description": "Product description.", - "example": "Cappuccino" - }, - "price": { - "type": "string", - "format": "double", - "description": "Product price.", - "example": "150.0" - }, - "vat_rate": { - "type": "string", - "format": "double", - "description": "VAT rate.", - "example": "0.0" - }, - "single_vat_amount": { - "type": "string", - "format": "double", - "description": "VAT amount for a single product.", - "example": "0.0" - }, - "price_with_vat": { - "type": "string", - "format": "double", - "description": "Product price including VAT.", - "example": "150.0" - }, - "vat_amount": { - "type": "string", - "format": "double", - "description": "Total VAT amount for the product quantity.", - "example": "0.0" - }, - "quantity": { - "type": "integer", - "format": "int64", - "description": "Product quantity.", - "example": 1 - }, - "total_price": { - "type": "string", - "format": "double", - "description": "Total price calculated as the product price multiplied by the quantity.", - "example": "150.0" - }, - "total_with_vat": { - "type": "string", - "format": "double", - "description": "Total product price including VAT.", - "example": "150.0" - } - } - } + "metadata": { + "$ref": "#/components/schemas/Metadata" }, - "vat_rates": { - "type": "array", - "description": "VAT breakdown for the transaction.", - "items": { - "type": "object", - "properties": { - "gross": { - "type": "number", - "format": "float", - "description": "Gross amount to which the VAT rate applies.", - "example": 10.1 - }, - "net": { - "type": "number", - "format": "float", - "description": "Net amount to which the VAT rate applies.", - "example": 8.49 - }, - "rate": { - "type": "number", - "format": "float", - "description": "VAT rate applied to the transaction amount.", - "example": 0.19 - }, - "vat": { - "type": "number", - "format": "float", - "description": "VAT amount included in the gross amount.", - "example": 1.61 - } - } - } + "attributes": { + "$ref": "#/components/schemas/Attributes" + } + }, + "example": { + "id": "mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP", + "roles": [ + "role_admin", + "role_owner" + ], + "permissions": [ + "members_read", + "members_write", + "create_moto_payments", + "full_transaction_history_view", + "refund_transactions", + "create_referral", + "developer_settings_edit", + "developer_settings_access" + ], + "created_at": "2023-01-20T15:16:17Z", + "updated_at": "2023-02-20T15:16:17Z", + "user": { + "id": "44ca0f5b-813b-46e1-aee7-e6242010662e", + "email": "example@sumup.com", + "mfa_on_login_enabled": true, + "virtual_user": false, + "service_account_user": false }, - "events": { - "type": "array", - "description": "Transaction events displayed on the receipt.", - "items": { - "$ref": "#/components/schemas/ReceiptEvent" - } + "status": "accepted" + } + }, + "Invite": { + "title": "Invite", + "type": "object", + "description": "Pending invitation for membership.", + "required": [ + "email", + "expires_at" + ], + "properties": { + "email": { + "type": "string", + "description": "Email address of the invited user.", + "format": "email", + "example": "boaty.mcboatface@sumup.com" }, - "receipt_no": { + "expires_at": { "type": "string", - "description": "Receipt number associated with the transaction.", - "example": "123456" + "format": "date-time", + "example": "2023-01-20T15:16:17Z" } } }, - "TransactionEvent": { - "title": "Transaction Event", + "MembershipUser": { "type": "object", - "description": "Detailed information about a transaction event.", + "description": "Information about the user associated with the membership.", + "required": [ + "id", + "type", + "email", + "mfa_on_login_enabled", + "virtual_user", + "service_account_user" + ], "properties": { "id": { - "$ref": "#/components/schemas/TransactionEventID" + "type": "string", + "description": "Identifier for the End-User (also called Subject).", + "example": "44ca0f5b-813b-46e1-aee7-e6242010662e" }, - "event_type": { - "$ref": "#/components/schemas/TransactionEventType" + "type": { + "$ref": "#/components/schemas/UserType" }, - "status": { - "$ref": "#/components/schemas/TransactionEventStatus" + "email": { + "type": "string", + "example": "example@sumup.com", + "description": "End-User's preferred e-mail address. Its value MUST conform to the RFC 5322 [RFC5322] addr-spec syntax. The RP MUST NOT rely upon this value being unique, for unique identification use ID instead." }, - "amount": { - "type": "number", - "format": "decimal", - "description": "Amount of the event in major units of the associated transaction's currency.", - "example": 58.8 + "mfa_on_login_enabled": { + "type": "boolean", + "example": true, + "description": "True if the user has enabled MFA on login." }, - "due_date": { - "type": "string", - "format": "date", - "description": "Date when the transaction event is due to occur.", - "example": "2020-05-25" + "virtual_user": { + "type": "boolean", + "deprecated": true, + "x-deprecation-notice": "Rely on `type` instead.", + "example": false, + "description": "True if the user is a virtual user (operator)." }, - "date": { + "service_account_user": { + "type": "boolean", + "deprecated": true, + "x-deprecation-notice": "Rely on `type` instead.", + "example": false, + "description": "True if the user is a service account." + }, + "disabled_at": { "type": "string", - "format": "date", - "description": "Date when the transaction event occurred.", - "example": "2020-05-25" + "format": "date-time", + "description": "Time when the user has been disabled. Applies only to virtual users (`virtual_user: true`)." }, - "installment_number": { - "type": "integer", - "description": "Consecutive number of the installment that is paid. Applicable only to payout events, i.e. `event_type = PAYOUT`.", - "example": 1 + "nickname": { + "type": "string", + "example": "Test User", + "description": "User's nickname. Used for display purposes only." }, - "timestamp": { + "picture": { "type": "string", - "format": "date-time", - "description": "Date and time of the transaction event.", - "example": "2020-05-25T10:49:42.784Z" + "format": "uri", + "example": "https://usercontent.sumup.com/44ca0f5b-813b-46e1-aee7-e6242010662e.png", + "description": "URL of the End-User's profile picture. This URL refers to an image file (for example, a PNG, JPEG, or GIF image file), rather than to a Web page containing an image." + }, + "classic": { + "$ref": "#/components/schemas/MembershipUserClassic" } } }, - "TransactionBase": { - "title": "Transaction Base", + "MembershipUserClassic": { "type": "object", - "description": "Core details shared by transaction resources.", + "description": "Classic identifiers of the user.", + "deprecated": true, + "required": [ + "user_id" + ], + "properties": { + "user_id": { + "type": "integer", + "minimum": 0, + "maximum": 2147483647 + } + } + }, + "Role": { + "title": "Role", + "type": "object", + "description": "A custom role that can be used to assign set of permissions to members.", + "required": [ + "id", + "name", + "permissions", + "is_predefined", + "created_at", + "updated_at" + ], "properties": { "id": { "type": "string", - "description": "Unique identifier of the transaction.", - "example": "6b425463-3e1b-431d-83fa-1e51c2925e99" + "description": "Unique identifier of the role.", + "example": "role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP" }, - "transaction_code": { + "name": { "type": "string", - "description": "SumUp transaction code, for example `TEENSK4W2K`. Use it to look up the transaction with the `transaction_code` query parameter. This is separate from the transaction's `id` and the card issuer's `auth_code`.", - "example": "TEENSK4W2K" + "example": "Senior Shop Manager II", + "description": "User-defined name of the role." }, - "amount": { - "type": "number", - "format": "float", - "description": "Total amount of the transaction in major units of `currency`, for example `10.1` for EUR 10.10.", - "example": 10.1 + "description": { + "type": "string", + "example": "Manges the shop and the employees.", + "description": "User-defined description of the role." }, - "currency": { - "$ref": "#/components/schemas/Currency" + "permissions": { + "type": "array", + "description": "List of permission granted by this role.", + "maxItems": 100, + "items": { + "type": "string" + }, + "example": [] }, - "timestamp": { - "type": "string", - "example": "2020-02-29T10:56:56.876Z", - "format": "date-time", - "description": "The timestamp of when the transaction was created." + "is_predefined": { + "type": "boolean", + "example": true, + "description": "True if the role is provided by SumUp." }, - "status": { - "$ref": "#/components/schemas/TransactionStatus" + "metadata": { + "$ref": "#/components/schemas/Metadata" }, - "payment_type": { - "$ref": "#/components/schemas/PaymentType" + "created_at": { + "type": "string", + "description": "The timestamp of when the role was created.", + "format": "date-time", + "example": "2023-01-20T15:16:17Z" }, - "installments_count": { - "type": "integer", - "description": "Number of installments for a deferred payment.", - "minimum": 1, - "example": 1 + "updated_at": { + "type": "string", + "description": "The timestamp of when the role was last updated.", + "format": "date-time", + "example": "2023-01-20T15:16:17Z" } } }, - "TransactionCheckoutInfo": { - "title": "Transaction Checkout Info", - "description": "Checkout-specific fields associated with a transaction.", + "Metadata": { + "description": "Set of user-defined key-value pairs attached to the object. Partial updates are not supported. When updating, always submit whole metadata. Maximum of 64 parameters are allowed in the object.", + "type": "object", + "maxProperties": 64, + "example": {}, + "additionalProperties": true + }, + "Attributes": { + "description": "Object attributes that are modifiable only by SumUp applications.\n", + "type": "object", + "example": {}, + "additionalProperties": true + }, + "UserType": { + "type": "string", + "description": "Type of the user account.", + "enum": [ + "user", + "managed_user", + "service_account", + "system_account" + ], + "example": "user" + }, + "Address": { + "externalDocs": { + "description": "Address documentation", + "url": "https://developer.sumup.com/tools/glossary/address" + }, + "description": "An address somewhere in the world. The address fields used depend on the country conventions. For example, in Great Britain, `city` is `post_town`. In the United States, the top-level administrative unit used in addresses is `state`, whereas in Chile it's `region`.\nWhether an address is valid or not depends on whether the locally required fields are present. Fields not supported in a country will be ignored.", "type": "object", + "required": [ + "country" + ], "properties": { - "merchant_code": { + "street_address": { + "type": "array", + "maxItems": 2, + "items": { + "type": "string", + "description": "The first line of the address.", + "maxLength": 100 + }, + "example": [ + "Paul-Linke-Ufer 39-40", + "2. Hinterhof" + ] + }, + "post_code": { + "type": "string", + "description": "The postal code (aka. zip code) of the address.\n", + "maxLength": 10, + "example": "10999" + }, + "country": { + "allOf": [ + { + "description": "The ISO3166-1 Alpha-2 code of the address country.\n", + "example": "DE" + }, + { + "$ref": "#/components/schemas/CountryCode" + } + ] + }, + "city": { + "type": "string", + "description": "The city of the address.\n", + "maxLength": 60, + "example": "Berlin" + }, + "province": { + "type": "string", + "description": "The province where the address is located. This may not be relevant in some countries.\n", + "maxLength": 60, + "example": "Berlin" + }, + "region": { + "type": "string", + "description": "The region where the address is located. This may not be relevant in some countries.\n", + "maxLength": 60, + "example": "Baden Wuerttemberg" + }, + "county": { + "type": "string", + "description": "A county is a geographic region of a country used for administrative or other purposes in some nations. Used in countries such as Ireland, Romania, etc.\n", + "maxLength": 60, + "example": "Dublin County" + }, + "autonomous_community": { "type": "string", - "description": "Unique code of the registered merchant to whom the payment is made.", - "example": "MH4H92C7" + "description": "In Spain, an autonomous community is the first sub-national level of political and administrative division.\n", + "maxLength": 60, + "example": "Catalonia" }, - "vat_amount": { - "type": "number", - "format": "float", - "description": "VAT included in the total transaction amount, in major units of the transaction's currency.", - "example": 6 + "post_town": { + "type": "string", + "description": "A post town is a required part of all postal addresses in the United Kingdom and Ireland, and a basic unit of the postal delivery system.\n", + "maxLength": 60, + "example": "London" }, - "tip_amount": { - "type": "number", - "format": "float", - "description": "Tip included in the total transaction amount, in major units of the transaction's currency.", - "example": 3 + "state": { + "type": "string", + "description": "Most often, a country has a single state, with various administrative divisions. The term \"state\" is sometimes used to refer to the federated polities that make up the federation. Used in countries such as the United States and Brazil.\n", + "maxLength": 60, + "example": "California" }, - "entry_mode": { - "$ref": "#/components/schemas/EntryMode" + "neighborhood": { + "type": "string", + "description": "Locality level of the address. Used in countries such as Brazil or Chile.\n", + "maxLength": 60, + "example": "Copacabana" }, - "auth_code": { + "commune": { "type": "string", - "description": "Authorization code for the transaction sent by the payment card issuer or bank. Applicable only to card payments.", - "example": "053201" - } - } - }, - "TransactionMixinHistory": { - "title": "Transaction Mixin History", - "description": "Additional transaction fields used by history and detailed views.", - "type": "object", - "properties": { - "product_summary": { + "description": "In many countries, terms cognate with \"commune\" are used, referring to the community living in the area and the common interest. Used in countries such as Chile.\n", + "maxLength": 60, + "example": "Providencia" + }, + "department": { "type": "string", - "description": "Short description of the payment. The value is taken from the `description` property of the related checkout resource.", - "example": "Purchase" + "description": "A department (French: département, Spanish: departamento) is an administrative or political division in several countries. Used in countries such as Colombia.\n", + "maxLength": 60, + "example": "Antioquia" }, - "payouts_total": { - "type": "integer", - "description": "Total number of payouts to the registered user specified in the `user` property.", - "example": 1 + "municipality": { + "type": "string", + "description": "A municipality is usually a single administrative division having corporate status and powers of self-government or jurisdiction as granted by national and regional laws to which it is subordinate. Used in countries such as Colombia.\n", + "maxLength": 60, + "example": "Medellín" }, - "payouts_received": { - "type": "integer", - "description": "Number of payouts that are made to the registered user specified in the `user` property.", - "example": 1 + "district": { + "type": "string", + "description": "A district is a type of administrative division that in some countries is managed by the local government. Used in countries such as Portugal.\n", + "maxLength": 60, + "example": "Lisbon District" }, - "payout_plan": { + "zip_code": { "type": "string", - "description": "Payout plan of the registered user at the time when the transaction was made.", - "enum": [ - "SINGLE_PAYMENT", - "TRUE_INSTALLMENT", - "ACCELERATED_INSTALLMENT" - ], - "example": "SINGLE_PAYMENT" + "description": "A US system of postal codes used by the United States Postal Service (USPS).\n", + "maxLength": 10, + "example": "94103" + }, + "eircode": { + "type": "string", + "description": "A postal address in Ireland.\n", + "maxLength": 10, + "example": "D02 X285" } + }, + "example": { + "street_address": [ + "Paul-Linke-Ufer 39-40", + "2. Hinterhof" + ], + "post_code": "10999", + "city": "Berlin", + "country": "DE" } }, - "TransactionHistory": { - "title": "Transaction History", - "description": "Transaction entry returned in history listing responses.", - "allOf": [ - { - "$ref": "#/components/schemas/TransactionBase" - }, - { - "$ref": "#/components/schemas/TransactionMixinHistory" - }, + "CountryCode": { + "description": "An [ISO3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)\ncountry code. This definition users `oneOf` with a two-character string\ntype to allow for support of future countries in client code.", + "type": "string", + "minLength": 2, + "maxLength": 2, + "pattern": "^[A-Z]{2}$", + "example": "BR" + }, + "PersonalIdentifiers": { + "type": "array", + "description": "A list of country-specific personal identifiers.", + "items": { + "$ref": "#/components/schemas/PersonalIdentifier" + }, + "maxItems": 32, + "example": [ { - "type": "object", - "properties": { - "transaction_id": { - "$ref": "#/components/schemas/TransactionID" - }, - "client_transaction_id": { - "type": "string", - "description": "Client-supplied identifier of the transaction.", - "example": "urn:sumup:pos:sale:MNKKNGST:1D4E3B2D-111D-48D7-9AF0-832DAEF63DD7;2" - }, - "user": { - "type": "string", - "format": "email", - "description": "Email address of the registered user (merchant) to whom the payment is made.", - "example": "merchant@example.com" - }, - "type": { - "type": "string", - "description": "Type of the transaction for the registered user specified in the `user` property.", - "enum": [ - "PAYMENT", - "REFUND", - "CHARGE_BACK" - ], - "example": "PAYMENT" - }, - "card_type": { - "$ref": "#/components/schemas/CardType" - }, - "payout_date": { - "type": "string", - "format": "date", - "description": "Payout date (if paid out at once).", - "example": "2019-08-28" - }, - "payout_type": { - "type": "string", - "description": "Payout type.", - "enum": [ - "BANK_ACCOUNT", - "PREPAID_CARD" - ], - "example": "BANK_ACCOUNT" - }, - "refunded_amount": { - "type": "number", - "format": "decimal", - "description": "Total amount refunded for this transaction, in major units of the transaction's currency.", - "example": 0 - } - } + "ref": "br.cpf", + "value": "847.060.136-90" } ] }, - "PaymentType": { - "title": "Payment Type", - "type": "string", - "description": "Payment category recorded on a transaction, for example `POS` for a point-of-sale card payment, `ECOM` for an online card payment, or `RECURRING` for a recurring card payment. These reporting values are separate from the lowercase `payment_type` values used to process checkouts.", - "enum": [ - "CASH", - "POS", - "ECOM", - "RECURRING", - "BITCOIN", - "BALANCE", - "MOTO", - "BOLETO", - "DIRECT_DEBIT", - "APM", - "UNKNOWN" - ], - "example": "ECOM" - }, - "EntryMode": { - "title": "Entry Mode", - "type": "string", - "description": "How the payment details were captured, for example `CHIP` or `CONTACTLESS` for card-present payments and `CUSTOMER_ENTRY` for card details entered by the payer. For wallet and alternative payment methods, this can identify the method, such as `APPLE_PAY` or `BLIK`.", - "enum": [ - "BOLETO", - "SOFORT", - "IDEAL", - "BANCONTACT", - "EPS", - "MYBANK", - "SATISPAY", - "BLIK", - "P24", - "GIROPAY", - "PIX", - "QR_CODE_PIX", - "APPLE_PAY", - "GOOGLE_PAY", - "PAYPAL", - "TWINT", - "NONE", - "CHIP", - "MANUAL_ENTRY", - "CUSTOMER_ENTRY", - "MAGSTRIPE_FALLBACK", - "MAGSTRIPE", - "DIRECT_DEBIT", - "CONTACTLESS", - "MOTO", - "CONTACTLESS_MAGSTRIPE", - "N/A" + "PersonalIdentifier": { + "type": "object", + "required": [ + "ref", + "value" ], - "example": "CUSTOMER_ENTRY" + "properties": { + "ref": { + "type": "string", + "description": "The unique reference for the personal identifier type.", + "example": "br.cpf", + "maxLength": 32 + }, + "value": { + "type": "string", + "description": "The personal identifier value.", + "example": "847.060.136-90", + "maxLength": 128 + } + }, + "example": { + "ref": "br.cpf", + "value": "847.060.136-90" + } }, - "CardType": { - "title": "Card Type", - "type": "string", - "description": "Issuing card network of the payment card used for the transaction.", - "enum": [ - "ALELO", - "AMEX", - "BANCOMAT", - "CONECS", - "CUP", - "DINERS", - "DISCOVER", - "EFTPOS", - "ELO", - "ELV", - "GIROCARD", - "HIPERCARD", - "INTERAC", - "JCB", - "MAESTRO", - "MASTERCARD", - "PLUXEE", - "SUMUP", - "SWILE", - "TICKET", - "VISA", - "VISA_ELECTRON", - "VISA_VPAY", - "VPAY", - "VR", - "UNKNOWN" + "ListPersonsResponseBody": { + "type": "object", + "required": [ + "items" ], - "example": "VISA" + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Person" + } + } + } }, - "TransactionFull": { - "title": "Transaction Full", - "description": "Full transaction resource with checkout, payout, and event details.", + "Merchant": { + "title": "Merchant", + "externalDocs": { + "description": "Merchant documentation", + "url": "https://developer.sumup.com/tools/glossary/merchant" + }, "allOf": [ - { - "$ref": "#/components/schemas/TransactionBase" - }, - { - "$ref": "#/components/schemas/TransactionCheckoutInfo" - }, - { - "$ref": "#/components/schemas/TransactionMixinHistory" - }, { "type": "object", + "required": [ + "merchant_code", + "country", + "default_currency", + "default_locale" + ], "properties": { - "foreign_transaction_id": { - "type": "string", - "description": "External transaction identifier supplied by the client.", - "example": "J13253253x1" - }, - "client_transaction_id": { - "type": "string", - "description": "Client-supplied identifier of the transaction.", - "example": "urn:sumup:pos:sale:MNKKNGST:1D4E3B2D-111D-48D7-9AF0-832DAEF63DD7;2" - }, - "username": { - "type": "string", - "format": "email", - "description": "Email address of the registered user (merchant) to whom the payment is made.", - "example": "merchant@example.com" - }, - "fee_amount": { - "type": "number", - "format": "decimal", - "description": "Total SumUp transaction fee in major units of the transaction's currency.", - "example": 8 - }, - "lat": { - "$ref": "#/components/schemas/Lat" - }, - "lon": { - "$ref": "#/components/schemas/Lon" - }, - "horizontal_accuracy": { - "$ref": "#/components/schemas/HorizontalAccuracy" - }, - "merchant_id": { - "type": "integer", - "format": "int64", - "description": "Internal SumUp identifier of the merchant.", - "example": 136902 - }, - "device_info": { - "$ref": "#/components/schemas/Device" - }, - "simple_payment_type": { - "type": "string", - "description": "Simple name of the payment type.", - "enum": [ - "CASH", - "CC_SIGNATURE", - "ELV", - "ELV_WITHOUT_SIGNATURE", - "CC_CUSTOMER_ENTERED", - "MANUAL_ENTRY", - "EMV", - "RECURRING", - "BALANCE", - "MOTO", - "BOLETO", - "APM", - "BITCOIN", - "CARD" - ], - "example": "CARD" - }, - "verification_method": { - "type": "string", - "description": "Verification method used for the transaction.", - "enum": [ - "none", - "signature", - "offline PIN", - "online PIN", - "offline PIN + signature", - "na" - ], - "example": "none" - }, - "card": { - "$ref": "#/components/schemas/CardResponse" - }, - "elv_account": { - "$ref": "#/components/schemas/ElvCardAccount" - }, - "local_time": { - "type": "string", - "format": "date-time", - "description": "Local timestamp of when the transaction was created.", - "example": "2020-02-29T11:56:56+01:00" - }, - "payout_date": { + "merchant_code": { "type": "string", - "format": "date", - "description": "The date of the payout.", - "example": "2019-08-28" + "readOnly": true, + "description": "Short unique identifier for the merchant.", + "example": "MK01A8C2" }, - "payout_type": { + "organization_id": { "type": "string", - "description": "Payout type for the transaction.", - "enum": [ - "BANK_ACCOUNT", - "PREPAID_CARD" - ], - "example": "BANK_ACCOUNT" + "description": "ID of the organization the merchant belongs to (if any).", + "example": "G0UZPVAX" }, - "process_as": { + "business_type": { "type": "string", - "description": "Whether the transaction was processed as credit or debit.", - "enum": [ - "CREDIT", - "DEBIT" - ], - "example": "CREDIT" + "description": "The business type.\n* `sole_trader`: The business is run by an self-employed individual.\n* `company`: The business is run as a company with one or more shareholders\n* `partnership`: The business is run as a company with two or more shareholders that can be also other legal entities\n* `non_profit`: The business is run as a nonprofit organization that operates for public or social benefit\n* `government_entity`: The business is state owned and operated\n" }, - "products": { - "type": "array", - "description": "List of products from the merchant's catalogue for which the transaction serves as a payment.", - "items": { - "$ref": "#/components/schemas/Product" - } + "company": { + "$ref": "#/components/schemas/Company" }, - "vat_rates": { - "type": "array", - "description": "List of VAT rates applicable to the transaction.", - "items": { - "type": "object", - "properties": { - "rate": { - "type": "number", - "format": "decimal", - "description": "VAT rate.", - "example": 0.045 - }, - "net": { - "type": "number", - "format": "decimal", - "description": "NET amount of products having this VAT rate applied.", - "example": 1.36 - }, - "vat": { - "type": "number", - "format": "decimal", - "description": "VAT amount of this rate applied.", - "example": 0.06 - }, - "gross": { - "type": "number", - "format": "decimal", - "description": "Gross amount of products having this VAT rate applied.", - "example": 1.42 - } - } - } + "country": { + "$ref": "#/components/schemas/CountryCode" }, - "transaction_events": { - "type": "array", - "description": "Detailed list of events related to the transaction.", - "items": { - "$ref": "#/components/schemas/TransactionEvent" - } + "business_profile": { + "$ref": "#/components/schemas/BusinessProfile" }, - "simple_status": { + "avatar": { "type": "string", - "description": "High-level status of the transaction from the merchant's perspective.\n\n- `PENDING`: The payment has been initiated and is still being processed. A final outcome is not available yet.\n- `SUCCESSFUL`: The payment was completed successfully.\n- `PAID_OUT`: The payment was completed successfully and the funds have already been included in a payout to the merchant.\n- `FAILED`: The payment did not complete successfully.\n- `CANCELLED`: The payment was cancelled or reversed and is no longer payable or payable to the merchant.\n- `CANCEL_FAILED`: An attempt to cancel or reverse the payment was not completed successfully.\n- `REFUNDED`: The payment was refunded in full or in part.\n- `REFUND_FAILED`: An attempt to refund the payment was not completed successfully.\n- `CHARGEBACK`: The payment was subject to a chargeback.\n- `NON_COLLECTION`: The amount could not be collected from the merchant after a chargeback or related adjustment.", - "enum": [ - "SUCCESSFUL", - "PAID_OUT", - "CANCEL_FAILED", - "CANCELLED", - "CHARGEBACK", - "FAILED", - "REFUND_FAILED", - "REFUNDED", - "NON_COLLECTION", - "PENDING" - ], - "example": "SUCCESSFUL" - }, - "links": { - "type": "array", - "description": "List of hyperlinks for accessing related resources.", - "items": { - "$ref": "#/components/schemas/Link" - } + "format": "uri", + "description": "A user-facing small-format logo for use in dashboards and other user-facing applications. For customer-facing branding see `merchant.business_profile.branding`.\n" }, - "events": { - "type": "array", - "description": "Compact list of events related to the transaction.", - "items": { - "$ref": "#/components/schemas/Event" - } + "alias": { + "type": "string", + "description": "A user-facing name of the merchant account for use in dashboards and other user-facing applications. For customer-facing business name see `merchant.business_profile`.\n" }, - "location": { - "type": "object", - "description": "Details of the payment location as received from the payment terminal.", - "properties": { - "lat": { - "$ref": "#/components/schemas/Lat" - }, - "lon": { - "$ref": "#/components/schemas/Lon" - }, - "horizontal_accuracy": { - "$ref": "#/components/schemas/HorizontalAccuracy" - } - } + "default_currency": { + "type": "string", + "readOnly": true, + "description": "Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217) representing the default currency for the account.\n", + "example": "EUR", + "minLength": 3, + "maxLength": 3 }, - "tax_enabled": { + "default_locale": { + "type": "string", + "description": "Merchant's default locale, represented as a BCP47 [RFC5646](https://datatracker.ietf.org/doc/html/rfc5646) language tag. This is typically an ISO 639-1 Alpha-2 [ISO639‑1](https://www.iso.org/iso-639-language-code) language code in lowercase and an ISO 3166-1 Alpha-2 [ISO3166‑1](https://www.iso.org/iso-3166-country-codes.html) country code in uppercase, separated by a dash. For example, en-US or fr-CA.\nIn multilingual countries this is the merchant's preferred locale out of those, that are officially spoken in the country. In a countries with a single official language this will match the official language.", + "example": "de-DE", + "minLength": 2, + "maxLength": 5 + }, + "sandbox": { "type": "boolean", - "description": "Indicates whether tax deduction is enabled for the transaction.", - "example": true + "description": "True if the merchant is a sandbox for testing.", + "example": false + }, + "meta": { + "$ref": "#/components/schemas/Meta" + }, + "classic": { + "$ref": "#/components/schemas/ClassicMerchantIdentifiers" + }, + "version": { + "$ref": "#/components/schemas/Version" + }, + "change_status": { + "$ref": "#/components/schemas/ChangeStatus" } } + }, + { + "$ref": "#/components/schemas/Timestamps" } ] }, - "Currency": { - "title": "Currency", - "type": "string", - "description": "Three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code of the amount.", - "enum": [ - "BRL", - "CHF", - "CLP", - "COP", - "CZK", - "DKK", - "EUR", - "GBP", - "HRK", - "HUF", - "NOK", - "PLN", - "RON", - "SEK", - "USD" - ], - "example": "EUR" + "Meta": { + "type": "object", + "additionalProperties": { + "type": "string", + "maxLength": 256 + }, + "description": "A set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.\n\n**Warning**: Updating Meta will overwrite the existing data. Make sure to always include the complete JSON object.", + "example": {} }, - "TransactionStatus": { - "title": "Transaction Status", - "type": "string", - "description": "Current status of the transaction.\n\n- `PENDING`: The transaction has been created but its final outcome is not known yet.\n- `SUCCESSFUL`: The transaction completed successfully.\n- `CANCELLED`: The transaction was cancelled or otherwise reversed before completion.\n- `FAILED`: The transaction attempt did not complete successfully.\n- `REFUNDED`: The transaction was refunded in full or in part.", - "enum": [ - "SUCCESSFUL", - "CANCELLED", - "FAILED", - "PENDING", - "REFUNDED" - ], - "example": "SUCCESSFUL" + "BusinessProfile": { + "type": "object", + "description": "Business information about the merchant. This information will be visible to the merchant's customers.\n", + "properties": { + "name": { + "type": "string", + "description": "The customer-facing business name.", + "minLength": 1, + "maxLength": 150, + "example": "Example Coffee" + }, + "dynamic_descriptor": { + "type": "string", + "minLength": 1, + "maxLength": 30, + "pattern": "^[a-zA-Z0-9 +'_.-]+$", + "description": "The descriptor is the text that your customer sees on their bank account statement.\nThe more recognisable your descriptor is, the less risk you have of receiving disputes (e.g. chargebacks).\n", + "example": "Example Coffee" + }, + "website": { + "type": "string", + "description": "The business's publicly available website.", + "minLength": 1, + "maxLength": 255, + "example": "https://example.com" + }, + "email": { + "type": "string", + "description": "A publicly available email address.", + "minLength": 1, + "maxLength": 255, + "example": "contact@example.com" + }, + "phone_number": { + "$ref": "#/components/schemas/PhoneNumber" + }, + "address": { + "$ref": "#/components/schemas/Address" + }, + "branding": { + "$ref": "#/components/schemas/Branding" + } + } }, - "TransactionEventType": { - "title": "Transaction Event Type", - "type": "string", - "description": "Financial event associated with a transaction.\n\n- `PAYOUT`: Funds from the transaction being prepared for or included in a merchant payout. Check the event status to determine whether they have been paid out.\n- `REFUND`: Money returned to the payer.\n- `CHARGE_BACK`: A reversal of the payment following a chargeback.\n- `PAYOUT_DEDUCTION`: An amount deducted from a merchant payout, for example to cover a refund or chargeback.", - "enum": [ - "PAYOUT", - "CHARGE_BACK", - "REFUND", - "PAYOUT_DEDUCTION" - ], - "example": "REFUND" + "Person": { + "allOf": [ + { + "$ref": "#/components/schemas/BasePerson" + } + ] }, - "TransactionEventStatus": { - "title": "Transaction Event Status", + "PhoneNumber": { "type": "string", - "description": "Status of the transaction event.\n\nNot every value is used for every event type.\n\n- `PENDING`: The event has been created but is not final yet. Used for events that are still being processed and whose final outcome is not known yet.\n- `SCHEDULED`: The event is planned for a future payout cycle but has not been executed yet. This applies to payout events before money is actually sent out.\n- `RECONCILED`: The underlying payment has been matched with settlement data and is ready to continue through payout processing, but the funds have not been paid out yet. This applies to payout events.\n- `PAID_OUT`: The payout event has been completed and the funds were included in a merchant payout.\n- `REFUNDED`: A refund event has been accepted and recorded in the refund flow. This is the status returned for refund events once the transaction amount is being or has been returned to the payer.\n- `SUCCESSFUL`: The event completed successfully. Use this as the generic terminal success status for event types that do not expose a more specific business outcome such as `PAID_OUT` or `REFUNDED`.\n- `FAILED`: The event could not be completed. Typical examples are a payout that could not be executed or an event that was rejected during processing.", - "enum": [ - "FAILED", - "PAID_OUT", - "PENDING", - "RECONCILED", - "REFUNDED", - "SCHEDULED", - "SUCCESSFUL" - ], - "example": "SUCCESSFUL" - }, - "TransactionEventID": { - "title": "Transaction Event ID", - "type": "integer", - "format": "int64", - "description": "Numeric identifier of a transaction event. Use it as `tx_event_id` when requesting receipt details for a specific event. This is separate from the transaction ID and the transaction history pagination references.", - "example": 9567461191 - }, - "HorizontalAccuracy": { - "title": "Horizontal Accuracy", - "type": "number", - "format": "float", - "description": "Indication of the precision of the geographical position received from the payment terminal.", - "example": 5 - }, - "Lat": { - "title": "Latitude", - "type": "number", - "format": "float", - "description": "Latitude value from the coordinates of the payment location (as received from the payment terminal reader).", - "minimum": -90, - "maximum": 90, - "example": 52.520008 + "description": "A publicly available phone number in [E.164](https://en.wikipedia.org/wiki/E.164) format.\n", + "example": "+420123456789", + "maxLength": 16 }, - "Lon": { - "title": "Longitude", - "type": "number", - "format": "float", - "description": "Longitude value from the coordinates of the payment location (as received from the payment terminal reader).", - "minimum": -180, - "maximum": 180, - "example": 13.404954 + "Branding": { + "type": "object", + "description": "Settings used to apply the Merchant's branding to email receipts, invoices, checkouts, and other products.", + "properties": { + "footer_text": { + "type": "string", + "description": "Footer text rendered on receipts and other customer-facing products.\n", + "minLength": 1, + "maxLength": 500, + "examples": [ + "Thanks for shopping with us." + ] + }, + "icon": { + "type": "string", + "format": "uri", + "description": "An icon for the merchant. Must be square.\n" + }, + "logo": { + "type": "string", + "format": "uri", + "description": "A logo for the merchant that will be used in place of the icon and without the merchant's name next to it if there's sufficient space.\n" + }, + "hero": { + "type": "string", + "format": "uri", + "description": "Data-URL encoded hero image for the merchant business.\n" + }, + "primary_color": { + "type": "string", + "description": "A hex color value representing the primary branding color of this merchant (your brand color).\n", + "examples": [ + "#FF4B3A", + "#0072C6", + "#F68B20" + ] + }, + "primary_color_fg": { + "type": "string", + "description": "A hex color value representing the color of the text displayed on branding color of this merchant.\n", + "examples": [ + "#FF4B3A", + "#0072C6", + "#F68B20" + ] + }, + "secondary_color": { + "type": "string", + "description": "A hex color value representing the secondary branding color of this merchant (accent color used for buttons).\n", + "examples": [ + "#FF4B3A", + "#0072C6", + "#F68B20" + ] + }, + "secondary_color_fg": { + "type": "string", + "description": "A hex color value representing the color of the text displayed on secondary branding color of this merchant.\n", + "examples": [ + "#FF4B3A", + "#0072C6", + "#F68B20" + ] + }, + "background_color": { + "type": "string", + "description": "A hex color value representing the preferred background color of this merchant.\n", + "examples": [ + "#FF4B3A", + "#0072C6", + "#F68B20" + ] + } + } }, - "TransactionID": { - "title": "Transaction ID", + "LegalType": { + "externalDocs": { + "description": "The country SDK documentation for legal types.", + "url": "https://developer.sumup.com/tools/glossary/merchant#legal-types" + }, "type": "string", - "description": "Unique identifier of the transaction.", - "example": "410fc44a-5956-44e1-b5cc-19c6f8d727a4" + "description": "The unique legal type reference as defined in the country SDK. We do not rely on IDs as used by other services. Consumers of this API are expected to use the country SDK to map to any other IDs, translation keys, or descriptions.\n", + "minLength": 4, + "maxLength": 64, + "pattern": "^[a-z]{2}\\.[a-z_]+$", + "examples": [ + "de.freiberufler", + "br.ltda", + "gb.partnership", + "bg.private_limited_company" + ] }, - "Affiliate": { - "properties": { - "app_id": { - "example": "com.example.app", - "type": "string" - }, - "key": { - "example": "123e4567-e89b-12d3-a456-426614174000", - "type": "string" - } + "CompanyIdentifiers": { + "type": "array", + "description": "A list of country-specific company identifiers.\n", + "items": { + "$ref": "#/components/schemas/CompanyIdentifier" + } + }, + "CompanyIdentifier": { + "externalDocs": { + "description": "Company identifier documentation", + "url": "https://developer.sumup.com/tools/glossary/merchant#company-identifiers" }, + "type": "object", "required": [ - "app_id", - "key" + "ref", + "value" ], - "type": "object" - }, - "Amount": { "properties": { - "currency": { - "description": "Currency ISO 4217 code", - "example": "MXN", - "type": "string" + "ref": { + "type": "string", + "pattern": "^[a-z]{2}\\.[a-z_]+$", + "description": "The unique reference for the company identifier type as defined in the country SDK.\n", + "examples": [ + "de.gmbh" + ] }, "value": { - "description": "Amount in minor units (e.g. cents).", - "example": 1000, - "type": "integer" + "type": "string", + "minLength": 1, + "maxLength": 100, + "description": "The company identifier value.\n", + "examples": [ + "HRB 123456" + ] } }, + "examples": [ + { + "ref": "de.gmbh", + "value": "HRB 123456" + } + ] + }, + "Ownership": { + "type": "object", "required": [ - "currency", - "value" + "share" ], - "type": "object" + "properties": { + "share": { + "description": "The percent of ownership shares held by the Person expressed in percent mille (1/100000). Only Persons with the relationship `owner` can have ownership.\n", + "type": "integer", + "format": "int32", + "minimum": 25000, + "maximum": 100000, + "example": 50000 + } + } }, - "ReaderID": { + "Version": { "type": "string", - "description": "Unique identifier of the reader that the payment is initiated on.", - "example": "rdr_3MSAFM23CK82VSTT4BN6RWSQ65", - "minLength": 30, - "maxLength": 30 + "description": "The version of the resource. The version reflects a specific change submitted to the API via one of the `PATCH` endpoints.\n", + "examples": [ + "chng_01HS0KG3MPVEVWW85E3KNXH55J" + ] }, - "ReaderPaymentRequestParams": { + "ChangeStatus": { + "type": "string", + "readOnly": true, + "description": "Reflects the status of changes submitted through the `PATCH` endpoints for the Merchant or Persons. If some changes have not been applied yet, the status will be `pending`. If all changes have been applied, the status `done`.\nThe status is only returned after write operations or on read endpoints when the `version` query parameter is provided.\n" + }, + "BasePerson": { + "externalDocs": { + "description": "Person documentation", + "url": "https://developer.sumup.com/tools/glossary/merchant#persons" + }, + "type": "object", + "description": "Base schema for a Person associated with a Merchant. This can be a legal representative, business owner (ultimate beneficial owner), or an officer. A legal representative is the Person who registered the Merchant with SumUp. They should always have a `user_id`.\n", + "required": [ + "id" + ], "properties": { - "affiliate": { - "allOf": [ - { - "description": "Optional caller-supplied context about the integration initiating the payment.", - "type": "object" - }, - { - "$ref": "#/components/schemas/Affiliate" - } + "id": { + "type": "string", + "readOnly": true, + "description": "The unique identifier for the Person. This is a [typeid](https://github.com/sumup/typeid).\n", + "examples": [ + "pers_2EGQ057R6C8J791RVCG5NWAEAB" + ] + }, + "user_id": { + "type": "string", + "description": "A corresponding identity user ID for the Person, if they have a user account.\n", + "examples": [ + "ef263f37-8701-4181-9758-acddbb778ee9" ] }, - "client_transaction_id": { - "description": "Caller-supplied correlation identifier, used as the idempotency key.", - "example": "19e12390-72cf-4f9f-80b5-b0c8a67fa43f", - "type": "string" + "birthdate": { + "type": "string", + "format": "date", + "description": "The date of birth of the individual, represented as an ISO 8601:2004 [ISO8601‑2004] YYYY-MM-DD format.\n", + "example": "1980-01-12" + }, + "given_name": { + "type": "string", + "description": "The first name(s) of the individual.", + "example": "Sofia", + "minLength": 1, + "maxLength": 60 + }, + "family_name": { + "type": "string", + "description": "The last name(s) of the individual.", + "example": "Rossi", + "minLength": 1, + "maxLength": 60 + }, + "phone_number": { + "$ref": "#/components/schemas/PhoneNumber" + }, + "relationships": { + "type": "array", + "description": "A list of roles the Person has in the Merchant or towards SumUp. A Merchant must have at least one Person with the relationship `representative`.\n", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "string", + "description": "* `representative`: The Person is the primary contact for SumUp and has full administrative power over the merchant account.\n* `owner`: The Person is a business owner. If this value is set, the `ownership_percent` should be set as well.\n* `officer`: The Person is an officer at the company.\n", + "examples": [ + "representative", + "owner", + "officer" + ] + } + }, + "ownership": { + "$ref": "#/components/schemas/Ownership" + }, + "address": { + "$ref": "#/components/schemas/Address" + }, + "identifiers": { + "$ref": "#/components/schemas/PersonalIdentifiers" + }, + "citizenship": { + "$ref": "#/components/schemas/CountryCode" + }, + "nationality": { + "type": [ + "string", + "null" + ], + "pattern": "^[A-Z]{2}$", + "description": "The Person's nationality. May be an [ISO3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code, but legacy data may not conform to this standard.\n" + }, + "country_of_residence": { + "type": [ + "string", + "null" + ], + "description": "An [ISO3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code representing the country where the Person resides.\n", + "pattern": "^[A-Z]{2}$" + }, + "version": { + "$ref": "#/components/schemas/Version" + }, + "change_status": { + "$ref": "#/components/schemas/ChangeStatus" + } + } + }, + "Company": { + "externalDocs": { + "description": "Company documentation", + "url": "https://developer.sumup.com/tools/glossary/merchant#company" + }, + "type": "object", + "description": "Information about the company or business. This is legal information that is used for verification.\n", + "properties": { + "name": { + "type": "string", + "description": "The company's legal name.", + "minLength": 1, + "maxLength": 150, + "example": "Gin \u0026 Doughnuts Bar GmbH" + }, + "merchant_category_code": { + "description": "The merchant category code for the account as specified by [ISO18245](https://www.iso.org/standard/33365.html). MCCs are used to classify businesses based on the goods or services they provide.\n", + "type": "string", + "example": "1532", + "pattern": "^[0-9]{4}$" + }, + "legal_type": { + "$ref": "#/components/schemas/LegalType", + "description": "The category identifying the legal structure of the company or legal entity.\n" }, - "tip_amount": { - "description": "Portion of total_amount that is a tip, in minor units.", - "example": 200, - "type": "integer" + "address": { + "$ref": "#/components/schemas/Address", + "description": "The company's primary address." }, - "total_amount": { - "allOf": [ - { - "description": "Amount charged on the reader, including any tip. The amount is represented as an integer value altogether with the currency and the minor unit. For example, MXN 10.00 is represented as value 1000 with minor unit of 2.", - "example": { - "currency": "MXN", - "value": 1000 - } - }, - { - "$ref": "#/components/schemas/Amount" - } + "trading_address": { + "$ref": "#/components/schemas/Address", + "description": "A trading address is where your suppliers, banks or customers send you correspondence to. Trading address can be different to the company's registered address (`address`).\n" + }, + "identifiers": { + "$ref": "#/components/schemas/CompanyIdentifiers" + }, + "phone_number": { + "$ref": "#/components/schemas/PhoneNumber", + "description": "The company's phone number (used for verification) in [E.164](https://en.wikipedia.org/wiki/E.164) format.\n" + }, + "website": { + "description": "HTTP(S) URL of the company's website.\n", + "type": "string", + "minLength": 1, + "maxLength": 255, + "examples": [ + "https://www.sumup.com" ] + }, + "attributes": { + "$ref": "#/components/schemas/Attributes" } - }, + } + }, + "ClassicMerchantIdentifiers": { + "type": "object", "required": [ - "total_amount", - "client_transaction_id" + "id" ], - "type": "object" + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "Classic (serial) merchant ID.", + "example": 1234, + "deprecated": true + } + } }, - "ReaderPaymentResponse": { + "Timestamps": { + "type": "object", "properties": { - "data": { - "$ref": "#/components/schemas/ReaderPaymentResponseData" + "created_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the resource was created. This is a string as defined in [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6).\n", + "readOnly": true, + "examples": [ + "2021-08-31T12:00:00Z" + ] + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "The date and time when the resource was last updated. This is a string as defined in [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6).\n", + "readOnly": true, + "examples": [ + "2021-08-31T12:00:00Z" + ] } }, - "type": "object" + "required": [ + "created_at", + "updated_at" + ] }, - "ReaderPaymentResponseData": { + "Reader": { + "title": "Reader", + "description": "A physical card reader device that can accept in-person payments.", + "type": "object", "properties": { - "client_transaction_id": { - "description": "Caller-supplied correlation identifier that was provided in the request.", - "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "type": "string" + "id": { + "$ref": "#/components/schemas/ReaderID" }, - "transaction_code": { - "description": "Transaction code returned by the acquirer/processing entity after processing the transaction.", - "example": "TEENSK4W2K", - "type": "string" + "name": { + "$ref": "#/components/schemas/ReaderName" + }, + "status": { + "$ref": "#/components/schemas/ReaderStatus" + }, + "device": { + "$ref": "#/components/schemas/ReaderDevice" + }, + "metadata": { + "$ref": "#/components/schemas/Metadata" + }, + "service_account_id": { + "type": "string", + "format": "uuid", + "x-beta": true, + "description": "Identifier of the system-managed service account associated with this reader.\nPresent only for readers that are already paired.\nThis field is currently in beta and may change." + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "The timestamp of when the reader was created.", + "example": "2023-01-18T15:16:17Z" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "The timestamp of when the reader was last updated.", + "example": "2023-01-20T15:16:17Z" } }, - "type": "object" + "required": [ + "id", + "name", + "status", + "device", + "created_at", + "updated_at" + ] }, - "MembershipStatus": { + "ReaderName": { "type": "string", - "description": "The status of the membership.", - "enum": [ - "accepted", - "pending", - "expired", - "disabled", - "unknown" - ] + "description": "Custom human-readable, user-defined name for easier identification of the reader.", + "maxLength": 500, + "example": "Frontdesk" }, - "ResourceType": { + "ReaderStatus": { "type": "string", - "description": "The type of the membership resource.\nPossible values are:\n* `merchant` - merchant account(s)\n* `organization` - organization(s)", - "example": "merchant" + "example": "paired", + "enum": [ + "unknown", + "processing", + "paired", + "expired" + ], + "description": "The status of the reader object gives information about the current state of the reader.\n\nPossible values:\n\n- `unknown` - The reader status is unknown.\n- `processing` - The reader is created and waits for the physical device to confirm the pairing.\n- `paired` - The reader is paired with a merchant account and can be used with SumUp APIs.\n- `expired` - The pairing is expired and no longer usable with the account. The resource needs to get recreated." }, - "Membership": { - "title": "Membership", + "ReaderDevice": { "type": "object", - "description": "A membership associates a user with a resource, memberships is defined by user, resource, resource type, and associated roles.", - "required": [ - "id", - "resource_id", - "type", - "roles", - "permissions", - "created_at", - "updated_at", - "status", - "resource" - ], + "description": "Information about the underlying physical device.", "properties": { - "id": { + "identifier": { "type": "string", - "description": "ID of the membership.", - "example": "mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP" + "description": "A unique identifier of the physical device (e.g. serial number).", + "example": "U1DT3NA00-CN" }, - "resource_id": { + "model": { "type": "string", - "description": "ID of the resource the membership is in.", - "example": "M2DDT39A" - }, - "type": { - "$ref": "#/components/schemas/ResourceType" - }, - "roles": { - "type": "array", - "description": "User's roles.", - "example": [ - "role_admin" + "description": "Identifier of the model of the device.", + "enum": [ + "solo", + "virtual-solo" ], - "items": { - "type": "string" - } - }, - "permissions": { - "type": "array", - "description": "User's permissions.", - "deprecated": true, - "x-deprecation-notice": "Permissions include only legacy permissions, please use roles instead. Member access is based on their roles within a given resource and the permissions these roles grant.", - "items": { - "type": "string" - }, - "example": [ - "members_read", - "members_write", - "create_moto_payments", - "full_transaction_history_view", - "refund_transactions", - "create_referral", - "developer_settings_edit", - "developer_settings_access" - ] - }, - "created_at": { + "example": "solo" + } + }, + "required": [ + "identifier", + "model" + ] + }, + "ReaderPairingCode": { + "type": "string", + "description": "The pairing code is a 8 or 9 character alphanumeric string that is displayed on a SumUp Device after initiating the pairing. It is used to link the physical device to the created pairing.", + "example": "4WLFDSBF", + "minLength": 8, + "maxLength": 9 + }, + "Reference": { + "type": "string", + "description": "The reference to the actual payment used for this sale, e.g. the sumup transaction code.", + "example": "TERTYFQ4G3", + "maxLength": 50 + }, + "Brand": { + "type": "string", + "description": "The brand of the card.\nInput is case-insensitive; the canonical form is lowercase snake_case.\n**VALUES**: [amex, cup, diners, discover, elo, elv, hipercard, jcb, maestro, mastercard, visa, visa_electron,\nvisa_vpay, vr, eftpos, conecs, swile, girocard, interac, sumup, bancomat].", + "maxLength": 20, + "example": "visa" + }, + "ItemTypeV10": { + "type": "string", + "description": "Classifies a sale line. Not a schema subclass.\n\nKnown values: `CATALOG`, `DEPOSIT`, `GIFT_CARD`, `CUSTOM`, `FEE`.\n\n`FEE` lines represent merchant-charged fees on the sale (e.g. shipping, service\ncharge, surcharge, cancellation). They participate in sale totals like any other\nline; type-specific data is carried in `features` (see `Feature` for the\nconventional feature keys).\n\nThis is intentionally an open string, NOT a closed enum: new values are added\nover time as pure data and consumers MUST tolerate unknown values, rendering the\nline from the generic envelope (name, quantity, price, taxes) and reading any\nextra information from `features`.", + "example": "CATALOG" + }, + "Quantity": { + "type": "number", + "format": "double", + "description": "The numerical value representing the quantity in the specified unit.", + "minimum": 0, + "example": 2.15332 + }, + "UnitOfMeasure": { + "type": "object", + "description": "The unit of measure of the item.", + "required": [ + "group_id", + "unit_id", + "unit_ratio" + ], + "properties": { + "group_id": { "type": "string", - "description": "The timestamp of when the membership was created.", - "format": "date-time", - "example": "2023-01-20T15:16:17Z" + "description": "The group of the unit of measure.", + "maxLength": 100, + "example": "weight" }, - "updated_at": { + "unit_id": { "type": "string", - "description": "The timestamp of when the membership was last updated.", - "format": "date-time", - "example": "2023-01-20T15:16:17Z" - }, - "invite": { - "$ref": "#/components/schemas/Invite" + "description": "The specific unit of measure within the group.", + "example": "weight.kilogram", + "maxLength": 100 }, - "status": { - "$ref": "#/components/schemas/MembershipStatus" - }, - "metadata": { - "$ref": "#/components/schemas/Metadata" - }, - "attributes": { - "$ref": "#/components/schemas/Attributes" - }, - "resource": { - "$ref": "#/components/schemas/MembershipResource" + "unit_ratio": { + "type": "number", + "format": "double", + "description": "The ratio of the specified unit to the base unit of the group.", + "example": 1.24412 } } }, - "MembershipResource": { - "title": "Resource", + "PositiveAmount": { + "type": "integer", + "format": "int64", + "description": "The value of the amount in minor units of the currency according to the Sale.currency.scale. \n`value` can get large for some currencies and applications. \nUse Long type or a similar data type when parsing `value`.", + "example": 100, + "minimum": 0 + }, + "TaxRate": { + "type": "integer", + "format": "int64", + "minimum": 0, + "description": "The tax rate percentage in minor units (1/100000). For example 19000 = 19%.", + "example": 19000 + }, + "TaxLine": { "type": "object", - "description": "Information about the resource the membership is in.", "required": [ "id", - "type", - "name", - "created_at", - "updated_at" + "net_amount", + "gross_amount", + "tax_amount" ], + "description": "Information about tax together with amounts before and after its application such as:\n - net amount: taxable net amount, scoped by this tax\n - gross amount: amount after applying the tax.", "properties": { "id": { "type": "string", - "description": "ID of the resource the membership is in.", - "example": "M2DDT39A" - }, - "type": { - "$ref": "#/components/schemas/ResourceType" + "description": "Tax ID from the Tax Service (External Id)", + "maxLength": 100, + "example": "b064ed44-66e1-45a1-a963-b783808f0436" }, "name": { "type": "string", - "description": "Display name of the resource.", - "example": "Acme Corp" + "description": "Tax name, e.g. \"MwSt.\"", + "maxLength": 255 }, - "logo": { - "type": "string", - "description": "Logo fo the resource.", - "format": "uri", - "maxLength": 256, - "example": "https://images.sumup.com/img_2x4y6z8a0b1c2d3e4f5g6h7j8k.png" + "percentage": { + "$ref": "#/components/schemas/TaxRate" }, - "created_at": { + "net_amount": { + "description": "Net amount before applying the tax. \nThe value of the amount in minor units of the currency according to the Sale.currency.scale.\n", + "allOf": [ + { + "$ref": "#/components/schemas/Amount" + } + ] + }, + "gross_amount": { + "description": "Gross amount after applying the tax.\nThe value of the amount in minor units of the currency according to the Sale.currency.scale.\n", + "allOf": [ + { + "$ref": "#/components/schemas/Amount" + } + ] + }, + "tax_amount": { + "description": "Amount of tax.\nThe value of the amount in minor units of the currency according to the Sale.currency.scale.\n", + "allOf": [ + { + "$ref": "#/components/schemas/Amount" + } + ] + } + } + }, + "DiscountLevel": { + "type": "string", + "description": "Specifies where discount was applied by user (either merchant or consumer):\n- CART: Applied to the whole cart (calculated and distributed per sale item)\n- ITEM: Applied to specific sale item\n\n*Accepted values:* [\"ITEM\", \"CART\"].", + "example": "CART", + "minLength": 4, + "maxLength": 4 + }, + "DiscountSourceAdHoc": { + "type": "object", + "description": "Discount created ad-hoc on device during checkout.", + "properties": { + "id": { "type": "string", - "description": "The timestamp of when the membership resource was created.", - "format": "date-time", - "example": "2023-01-20T15:16:17Z" + "format": "uuid", + "description": "The unique identifier of the ad-hoc discount.", + "example": "075b0b5c-a1f4-46da-9aca-92fb6dd5905d" }, - "updated_at": { + "name": { "type": "string", - "description": "The timestamp of when the membership resource was last updated.", - "format": "date-time", - "example": "2023-01-20T15:16:17Z" + "description": "The name of the ad-hoc discount.", + "example": "Happy Hour", + "maxLength": 100 }, - "attributes": { - "$ref": "#/components/schemas/Attributes" + "description": { + "type": "string", + "description": "The description of the ad-hoc discount.", + "example": "Happy Hour from 10 to 12.", + "maxLength": 250 } } }, - "Member": { - "title": "Member", + "DiscountApplicationMode": { + "type": "string", + "description": "Method of applying the discount to the items or cart.", + "enum": [ + "MANUAL", + "AUTOMATIC" + ], + "example": "MANUAL" + }, + "DiscountSourceBasic": { "type": "object", - "description": "A member is user within specific resource identified by resource id, resource type, and associated roles.", + "description": "Preset discount applied manually on the POS.", "required": [ "id", - "roles", - "permissions", - "created_at", - "updated_at", - "status" + "name", + "application_mode" ], "properties": { "id": { "type": "string", - "description": "ID of the member.", - "example": "mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP" + "format": "uuid", + "description": "The unique identifier of the basic discount.", + "example": "075b0b5c-a1f4-46da-9aca-92fb6dd5905d" }, - "roles": { - "type": "array", - "description": "User's roles.", - "example": [ - "role_admin" - ], - "items": { - "type": "string" - } + "name": { + "type": "string", + "description": "The name of the basic discount.", + "example": "Staff discount", + "maxLength": 100 }, - "permissions": { - "type": "array", - "description": "User's permissions.", - "deprecated": true, - "x-deprecation-notice": "Permissions include only legacy permissions, please use roles instead. Member access is based on roles within a given resource and the permissions these roles grant.", - "items": { - "type": "string" - }, - "example": [ - "members_read", - "members_write", - "create_moto_payments", - "full_transaction_history_view", - "refund_transactions", - "create_referral", - "developer_settings_edit", - "developer_settings_access" - ] + "description": { + "type": [ + "string", + "null" + ], + "description": "The description of the loyalty discount.", + "example": "10% off food for staff members.", + "maxLength": 250 }, - "created_at": { + "application_mode": { + "$ref": "#/components/schemas/DiscountApplicationMode" + } + } + }, + "DiscountClass": { + "type": [ + "string", + "null" + ], + "description": "The method used to target items to discount.\nMust be populated for ITEM level discounts, and must be null for CART level discounts (CART level targets all\nitems, therefore none of these categories apply).\n", + "enum": [ + "ITEM", + "CATEGORY", + "BUNDLE", + "BUY_X_GET_Y", + "MEAL_DEAL" + ], + "example": "ITEM" + }, + "DiscountSourceCoupon": { + "type": "object", + "description": "Discount applied manually when entering a coupon code at checkout.", + "required": [ + "id", + "code", + "name", + "application_mode" + ], + "properties": { + "id": { "type": "string", - "description": "The timestamp of when the member was created.", - "format": "date-time", - "example": "2023-01-20T15:16:17Z" + "format": "uuid", + "description": "The unique identifier of the coupon discount.", + "example": "075b0b5c-a1f4-46da-9aca-92fb6dd5905d" }, - "updated_at": { + "code": { "type": "string", - "description": "The timestamp of when the member was last updated.", - "format": "date-time", - "example": "2023-01-20T15:16:17Z" - }, - "user": { - "$ref": "#/components/schemas/MembershipUser" + "description": "The coupon code.", + "example": "FREE_COFFEE", + "maxLength": 100 }, - "invite": { - "$ref": "#/components/schemas/Invite" + "name": { + "type": "string", + "description": "The name of the coupon discount.", + "example": "Free coffee", + "maxLength": 100 }, - "status": { - "$ref": "#/components/schemas/MembershipStatus" + "description": { + "type": [ + "string", + "null" + ], + "description": "The description of the coupon discount.", + "example": "Free coffee with this coupon.", + "maxLength": 250 }, - "metadata": { - "$ref": "#/components/schemas/Metadata" + "discount_class": { + "$ref": "#/components/schemas/DiscountClass" }, - "attributes": { - "$ref": "#/components/schemas/Attributes" + "application_mode": { + "$ref": "#/components/schemas/DiscountApplicationMode" } - }, - "example": { - "id": "mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP", - "roles": [ - "role_admin", - "role_owner" - ], - "permissions": [ - "members_read", - "members_write", - "create_moto_payments", - "full_transaction_history_view", - "refund_transactions", - "create_referral", - "developer_settings_edit", - "developer_settings_access" - ], - "created_at": "2023-01-20T15:16:17Z", - "updated_at": "2023-02-20T15:16:17Z", - "user": { - "id": "44ca0f5b-813b-46e1-aee7-e6242010662e", - "email": "example@sumup.com", - "mfa_on_login_enabled": true, - "virtual_user": false, - "service_account_user": false - }, - "status": "accepted" } }, - "Invite": { - "title": "Invite", + "DiscountSourceOffer": { "type": "object", - "description": "Pending invitation for membership.", + "description": "Discount applied automatically when cart is updated based on preset promotions.", "required": [ - "email", - "expires_at" + "id", + "name", + "application_mode" ], "properties": { - "email": { + "id": { "type": "string", - "description": "Email address of the invited user.", - "format": "email", - "example": "boaty.mcboatface@sumup.com" + "format": "uuid", + "description": "The unique identifier of the offer discount.", + "example": "075b0b5c-a1f4-46da-9aca-92fb6dd5905d" }, - "expires_at": { + "name": { "type": "string", - "format": "date-time", - "example": "2023-01-20T15:16:17Z" + "description": "The name of the offer discount.", + "example": "Breakfast combo deal", + "maxLength": 100 + }, + "description": { + "type": [ + "string", + "null" + ], + "description": "The description of the offer discount.", + "example": "Buy a Croissant, get a coffee for £1", + "maxLength": 250 + }, + "discount_class": { + "$ref": "#/components/schemas/DiscountClass" + }, + "application_mode": { + "$ref": "#/components/schemas/DiscountApplicationMode" } } }, - "MembershipUser": { + "DiscountSourceLoyaltyType": { + "type": "string", + "description": "The type of loyalty discount, either a promotion (e.g. new customer discount) or a reward (free coffee after completing stamp card).", + "enum": [ + "PROMOTION", + "REWARD" + ], + "example": "REWARD" + }, + "DiscountSourceLoyaltySchemeType": { + "type": "string", + "description": "The scheme type of the loyalty program.", + "enum": [ + "STAMPS", + "POINTS" + ], + "example": "POINTS" + }, + "DiscountSourceLoyalty": { "type": "object", - "description": "Information about the user associated with the membership.", + "description": "Discount applied when redeeming a reward from the merchant's loyalty scheme.", "required": [ "id", - "type", - "email", - "mfa_on_login_enabled", - "virtual_user", - "service_account_user" + "name", + "loyalty_type", + "scheme_type", + "application_mode" ], "properties": { "id": { "type": "string", - "description": "Identifier for the End-User (also called Subject).", - "example": "44ca0f5b-813b-46e1-aee7-e6242010662e" + "format": "uuid", + "description": "The unique identifier of the promotion or reward.", + "example": "075b0b5c-a1f4-46da-9aca-92fb6dd5905d" }, - "type": { - "$ref": "#/components/schemas/UserType" + "loyalty_type": { + "$ref": "#/components/schemas/DiscountSourceLoyaltyType" }, - "email": { + "scheme_type": { + "$ref": "#/components/schemas/DiscountSourceLoyaltySchemeType" + }, + "points": { + "type": [ + "integer", + "null" + ], + "format": "int64", + "minimum": 1, + "description": "The number of points used for this loyalty discount.\nMust be a positive integer if the scheme type is POINTS.\nMust not be populated if the scheme type is STAMPS.\n", + "example": 50 + }, + "name": { "type": "string", - "example": "example@sumup.com", - "description": "End-User's preferred e-mail address. Its value MUST conform to the RFC 5322 [RFC5322] addr-spec syntax. The RP MUST NOT rely upon this value being unique, for unique identification use ID instead." + "description": "The name of the loyalty discount.", + "example": "Free coffee", + "maxLength": 100 }, - "mfa_on_login_enabled": { - "type": "boolean", - "example": true, - "description": "True if the user has enabled MFA on login." + "description": { + "type": [ + "string", + "null" + ], + "description": "The description of the loyalty discount.", + "example": "Free coffee for 50 points", + "maxLength": 250 }, - "virtual_user": { - "type": "boolean", - "deprecated": true, - "x-deprecation-notice": "Rely on `type` instead.", - "example": false, - "description": "True if the user is a virtual user (operator)." + "discount_class": { + "$ref": "#/components/schemas/DiscountClass" }, - "service_account_user": { - "type": "boolean", - "deprecated": true, - "x-deprecation-notice": "Rely on `type` instead.", - "example": false, - "description": "True if the user is a service account." + "application_mode": { + "$ref": "#/components/schemas/DiscountApplicationMode" + } + } + }, + "DiscountSource": { + "type": "object", + "description": "The source of discount. Exactly one property must be set.", + "properties": { + "ad_hoc": { + "$ref": "#/components/schemas/DiscountSourceAdHoc" }, - "disabled_at": { - "type": "string", - "format": "date-time", - "description": "Time when the user has been disabled. Applies only to virtual users (`virtual_user: true`)." + "basic": { + "$ref": "#/components/schemas/DiscountSourceBasic" }, - "nickname": { - "type": "string", - "example": "Test User", - "description": "User's nickname. Used for display purposes only." + "coupon": { + "$ref": "#/components/schemas/DiscountSourceCoupon" }, - "picture": { - "type": "string", - "format": "uri", - "example": "https://usercontent.sumup.com/44ca0f5b-813b-46e1-aee7-e6242010662e.png", - "description": "URL of the End-User's profile picture. This URL refers to an image file (for example, a PNG, JPEG, or GIF image file), rather than to a Web page containing an image." + "offer": { + "$ref": "#/components/schemas/DiscountSourceOffer" }, - "classic": { - "$ref": "#/components/schemas/MembershipUserClassic" + "loyalty": { + "$ref": "#/components/schemas/DiscountSourceLoyalty" } } }, - "MembershipUserClassic": { + "DiscountValue": { "type": "object", - "description": "Classic identifiers of the user.", - "deprecated": true, - "required": [ - "user_id" - ], + "description": "The value type of the discount, either a percentage based or absolute monetary value.\n\nIt is required that only one of the following is set:\n- absolute\n- percentage.", "properties": { - "user_id": { + "absolute": { + "description": "The absolute value in minor units of the currency according to the Sale.currency.scale.\nExample: 10000 = 10.00\n", + "allOf": [ + { + "$ref": "#/components/schemas/PositiveAmount" + } + ] + }, + "percentage": { "type": "integer", + "format": "int64", "minimum": 0, - "maximum": 2147483647 + "description": "The percentage in minor units (1/100000).\n\nExamples:\n- 10% -\u003e 0.10 (decimal) = 10000 (minor units)\n- 15.5% -\u003e 0.155 (decimal) = 15500 (minor units)\n- 0.001% -\u003e 0.00001 (decimal) = 1 (minor units)\n", + "example": 10000 } } }, - "Role": { - "title": "Role", + "DiscountLine": { "type": "object", - "description": "A custom role that can be used to assign set of permissions to members.", + "description": "Object representing information about single discount line.", "required": [ - "id", - "name", - "permissions", - "is_predefined", - "created_at", - "updated_at" + "level", + "source", + "value", + "net_amount", + "gross_amount", + "tax_amount" ], "properties": { "id": { "type": "string", - "description": "Unique identifier of the role.", - "example": "role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP" - }, - "name": { - "type": "string", - "example": "Senior Shop Manager II", - "description": "User-defined name of the role." + "description": "An id used to associate a discount line with a specific discount.\nSince we can apply multiple discounts (e.g. 2x 10% whole cart off) \nwe need to be able to identify which discount line belongs to which cart discount.\nRecommended to use UUID identifiers.", + "example": "075b0b5c-a1f4-46da-9aca-92fb6dd5905d", + "maxLength": 100 }, "description": { "type": "string", - "example": "Manges the shop and the employees.", - "description": "User-defined description of the role." + "description": "A description or reason of the discount.", + "example": "Happy Hour", + "maxLength": 250 }, - "permissions": { - "type": "array", - "description": "List of permission granted by this role.", - "maxItems": 100, - "items": { - "type": "string" - }, - "example": [] + "level": { + "$ref": "#/components/schemas/DiscountLevel" }, - "is_predefined": { - "type": "boolean", - "example": true, - "description": "True if the role is provided by SumUp." + "source": { + "$ref": "#/components/schemas/DiscountSource" }, - "metadata": { - "$ref": "#/components/schemas/Metadata" + "value": { + "$ref": "#/components/schemas/DiscountValue" }, - "created_at": { - "type": "string", - "description": "The timestamp of when the role was created.", - "format": "date-time", - "example": "2023-01-20T15:16:17Z" + "net_amount": { + "description": "The net amount of the discount.\nThe value of the amount in minor units of the currency according to the Sale.currency.scale.\n", + "allOf": [ + { + "$ref": "#/components/schemas/PositiveAmount" + } + ] }, - "updated_at": { - "type": "string", - "description": "The timestamp of when the role was last updated.", - "format": "date-time", - "example": "2023-01-20T15:16:17Z" + "gross_amount": { + "description": "The gross amount of the discount.\nThe value of the amount in minor units of the currency according to the Sale.currency.scale.\n", + "allOf": [ + { + "$ref": "#/components/schemas/PositiveAmount" + } + ] + }, + "tax_amount": { + "description": "The tax amount of the discount.\nThe value of the amount in minor units of the currency according to the Sale.currency.scale.\n", + "allOf": [ + { + "$ref": "#/components/schemas/PositiveAmount" + } + ] } } }, - "Metadata": { - "description": "Set of user-defined key-value pairs attached to the object. Partial updates are not supported. When updating, always submit whole metadata. Maximum of 64 parameters are allowed in the object.", - "type": "object", - "maxProperties": 64, - "example": {}, - "additionalProperties": true - }, - "Attributes": { - "description": "Object attributes that are modifiable only by SumUp applications.\n", - "type": "object", - "example": {}, - "additionalProperties": true - }, - "UserType": { - "type": "string", - "description": "Type of the user account.", - "enum": [ - "user", - "managed_user", - "service_account", - "system_account" - ], - "example": "user" - }, - "Address": { - "externalDocs": { - "description": "Address documentation", - "url": "https://developer.sumup.com/tools/glossary/address" - }, - "description": "An address somewhere in the world. The address fields used depend on the country conventions. For example, in Great Britain, `city` is `post_town`. In the United States, the top-level administrative unit used in addresses is `state`, whereas in Chile it's `region`.\nWhether an address is valid or not depends on whether the locally required fields are present. Fields not supported in a country will be ignored.", + "LineItemPriceV10": { "type": "object", + "description": "Pricing for a single line, valid for every item type.\n\nMerges the standard amounts (with tax breakdown) and the final amounts (after\ndiscounts/modifiers).\n\nTotals and tax amounts can be negative for return-like operations (for example\na deposit with `operation_type` = `RETURN`).", "required": [ - "country" + "unit_amount", + "total_net_amount", + "total_gross_amount", + "taxes", + "total_net_amount_final", + "total_gross_amount_final", + "taxes_final" ], "properties": { - "street_address": { - "type": "array", - "maxItems": 2, - "items": { - "type": "string", - "description": "The first line of the address.", - "maxLength": 100 - }, - "example": [ - "Paul-Linke-Ufer 39-40", - "2. Hinterhof" - ] + "unit_amount": { + "description": "The price of a single unit. If the tax_mode is GROSS it includes taxes,\notherwise no tax is included. It does NOT include discounts.\n", + "allOf": [ + { + "$ref": "#/components/schemas/PositiveAmount" + } + ], + "example": 300 }, - "post_code": { - "type": "string", - "description": "The postal code (aka. zip code) of the address.\n", - "maxLength": 10, - "example": "10999" + "total_net_amount": { + "description": "The net amount (including modifiers if applied). It does NOT include discounts.", + "allOf": [ + { + "$ref": "#/components/schemas/Amount" + } + ], + "example": 252 }, - "country": { + "total_gross_amount": { + "description": "The gross amount (including modifiers if applied). It does NOT include discounts.", "allOf": [ { - "description": "The ISO3166-1 Alpha-2 code of the address country.\n", - "example": "DE" - }, + "$ref": "#/components/schemas/Amount" + } + ], + "example": 300 + }, + "taxes": { + "type": "array", + "minItems": 1, + "maxItems": 1000, + "description": "Taxes applied on top of the net amount resulting in the gross amount.", + "items": { + "$ref": "#/components/schemas/TaxLine" + }, + "example": [ { - "$ref": "#/components/schemas/CountryCode" + "id": "tax-vat-19", + "net_amount": 252, + "gross_amount": 300, + "tax_amount": 48 } ] }, - "city": { - "type": "string", - "description": "The city of the address.\n", - "maxLength": 60, - "example": "Berlin" - }, - "province": { - "type": "string", - "description": "The province where the address is located. This may not be relevant in some countries.\n", - "maxLength": 60, - "example": "Berlin" - }, - "region": { - "type": "string", - "description": "The region where the address is located. This may not be relevant in some countries.\n", - "maxLength": 60, - "example": "Baden Wuerttemberg" - }, - "county": { - "type": "string", - "description": "A county is a geographic region of a country used for administrative or other purposes in some nations. Used in countries such as Ireland, Romania, etc.\n", - "maxLength": 60, - "example": "Dublin County" - }, - "autonomous_community": { - "type": "string", - "description": "In Spain, an autonomous community is the first sub-national level of political and administrative division.\n", - "maxLength": 60, - "example": "Catalonia" - }, - "post_town": { - "type": "string", - "description": "A post town is a required part of all postal addresses in the United Kingdom and Ireland, and a basic unit of the postal delivery system.\n", - "maxLength": 60, - "example": "London" - }, - "state": { - "type": "string", - "description": "Most often, a country has a single state, with various administrative divisions. The term \"state\" is sometimes used to refer to the federated polities that make up the federation. Used in countries such as the United States and Brazil.\n", - "maxLength": 60, - "example": "California" - }, - "neighborhood": { - "type": "string", - "description": "Locality level of the address. Used in countries such as Brazil or Chile.\n", - "maxLength": 60, - "example": "Copacabana" - }, - "commune": { - "type": "string", - "description": "In many countries, terms cognate with \"commune\" are used, referring to the community living in the area and the common interest. Used in countries such as Chile.\n", - "maxLength": 60, - "example": "Providencia" + "discounts": { + "type": "array", + "maxItems": 1000, + "description": "Discounts applied. Discount amounts do not affect `total_net_amount` /\n`total_gross_amount`; they are reflected in the `*_final` amounts.\n", + "items": { + "$ref": "#/components/schemas/DiscountLine" + }, + "example": [] }, - "department": { - "type": "string", - "description": "A department (French: département, Spanish: departamento) is an administrative or political division in several countries. Used in countries such as Colombia.\n", - "maxLength": 60, - "example": "Antioquia" + "total_net_amount_final": { + "description": "The final net amount including discounts and modifiers. Equals `total_net_amount` if no discounts apply.", + "allOf": [ + { + "$ref": "#/components/schemas/Amount" + } + ], + "example": 210 }, - "municipality": { - "type": "string", - "description": "A municipality is usually a single administrative division having corporate status and powers of self-government or jurisdiction as granted by national and regional laws to which it is subordinate. Used in countries such as Colombia.\n", - "maxLength": 60, - "example": "Medellín" + "total_gross_amount_final": { + "description": "The final gross amount including discounts, modifiers and taxes. Equals `total_gross_amount` if no discounts apply.", + "allOf": [ + { + "$ref": "#/components/schemas/Amount" + } + ], + "example": 250 }, - "district": { + "taxes_final": { + "type": "array", + "minItems": 1, + "maxItems": 1000, + "description": "Taxes applied on top of `total_net_amount_final` resulting in `total_gross_amount_final`. Equals `taxes` if no discounts apply.", + "items": { + "$ref": "#/components/schemas/TaxLine" + }, + "example": [ + { + "id": "tax-vat-19", + "net_amount": 210, + "gross_amount": 250, + "tax_amount": 40 + } + ] + } + } + }, + "CategoryV10": { + "type": "object", + "description": "A category a line belongs to.", + "required": [ + "id", + "name" + ], + "properties": { + "id": { "type": "string", - "description": "A district is a type of administrative division that in some countries is managed by the local government. Used in countries such as Portugal.\n", - "maxLength": 60, - "example": "Lisbon District" + "maxLength": 100, + "description": "The category id. Usually a UUID, but not always (legacy cases).", + "example": "b064ed44-66e1-45a1-a963-b783808f0436" }, - "zip_code": { + "name": { "type": "string", - "description": "A US system of postal codes used by the United States Postal Service (USPS).\n", - "maxLength": 10, - "example": "94103" + "maxLength": 30, + "description": "The category name.", + "example": "Food" + } + } + }, + "PriceAmounts": { + "description": "Base price information for items including unit amount and totals.", + "type": "object", + "required": [ + "unit_amount", + "total_net_amount", + "total_gross_amount" + ], + "properties": { + "unit_amount": { + "description": "The price of a single unit.\nIf the tax_mode is GROSS, it includes taxes, otherwise no tax included.\nIt doesn't include discounts.\n", + "allOf": [ + { + "$ref": "#/components/schemas/PositiveAmount" + } + ] }, - "eircode": { - "type": "string", - "description": "A postal address in Ireland.\n", - "maxLength": 10, - "example": "D02 X285" + "total_net_amount": { + "description": "The net amount (including modifiers if applied). It does NOT include discounts.", + "allOf": [ + { + "$ref": "#/components/schemas/Amount" + } + ] + }, + "total_gross_amount": { + "description": "The gross amount (including modifiers if applied). It does NOT include discounts.", + "allOf": [ + { + "$ref": "#/components/schemas/Amount" + } + ] } - }, - "example": { - "street_address": [ - "Paul-Linke-Ufer 39-40", - "2. Hinterhof" - ], - "post_code": "10999", - "city": "Berlin", - "country": "DE" } }, - "CountryCode": { - "description": "An [ISO3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)\ncountry code. This definition users `oneOf` with a two-character string\ntype to allow for support of future countries in client code.", - "type": "string", - "minLength": 2, - "maxLength": 2, - "pattern": "^[A-Z]{2}$", - "example": "BR" + "PositivePriceAmounts": { + "description": "Price information for items with positive amounts only.", + "allOf": [ + { + "$ref": "#/components/schemas/PriceAmounts" + }, + { + "type": "object", + "properties": { + "total_net_amount": { + "$ref": "#/components/schemas/PositiveAmount" + }, + "total_gross_amount": { + "$ref": "#/components/schemas/PositiveAmount" + } + } + } + ] }, - "PersonalIdentifiers": { - "type": "array", - "description": "A list of country-specific personal identifiers.", - "items": { - "$ref": "#/components/schemas/PersonalIdentifier" - }, - "maxItems": 32, - "example": [ + "PositiveTaxLine": { + "description": "Tax line with positive amounts only.\nInformation about tax together with amounts before and after its application such as:\n - net amount: taxable net amount, scoped by this tax\n - gross amount: amount after applying the tax\nThe numbers here can't be negative.", + "allOf": [ { - "ref": "br.cpf", - "value": "847.060.136-90" + "$ref": "#/components/schemas/TaxLine" + }, + { + "type": "object", + "properties": { + "net_amount": { + "description": "Net amount before applying the tax. \nThe value of the amount in minor units of the currency according to the Sale.currency.scale.\n", + "allOf": [ + { + "$ref": "#/components/schemas/PositiveAmount" + } + ] + }, + "gross_amount": { + "description": "Gross amount after applying the tax.\nThe value of the amount in minor units of the currency according to the Sale.currency.scale.\n", + "allOf": [ + { + "$ref": "#/components/schemas/PositiveAmount" + } + ] + }, + "tax_amount": { + "description": "Amount of tax.\nThe value of the amount in minor units of the currency according to the Sale.currency.scale.\n", + "allOf": [ + { + "$ref": "#/components/schemas/PositiveAmount" + } + ] + } + } } ] }, - "PersonalIdentifier": { + "PositivePriceWithTaxes": { + "description": "Price information with positive amounts and detailed tax breakdown.", + "allOf": [ + { + "$ref": "#/components/schemas/PositivePriceAmounts" + }, + { + "type": "object", + "required": [ + "taxes" + ], + "properties": { + "taxes": { + "type": "array", + "minItems": 1, + "maxItems": 1000, + "description": "Taxes applied on top of net amount resulting in gross amount.", + "items": { + "$ref": "#/components/schemas/PositiveTaxLine" + } + } + } + } + ] + }, + "FinalPriceAmounts": { + "description": "Final price amounts after all calculations and adjustments.", "type": "object", "required": [ - "ref", - "value" + "total_net_amount_final", + "total_gross_amount_final", + "taxes_final" ], "properties": { - "ref": { - "type": "string", - "description": "The unique reference for the personal identifier type.", - "example": "br.cpf", - "maxLength": 32 + "discounts": { + "type": "array", + "maxItems": 1000, + "description": "Discounts applied.\n\nImportant: \nDiscount amounts shouldn't take effect on net and gross amounts.\n\nDiscount money amounts depend on where discount was applied:\n - for item level discount: whole discount money amount is applied\n - for cart level discount: only part of the whole amount is applied \n (discount money value is split on each line item)\n", + "items": { + "$ref": "#/components/schemas/DiscountLine" + } }, - "value": { - "type": "string", - "description": "The personal identifier value.", - "example": "847.060.136-90", - "maxLength": 128 + "total_net_amount_final": { + "description": "The final net amount includes discounts and modifiers. It does NOT include taxes. If no discounts are applied, it should be equal to total_net_amount.", + "allOf": [ + { + "$ref": "#/components/schemas/PositiveAmount" + } + ] + }, + "total_gross_amount_final": { + "description": "The final gross amount includes discounts, modifiers, and taxes. If no discounts are applied, it should be equal to total_gross_amount.", + "allOf": [ + { + "$ref": "#/components/schemas/PositiveAmount" + } + ] + }, + "taxes_final": { + "type": "array", + "minItems": 1, + "maxItems": 1000, + "description": "Taxes applied on top of `total_net_amount_final` amount resulting in `total_gross_amount_final` amount.\nIf no discounts are applied, it should be equal to `taxes`.\n", + "items": { + "$ref": "#/components/schemas/PositiveTaxLine" + } } - }, - "example": { - "ref": "br.cpf", - "value": "847.060.136-90" } }, - "ListPersonsResponseBody": { + "ModifierSet": { "type": "object", + "description": "Modifier set attached to an item.", "required": [ - "items" + "id", + "name" ], "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Person" - } + "id": { + "type": "string", + "maxLength": 100, + "description": "The id of the modifier set that modifier belongs to.", + "example": "b064ed44-66e1-45a1-a963-b783808f0436" + }, + "name": { + "type": "string", + "minLength": 1, + "maxLength": 150, + "description": "The name of the modifier set that the modifier belongs to.", + "example": "Burger Toppings" } } }, - "Merchant": { - "title": "Merchant", - "externalDocs": { - "description": "Merchant documentation", - "url": "https://developer.sumup.com/tools/glossary/merchant" - }, + "ModifierItem": { + "type": "object", + "description": "Modifiers are reported under line items and can be build from Item Catalog objects.\nModifiers has to be attached to an item and can't be sold and refunded alone.", "allOf": [ { - "type": "object", - "required": [ - "merchant_code", - "country", - "default_currency", - "default_locale" - ], - "properties": { - "merchant_code": { - "type": "string", - "readOnly": true, - "description": "Short unique identifier for the merchant.", - "example": "MK01A8C2" - }, - "organization_id": { - "type": "string", - "description": "ID of the organization the merchant belongs to (if any).", - "example": "G0UZPVAX" - }, - "business_type": { - "type": "string", - "description": "The business type.\n* `sole_trader`: The business is run by an self-employed individual.\n* `company`: The business is run as a company with one or more shareholders\n* `partnership`: The business is run as a company with two or more shareholders that can be also other legal entities\n* `non_profit`: The business is run as a nonprofit organization that operates for public or social benefit\n* `government_entity`: The business is state owned and operated\n" - }, - "company": { - "$ref": "#/components/schemas/Company" - }, - "country": { - "$ref": "#/components/schemas/CountryCode" - }, - "business_profile": { - "$ref": "#/components/schemas/BusinessProfile" - }, - "avatar": { - "type": "string", - "format": "uri", - "description": "A user-facing small-format logo for use in dashboards and other user-facing applications. For customer-facing branding see `merchant.business_profile.branding`.\n" - }, - "alias": { - "type": "string", - "description": "A user-facing name of the merchant account for use in dashboards and other user-facing applications. For customer-facing business name see `merchant.business_profile`.\n" - }, - "default_currency": { - "type": "string", - "readOnly": true, - "description": "Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217) representing the default currency for the account.\n", - "example": "EUR", - "minLength": 3, - "maxLength": 3 - }, - "default_locale": { + "$ref": "#/components/schemas/PositivePriceWithTaxes" + }, + { + "$ref": "#/components/schemas/FinalPriceAmounts" + }, + { + "type": "object", + "required": [ + "id", + "name", + "set", + "quantity" + ], + "properties": { + "id": { "type": "string", - "description": "Merchant's default locale, represented as a BCP47 [RFC5646](https://datatracker.ietf.org/doc/html/rfc5646) language tag. This is typically an ISO 639-1 Alpha-2 [ISO639‑1](https://www.iso.org/iso-639-language-code) language code in lowercase and an ISO 3166-1 Alpha-2 [ISO3166‑1](https://www.iso.org/iso-3166-country-codes.html) country code in uppercase, separated by a dash. For example, en-US or fr-CA.\nIn multilingual countries this is the merchant's preferred locale out of those, that are officially spoken in the country. In a countries with a single official language this will match the official language.", - "example": "de-DE", - "minLength": 2, - "maxLength": 5 - }, - "sandbox": { - "type": "boolean", - "description": "True if the merchant is a sandbox for testing.", - "example": false - }, - "meta": { - "$ref": "#/components/schemas/Meta" + "maxLength": 100, + "description": "Modifier id, coming from the Item Catalog", + "example": "b064ed44-66e1-45a1-a963-b783808f0436" }, - "classic": { - "$ref": "#/components/schemas/ClassicMerchantIdentifiers" + "name": { + "type": "string", + "description": "Modifier name, coming from the Item Catalog", + "example": "Extra Cheese", + "maxLength": 150 }, - "version": { - "$ref": "#/components/schemas/Version" + "set": { + "$ref": "#/components/schemas/ModifierSet" }, - "change_status": { - "$ref": "#/components/schemas/ChangeStatus" + "quantity": { + "$ref": "#/components/schemas/Quantity" } } - }, - { - "$ref": "#/components/schemas/Timestamps" } ] }, - "Meta": { - "type": "object", - "additionalProperties": { - "type": "string", - "maxLength": 256 - }, - "description": "A set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.\n\n**Warning**: Updating Meta will overwrite the existing data. Make sure to always include the complete JSON object.", - "example": {} - }, - "BusinessProfile": { + "ItemReferencesV10": { "type": "object", - "description": "Business information about the merchant. This information will be visible to the merchant's customers.\n", + "description": "Outward identifiers and links for a line, kept in one place rather than scattered\nper item type.", "properties": { - "name": { - "type": "string", - "description": "The customer-facing business name.", - "minLength": 1, - "maxLength": 150, - "example": "Example Coffee" - }, - "dynamic_descriptor": { + "catalog_source": { "type": "string", - "minLength": 1, - "maxLength": 30, - "pattern": "^[a-zA-Z0-9 +'_.-]+$", - "description": "The descriptor is the text that your customer sees on their bank account statement.\nThe more recognisable your descriptor is, the less risk you have of receiving disputes (e.g. chargebacks).\n", - "example": "Example Coffee" + "description": "The source of the catalog the line originates from.", + "enum": [ + "SUMUP", + "EXTERNAL" + ], + "default": "SUMUP", + "example": "SUMUP" }, - "website": { + "catalog_reference": { "type": "string", - "description": "The business's publicly available website.", - "minLength": 1, + "description": "Reference to the backing catalog entity (item variant, deposit, ...),\ntypically a URN such as\n`urn:sumup:pos:variant:${MERCHANT_CODE}:${ITEM_ID}:${VARIANT_ID}` or\n`urn:sumup:pos:deposit:${MERCHANT_CODE}:${DEPOSIT_ID}`.\nEmpty for ad-hoc / manual lines. Type-agnostic on purpose: a new item type\nbacked by a catalog entity reuses this field instead of adding its own.", "maxLength": 255, - "example": "https://example.com" + "example": "urn:sumup:pos:variant:MCGLE7VC:9736e947-6f1f-487f-846a-c5954fb06a5a:7fff192f-ce29-4673-890f-2d68ba557946" }, - "email": { + "external_id": { "type": "string", - "description": "A publicly available email address.", - "minLength": 1, - "maxLength": 255, - "example": "contact@example.com" - }, - "phone_number": { - "$ref": "#/components/schemas/PhoneNumber" - }, - "address": { - "$ref": "#/components/schemas/Address" + "description": "An external reference id connecting this line to another system.", + "maxLength": 250, + "example": "POS-LINE-001" }, - "branding": { - "$ref": "#/components/schemas/Branding" + "sku": { + "type": "string", + "description": "Stock keeping unit, enriched from the Catalog when available.", + "maxLength": 100, + "example": "COFFEE-LARGE" } } }, - "Person": { - "allOf": [ - { - "$ref": "#/components/schemas/BasePerson" - } - ] - }, - "PhoneNumber": { + "FeatureValueTypeV10": { "type": "string", - "description": "A publicly available phone number in [E.164](https://en.wikipedia.org/wiki/E.164) format.\n", - "example": "+420123456789", - "maxLength": 16 + "description": "The data type of a feature value. The wire `value` is always a string and is parsed\naccording to this type.", + "enum": [ + "TEXT", + "INTEGER", + "DECIMAL", + "DATE", + "BOOLEAN" + ], + "example": "TEXT" }, - "Branding": { + "FeatureV10": { "type": "object", - "description": "Settings used to apply the Merchant's branding to email receipts, invoices, checkouts, and other products.", + "description": "A named, typed characteristic of a line. New item types add data here instead of\na typed sub-object per type.\n\nExamples by item type (illustrative, not exhaustive):\n - DEPOSIT: `operation_type` = \"SALE\", `linked_line_id` = \"line-1\"\n - GIFT_CARD: `gift_card_reference` = \"GCMINGXPC5\"\n - CATALOG: `variant_name` = \"Large\", `item_id` / `variant_id` (TEXT),\n `reporting_category_id` = \"cat-...\"\n - FEE: `fee_type` = \"SHIPPING\" (required); optional `fee_id`,\n `value_absolute` or `value_percentage`, and per-type metadata\n features such as `delivery_name` / `tracking_reference` (shipping),\n `card_type` / `scheme` (surcharge), or `policy_id` (cancellation)\n - (future) SUBSCRIPTION: `billing_period` = \"P1M\", `renews_at` = \"2026-07-02\"\n\nConventional `FEE` feature keys:\n - `fee_type` (TEXT, required): `SHIPPING`, `SURCHARGE`, `SERVICE_CHARGE`, or\n `CANCELLATION`\n - `fee_id` (TEXT, optional): identifier of the fee definition\n - `value_absolute` (INTEGER, optional): configured absolute value in minor units\n of the sale currency (the charged amount is on `price`)\n - `value_percentage` (INTEGER, optional): configured percentage in minor units\n (1/100000; e.g. 10000 = 10%)\n - Per-type metadata (optional, TEXT unless noted): `delivery_name`,\n `tracking_reference` (shipping); `card_type`, `scheme` (surcharge);\n `policy_id` (cancellation)", + "required": [ + "name", + "value_type", + "value" + ], "properties": { - "footer_text": { + "name": { "type": "string", - "description": "Footer text rendered on receipts and other customer-facing products.\n", - "minLength": 1, - "maxLength": 500, - "examples": [ - "Thanks for shopping with us." - ] + "description": "The feature name/key.", + "maxLength": 100, + "example": "operation_type" }, - "icon": { - "type": "string", - "format": "uri", - "description": "An icon for the merchant. Must be square.\n" + "value_type": { + "$ref": "#/components/schemas/FeatureValueTypeV10" }, - "logo": { + "value": { "type": "string", - "format": "uri", - "description": "A logo for the merchant that will be used in place of the icon and without the merchant's name next to it if there's sufficient space.\n" - }, - "hero": { + "description": "The feature value in canonical string form, to be parsed per `value_type`\n(e.g. INTEGER -\u003e \"3\", DECIMAL -\u003e \"1.50\", DATE -\u003e \"2026-07-02\",\nBOOLEAN -\u003e \"true\"). Carrying it as a string keeps the wire format stable as\nnew feature names and value types are introduced.", + "maxLength": 1000, + "example": "SALE" + } + } + }, + "SaleLineItemV10": { + "type": "object", + "description": "A single line of a sale.\n\nThe envelope (id, type, name, quantity, unit_of_measure, price) is stable and\ntype-agnostic: any consumer can render and total a line from these fields alone.\nType-specific data is in `features`. There is no per-type object and no discriminator,\nso a new item type does not change this schema.", + "required": [ + "id", + "type", + "name", + "quantity", + "unit_of_measure", + "price" + ], + "properties": { + "id": { "type": "string", - "format": "uri", - "description": "Data-URL encoded hero image for the merchant business.\n" + "description": "Stable identifier of the line within the sale. Used for linking (e.g. deposits).", + "maxLength": 100, + "example": "line-1" }, - "primary_color": { + "type": { + "$ref": "#/components/schemas/ItemTypeV10" + }, + "name": { "type": "string", - "description": "A hex color value representing the primary branding color of this merchant (your brand color).\n", - "examples": [ - "#FF4B3A", - "#0072C6", - "#F68B20" - ] + "description": "Display name of the line.", + "maxLength": 250, + "example": "Cappuccino" }, - "primary_color_fg": { + "quantity": { + "$ref": "#/components/schemas/Quantity" + }, + "unit_of_measure": { + "$ref": "#/components/schemas/UnitOfMeasure" + }, + "service_type": { "type": "string", - "description": "A hex color value representing the color of the text displayed on branding color of this merchant.\n", - "examples": [ - "#FF4B3A", - "#0072C6", - "#F68B20" - ] + "description": "The type of service for this line.", + "enum": [ + "IN_HOUSE", + "TAKE_AWAY" + ], + "example": "IN_HOUSE" }, - "secondary_color": { + "note": { "type": "string", - "description": "A hex color value representing the secondary branding color of this merchant (accent color used for buttons).\n", - "examples": [ - "#FF4B3A", - "#0072C6", - "#F68B20" + "maxLength": 300, + "description": "Optional free-text note attached to the line, visible on receipts.", + "example": "extra hot" + }, + "price": { + "$ref": "#/components/schemas/LineItemPriceV10" + }, + "categories": { + "type": "array", + "description": "Categories the line belongs to. A shared optional structure available to any\nline; not a per-type field.\n", + "maxItems": 1000, + "items": { + "$ref": "#/components/schemas/CategoryV10" + }, + "example": [ + { + "id": "cat-hot-drinks", + "name": "Hot Drinks" + } ] }, - "secondary_color_fg": { - "type": "string", - "description": "A hex color value representing the color of the text displayed on secondary branding color of this merchant.\n", - "examples": [ - "#FF4B3A", - "#0072C6", - "#F68B20" + "modifiers": { + "type": "array", + "description": "Modifiers customise a line (e.g. \"oat milk\" on a cappuccino). A shared\noptional structure available to any line; not a per-type field.\n", + "maxItems": 50, + "items": { + "$ref": "#/components/schemas/ModifierItem" + }, + "example": [] + }, + "references": { + "$ref": "#/components/schemas/ItemReferencesV10" + }, + "features": { + "type": "array", + "description": "Named, typed, type-specific data. New item types add their data here as\nfeatures instead of new schema variants. See `Feature` for per-type examples.\n", + "maxItems": 100, + "items": { + "$ref": "#/components/schemas/FeatureV10" + }, + "example": [ + { + "name": "variant_name", + "value_type": "TEXT", + "value": "Large" + } ] + } + } + }, + "SalePriceV10": { + "type": "object", + "description": "Sale-level pricing aggregate, parallel to `LineItemPrice` on each `SaleLineItem`.\n\nLine-level breakdown (unit price, line discounts, per-line taxes) lives on\n`items[].price`. This object holds the rolled-up totals and cart-level\nadjustments that consumers use for receipts and payment reconciliation.", + "required": [ + "net_amount", + "gross_amount", + "taxes" + ], + "properties": { + "net_amount": { + "description": "Final net total for the sale: sum of `items[].price.total_net_amount_final`\nafter cart-level discounts (tips excluded).\nIn minor units according to `Sale.currency.scale`.", + "allOf": [ + { + "$ref": "#/components/schemas/Amount" + } + ], + "example": 777 }, - "background_color": { - "type": "string", - "description": "A hex color value representing the preferred background color of this merchant.\n", - "examples": [ - "#FF4B3A", - "#0072C6", - "#F68B20" + "gross_amount": { + "description": "Final gross total for the sale: sum of `items[].price.total_gross_amount_final`\nafter cart-level discounts (tips excluded).\nSame value as search `total_amount`, in minor units according to `Sale.currency.scale`.\nPayment amounts include tips and can therefore differ from this gross total.", + "allOf": [ + { + "$ref": "#/components/schemas/Amount" + } + ], + "example": 925 + }, + "cart_discounts": { + "type": "array", + "maxItems": 1000, + "description": "Discounts applied at cart level. Item-level discounts remain on\n`items[].price.discounts`.", + "items": { + "$ref": "#/components/schemas/DiscountLine" + }, + "example": [] + }, + "taxes": { + "type": "array", + "minItems": 1, + "maxItems": 1000, + "description": "Tax lines aggregated across the sale (after cart-level discounts).\nPer-line tax detail remains on `items[].price.taxes` / `taxes_final`.", + "items": { + "$ref": "#/components/schemas/TaxLine" + }, + "example": [ + { + "id": "tax-vat-19", + "net_amount": 777, + "gross_amount": 925, + "tax_amount": 148 + } ] } } }, - "LegalType": { - "externalDocs": { - "description": "The country SDK documentation for legal types.", - "url": "https://developer.sumup.com/tools/glossary/merchant#legal-types" - }, + "TaxMode": { "type": "string", - "description": "The unique legal type reference as defined in the country SDK. We do not rely on IDs as used by other services. Consumers of this API are expected to use the country SDK to map to any other IDs, translation keys, or descriptions.\n", - "minLength": 4, - "maxLength": 64, - "pattern": "^[a-z]{2}\\.[a-z_]+$", - "examples": [ - "de.freiberufler", - "br.ltda", - "gb.partnership", - "bg.private_limited_company" + "description": "The tax mode used by merchant for displaying prices and calculating taxes:\n- NO_TAX: The prices don't contain any taxes, merchant don't report taxes\n- GROSS: The prices used by merchant already include taxes (common in EU), the tax is calculated from the gross price\n- NET: The prices used by merchant don't include taxes (common in US), the tax is calculated from the net price\nSince tax values can be different for the same net price depending if the tax\nwas calculated from gross or net price, this info is necessary to be able to reconcile tax calculations.\n", + "enum": [ + "NO_TAX", + "GROSS", + "NET" + ], + "example": "NO_TAX" + }, + "SalesChannel": { + "type": "string", + "description": "The sale_channel is field that indicates the channel through\nwhich the sale was made. For example, if the sale was made in the merchant app,\nthe sale_channel could be POS. If the sale was made on a kiosk, the\nsale_channel is KIOSK.\n\n*Accepted values:* [\"POS\", \"KIOSK\", \"ONLINE_STORE\", \"SOLO\", \"ORDER_AND_PAY\", \"INVOICE\", \"BOOKINGS\", \"ORDER_AGGREGATOR\", \"SUBSCRIPTIONS\", \"UNKNOWN\"].", + "example": "POS" + }, + "SaleSource": { + "type": "object", + "description": "Information about the source of the sale.", + "properties": { + "channel": { + "$ref": "#/components/schemas/SalesChannel" + }, + "sub_channel": { + "type": "string", + "description": "The sub_channel is an optional field that can be used to provide more\ninformation about the sale_channel. For example, if the sale_channel is\nONLINE_PAYMENTS, the sub_channel could be \"WIX\" or \"QR_CODE\" or \"WOOCOMMERCE\".\n", + "example": "QR_CODE", + "maxLength": 50 + }, + "external_id": { + "type": "string", + "description": "An external reference ID for connecting orders/sales between products", + "example": "123456", + "maxLength": 250 + }, + "external_sub_channel_id": { + "type": "string", + "description": "An external reference ID for the sub-channel.\nFor example, when channel is BOOKINGS and sub_channel is POS,\nthis can hold the OMS order ID while external_id holds the appointment ID.\n", + "example": "9736e947-6f1f-487f-846a-c5954fb06a5a", + "maxLength": 250 + } + }, + "required": [ + "channel" ] }, - "CompanyIdentifiers": { - "type": "array", - "description": "A list of country-specific company identifiers.\n", - "items": { - "$ref": "#/components/schemas/CompanyIdentifier" - } + "PublicPaymentMethod": { + "type": "string", + "description": "Payment method on public sales read API v1.0.\nDigital wallets are first-class methods. Gift card payments use `gift_card`, not `apm`.\nInput is case-insensitive; the canonical form is lowercase snake_case.\n**VALUES**: [card, cash, apm, external, apple_pay, google_pay, whatsapp_pay, gift_card].", + "example": "card", + "maxLength": 20 + }, + "PublicApmType": { + "type": "string", + "description": "Alternative payment method type when `method` is `apm`.\nGift card is not an APM on this API.\nInput is case-insensitive; the canonical form is lowercase snake_case.\n**VALUES**: [qr_code_pix, sepa_dd, paypal, sumup_pay, twint, iris].", + "maxLength": 20 }, - "CompanyIdentifier": { - "externalDocs": { - "description": "Company identifier documentation", - "url": "https://developer.sumup.com/tools/glossary/merchant#company-identifiers" - }, + "PublicCardV10": { "type": "object", + "description": "Card brand, credit/debit processing type, and last four digits.", "required": [ - "ref", - "value" + "brand", + "type", + "last_4_digits" ], "properties": { - "ref": { + "brand": { + "$ref": "#/components/schemas/Brand" + }, + "type": { "type": "string", - "pattern": "^[a-z]{2}\\.[a-z_]+$", - "description": "The unique reference for the company identifier type as defined in the country SDK.\n", - "examples": [ - "de.gmbh" - ] + "description": "Credit or debit processing choice, not brand or funding.\n`unknown` when unavailable; prepaid/voucher are not processing types.", + "enum": [ + "credit", + "debit", + "unknown" + ], + "example": "debit" }, - "value": { + "last_4_digits": { "type": "string", - "minLength": 1, - "maxLength": 100, - "description": "The company identifier value.\n", - "examples": [ - "HRB 123456" - ] + "description": "The last 4 digits of the card used for the payment.", + "example": "1234", + "pattern": "^\\d{4}$", + "minLength": 4, + "maxLength": 4 } - }, - "examples": [ - { - "ref": "de.gmbh", - "value": "HRB 123456" + } + }, + "PublicGiftCardPayment": { + "type": "object", + "description": "Gift card used for this payment. Present when `method` is `gift_card` and the gift card\nid is known.\nGift card IDs use the format \"GC\" followed by 9 alphanumeric characters\n(e.g. GCZ3NTMB1V).", + "properties": { + "id": { + "type": "string", + "description": "Gift card identifier. Format \"GC\" followed by 9 alphanumeric characters\n(e.g. GCZ3NTMB1V).", + "example": "GCZ3NTMB1V" } + }, + "required": [ + "id" ] }, - "Ownership": { + "PublicPaymentV10": { + "title": "PublicPayment", "type": "object", + "description": "Payment on a closed sale, for bookkeeping and reconciliation.\n\nAcquirer/processing cost is not on this object. Merchant-charged fees (shipping, service\ncharge, etc.) appear as `type: \"FEE\"` item lines in `Sale.items`.", "required": [ - "share" + "method", + "reference", + "type", + "amount", + "status", + "processed_at" ], "properties": { - "share": { - "description": "The percent of ownership shares held by the Person expressed in percent mille (1/100000). Only Persons with the relationship `owner` can have ownership.\n", - "type": "integer", - "format": "int32", - "minimum": 25000, - "maximum": 100000, - "example": 50000 + "method": { + "$ref": "#/components/schemas/PublicPaymentMethod" + }, + "reference": { + "$ref": "#/components/schemas/Reference" + }, + "type": { + "type": "string", + "default": "purchase", + "description": "Payment operation type.\nThis is distinct from the payment instrument in `method`.\nInput is case-insensitive; the canonical form is lowercase snake_case.\n**VALUES**: [purchase, unreferenced_refund]\nDefaults to \"purchase\" if unspecified. Either a normal purchase or an unreferenced refund for negative\nsales like deposit returns.\n", + "example": "purchase" + }, + "amount": { + "description": "The amount of the payment including tips.\nThe value of the amount in minor units of `Sale.currency`.\n", + "allOf": [ + { + "$ref": "#/components/schemas/PositiveAmount" + } + ], + "example": 975 + }, + "status": { + "type": "string", + "description": "The status of the payment.", + "enum": [ + "FAILED", + "SUCCESSFUL", + "CANCELED" + ], + "example": "SUCCESSFUL" + }, + "apm_type": { + "$ref": "#/components/schemas/PublicApmType" + }, + "card": { + "$ref": "#/components/schemas/PublicCardV10" + }, + "gift_card": { + "$ref": "#/components/schemas/PublicGiftCardPayment" + }, + "processed_at": { + "type": "string", + "format": "date-time", + "description": "UTC date-time when SumUp recorded this payment’s exposed `status` (successful, failed,\nor canceled). Server processed time when available; otherwise the payment provider’s\ntransaction time. Not the device clock.", + "example": "2017-07-21T17:32:28+01:00" } } }, - "Version": { - "type": "string", - "description": "The version of the resource. The version reflects a specific change submitted to the API via one of the `PATCH` endpoints.\n", - "examples": [ - "chng_01HS0KG3MPVEVWW85E3KNXH55J" - ] - }, - "ChangeStatus": { + "SaleStateV10": { "type": "string", - "readOnly": true, - "description": "Reflects the status of changes submitted through the `PATCH` endpoints for the Merchant or Persons. If some changes have not been applied yet, the status will be `pending`. If all changes have been applied, the status `done`.\nThe status is only returned after write operations or on read endpoints when the `version` query parameter is provided.\n" + "description": "Lifecycle state of the sale.\nNon-finalised sales are never returned; only fully-paid sales.", + "enum": [ + "CLOSED" + ], + "example": "CLOSED" }, - "BasePerson": { - "externalDocs": { - "description": "Person documentation", - "url": "https://developer.sumup.com/tools/glossary/merchant#persons" - }, + "Sale": { + "title": "Sale", "type": "object", - "description": "Base schema for a Person associated with a Merchant. This can be a legal representative, business owner (ultimate beneficial owner), or an officer. A legal representative is the Person who registered the Merchant with SumUp. They should always have a `user_id`.\n", + "description": "Core model of the Sales API. Returned by `GET /sales` and `GET /sales/{sale_id}`.\n\nNon-finalised sales are never returned; only fully-paid sales.\n\nItem lines are `SaleLineItem`. Merchant fees appear as `type: \"FEE\"` lines; extra fee data\nis in `features`.", "required": [ - "id" + "id", + "currency", + "items", + "price", + "tax_mode", + "source", + "created_at", + "closed_at", + "state", + "payments" ], "properties": { "id": { "type": "string", - "readOnly": true, - "description": "The unique identifier for the Person. This is a [typeid](https://github.com/sumup/typeid).\n", - "examples": [ - "pers_2EGQ057R6C8J791RVCG5NWAEAB" - ] + "description": "The ID of the sale.", + "example": "dbe3178d-4b83-5024-9b26-9b8e1b280514" }, "user_id": { "type": "string", - "description": "A corresponding identity user ID for the Person, if they have a user account.\n", - "examples": [ - "ef263f37-8701-4181-9758-acddbb778ee9" - ] - }, - "birthdate": { - "type": "string", - "format": "date", - "description": "The date of birth of the individual, represented as an ISO 8601:2004 [ISO8601‑2004] YYYY-MM-DD format.\n", - "example": "1980-01-12" + "format": "uuid", + "description": "Identity UUID of the cashier who processed the sale. Omitted when the cashier\nidentity is unknown.", + "example": "d6f51684-519b-454c-bdb3-deeb05f52b92" }, - "given_name": { - "type": "string", - "description": "The first name(s) of the individual.", - "example": "James Herrald", - "minLength": 1, - "maxLength": 60 + "currency": { + "$ref": "#/components/schemas/Currency" }, - "family_name": { + "name": { "type": "string", - "description": "The last name(s) of the individual.", - "example": "Bond", - "minLength": 1, - "maxLength": 60 + "maxLength": 160, + "description": "Human-readable name of the sale (not unique, not the sale id).", + "example": "Order 1234" }, - "middle_name": { + "note": { "type": "string", - "description": "Middle name(s) of the End-User. Note that in some cultures, people can have multiple middle names; all can be present, with the names being separated by space characters. Also note that in some cultures, middle names are not used.\n", - "example": "Maria Sophie", - "minLength": 1, - "maxLength": 60 - }, - "phone_number": { - "$ref": "#/components/schemas/PhoneNumber", - "description": "The (mobile) phone number of the individual (used for verification) in [E.164](https://en.wikipedia.org/wiki/E.164) format.\n" + "maxLength": 300, + "description": "Optional note attached to the sale, visible on receipts and the UI.", + "example": "Please deliver to the back door." }, - "relationships": { + "items": { "type": "array", - "description": "A list of roles the Person has in the Merchant or towards SumUp. A Merchant must have at least one Person with the relationship `representative`.\n", "minItems": 1, - "maxItems": 1, + "maxItems": 1000, + "description": "The lines sold in this sale, in the order they were added to the cart.\nIncludes merchant fees (`type: \"FEE\"`) when present; fee details are in `features`.\n", "items": { - "type": "string", - "description": "* `representative`: The Person is the primary contact for SumUp and has full administrative power over the merchant account.\n* `owner`: The Person is a business owner. If this value is set, the `ownership_percent` should be set as well.\n* `officer`: The Person is an officer at the company.\n", - "examples": [ - "representative", - "owner", - "officer" - ] + "$ref": "#/components/schemas/SaleLineItemV10" } }, - "ownership": { - "$ref": "#/components/schemas/Ownership", - "description": "Details about the ownership relationship between the Person and the Merchant. This is only set if the Person has a relationship of type `owner`.\n" + "price": { + "$ref": "#/components/schemas/SalePriceV10" }, - "address": { - "$ref": "#/components/schemas/Address", - "description": "The address of the individual." + "tax_mode": { + "$ref": "#/components/schemas/TaxMode" }, - "identifiers": { - "$ref": "#/components/schemas/PersonalIdentifiers" + "source": { + "$ref": "#/components/schemas/SaleSource" }, - "citizenship": { - "$ref": "#/components/schemas/CountryCode", - "description": "The Alpha-2 ISO code of the country where the Person is a citizen.\n" + "payments": { + "type": "array", + "maxItems": 1000, + "description": "Payments on this sale, in the order they were recorded.\n", + "items": { + "$ref": "#/components/schemas/PublicPaymentV10" + }, + "example": [ + { + "method": "card", + "reference": "TERTYFQ4G3", + "type": "purchase", + "amount": 975, + "status": "SUCCESSFUL", + "processed_at": "2026-06-02T10:20:00Z" + } + ] }, - "nationality": { - "type": [ - "string", - "null" - ], - "pattern": "^[A-Z]{2}$", - "description": "The Person's nationality. May be an [ISO3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code, but legacy data may not conform to this standard.\n" + "created_at": { + "type": "string", + "format": "date-time", + "description": "Instant when the sale was created.", + "example": "2026-06-02T10:15:00Z" }, - "country_of_residence": { - "type": [ - "string", - "null" - ], - "description": "An [ISO3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code representing the country where the Person resides.\n", - "pattern": "^[A-Z]{2}$" + "closed_at": { + "type": "string", + "format": "date-time", + "description": "Instant when the sale was closed. Always present: non-finalised sales are never returned.", + "example": "2026-06-02T10:20:00Z" }, - "version": { - "$ref": "#/components/schemas/Version" + "state": { + "$ref": "#/components/schemas/SaleStateV10" + } + } + }, + "SalePage": { + "title": "SalePage", + "type": "object", + "description": "Paginated list of `Sale` objects. Results are ordered **newest first** by the newest\nactivity recorded for each sale. See `ListSalesV10`.", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Sale" + } }, - "change_status": { - "$ref": "#/components/schemas/ChangeStatus" + "pagination_token": { + "description": "Pagination token for subsequent requests. Should only be set by clients if they have\nreceived a token in the previous response, and this request is an immediate follow-up\nrequest to that response to load the subsequent page. Clients should treat this as an\nopaque token and should not attempt to parse it in any way.", + "type": "string", + "example": "66bcbtzelrubzeuzruzgu76678trncH" } } }, - "Company": { - "externalDocs": { - "description": "Company documentation", - "url": "https://developer.sumup.com/tools/glossary/merchant#company" - }, + "ProblemV10": { "type": "object", - "description": "Information about the company or business. This is legal information that is used for verification.\n", + "description": "A RFC 9457 problem details object.\n\nAdditional properties specific to the problem type may be present.\n", + "required": [ + "type" + ], + "additionalProperties": true, "properties": { - "name": { + "type": { "type": "string", - "description": "The company's legal name.", - "minLength": 1, - "maxLength": 150, - "example": "Gin \u0026 Doughnuts Bar GmbH" + "format": "uri", + "description": "A URI reference that identifies the problem type.", + "example": "https://developer.sumup.com/problem/not-found" }, - "merchant_category_code": { - "description": "The merchant category code for the account as specified by [ISO18245](https://www.iso.org/standard/33365.html). MCCs are used to classify businesses based on the goods or services they provide.\n", + "title": { "type": "string", - "example": "1532", - "pattern": "^[0-9]{4}$" - }, - "legal_type": { - "$ref": "#/components/schemas/LegalType", - "description": "The category identifying the legal structure of the company or legal entity.\n" - }, - "address": { - "$ref": "#/components/schemas/Address", - "description": "The company's primary address." - }, - "trading_address": { - "$ref": "#/components/schemas/Address", - "description": "A trading address is where your suppliers, banks or customers send you correspondence to. Trading address can be different to the company's registered address (`address`).\n" - }, - "identifiers": { - "$ref": "#/components/schemas/CompanyIdentifiers" - }, - "phone_number": { - "$ref": "#/components/schemas/PhoneNumber", - "description": "The company's phone number (used for verification) in [E.164](https://en.wikipedia.org/wiki/E.164) format.\n" + "description": "A short, human-readable summary of the problem type.", + "example": "Requested resource couldn't be found." }, - "website": { - "description": "HTTP(S) URL of the company's website.\n", - "type": "string", - "minLength": 1, - "maxLength": 255, - "examples": [ - "https://www.sumup.com" - ] + "status": { + "type": "integer", + "description": "The HTTP status code generated by the origin server for this occurrence of the problem.", + "example": 404 }, - "attributes": { - "$ref": "#/components/schemas/Attributes" + "detail": { + "type": "string", + "description": "A human-readable explanation specific to this occurrence of the problem.", + "example": "The requested resource doesn't exist or does not belong to you." + }, + "instance": { + "type": "string", + "format": "uri", + "description": "A URI reference that identifies the specific occurrence of the problem." } } }, - "ClassicMerchantIdentifiers": { - "type": "object", - "required": [ - "id" + "PaymentStatusFilterV10": { + "type": "string", + "description": "Payment outcome filter value. Multi-select uses **OR** within this field; combined with\nother filters using **AND**.\nOnly fully-paid closed sales are exposed. Refunded original sales remain searchable as\n`PAID`; refunds are separate negative sales, not a `REFUNDED` sale-search outcome.", + "enum": [ + "PAID", + "CHARGED_BACK" ], - "properties": { - "id": { - "type": "integer", - "format": "int64", - "description": "Classic (serial) merchant ID.", - "example": 1234, - "deprecated": true - } - } + "example": "PAID" }, - "Timestamps": { + "SalesChannelFilterV10": { + "type": "string", + "description": "Sale channel filter value. Multi-select uses **OR** within this field.", + "enum": [ + "POS", + "ONLINE_PAYMENTS", + "KIOSK", + "ONLINE_STORE", + "SOLO", + "ORDER_AND_PAY", + "INVOICE", + "BOOKINGS", + "ORDER_AGGREGATOR", + "SUBSCRIPTIONS", + "UNKNOWN" + ], + "example": "POS" + }, + "SaleSearchRequest": { + "title": "SaleSearchRequest", "type": "object", + "description": "Filter and pagination criteria for `POST /sales/search`. Filters from different categories\nstack with **logical AND**; multiple values in one array field stack with **logical OR**.\nResults cover the merchant’s **last two years** of sales (narrow further with `start_date` /\n`end_date`). Results are sorted **newest first** by sale close date.", "properties": { - "created_at": { + "start_date": { "type": "string", "format": "date-time", - "description": "The date and time when the resource was created. This is a string as defined in [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6).\n", - "readOnly": true, - "examples": [ - "2021-08-31T12:00:00Z" - ] + "description": "Sale created **on or after** this instant (inclusive).", + "example": "2026-06-01T00:00:00Z" }, - "updated_at": { + "end_date": { "type": "string", "format": "date-time", - "description": "The date and time when the resource was last updated. This is a string as defined in [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6).\n", - "readOnly": true, - "examples": [ - "2021-08-31T12:00:00Z" + "description": "Sale created **on or before** this instant (inclusive).", + "example": "2026-06-02T23:59:59Z" + }, + "sale_statuses": { + "type": "array", + "description": "Filters rows by sale lifecycle (`state`). Multiple values match any of them (**OR**).\nUses the same values as `Sale.state`. Non-finalised sales are never returned; only\nfully-paid sales.", + "items": { + "$ref": "#/components/schemas/SaleStateV10" + }, + "example": [ + "CLOSED" + ] + }, + "payment_statuses": { + "type": "array", + "description": "Filters rows by payment outcome. Multiple values match any of them (**OR**). The search\nrow does not echo this value.", + "items": { + "$ref": "#/components/schemas/PaymentStatusFilterV10" + }, + "example": [ + "PAID" + ] + }, + "sales_channels": { + "type": "array", + "description": "Sales channel filter. Multiple values match any of them (**OR**).", + "items": { + "$ref": "#/components/schemas/SalesChannelFilterV10" + }, + "example": [ + "POS" ] + }, + "pagination_token": { + "type": "string", + "description": "Opaque pagination token from a previous search response. Not interchangeable with tokens\nfrom `GET /sales`.", + "example": "66bcbtzelrubzeuzruzgu76678trncH" + }, + "pagination_limit": { + "type": "integer", + "minimum": 1, + "maximum": 25, + "default": 10, + "description": "Maximum number of results per page.", + "example": 10 } - }, - "required": [ - "created_at", - "updated_at" - ] + } }, - "Reader": { - "title": "Reader", - "description": "A physical card reader device that can accept in-person payments.", + "SaleSearchItem": { + "title": "SaleSearchItem", "type": "object", + "description": "Summary row for a sale in search results. Use `GET /sales/{sale_id}` for the full `Sale`.", + "required": [ + "id", + "state", + "tax_mode", + "currency", + "total_amount", + "created_at", + "closed_at" + ], "properties": { "id": { - "$ref": "#/components/schemas/ReaderID" + "type": "string", + "description": "Sale identifier.", + "example": "dbe3178d-4b83-5024-9b26-9b8e1b280514" }, - "name": { - "$ref": "#/components/schemas/ReaderName" + "user_id": { + "type": "string", + "format": "uuid", + "description": "Identity UUID of the cashier who processed the sale. Omitted when the cashier\nidentity is unknown.", + "example": "d6f51684-519b-454c-bdb3-deeb05f52b92" }, - "status": { - "$ref": "#/components/schemas/ReaderStatus" + "state": { + "$ref": "#/components/schemas/SaleStateV10" }, - "device": { - "$ref": "#/components/schemas/ReaderDevice" + "name": { + "type": "string", + "description": "Display name of the sale when set; otherwise a concatenation of item names with\nquantities. Omitted when neither is available.", + "example": "Order 1234" }, - "metadata": { - "$ref": "#/components/schemas/Metadata" + "tax_mode": { + "description": "Checkout tax mode for the sale. Same values as `Sale.tax_mode`.", + "allOf": [ + { + "$ref": "#/components/schemas/TaxMode" + } + ] }, - "service_account_id": { - "type": "string", - "format": "uuid", - "x-beta": true, - "description": "Identifier of the system-managed service account associated with this reader.\nPresent only for readers that are already paired.\nThis field is currently in beta and may change." + "currency": { + "$ref": "#/components/schemas/Currency" + }, + "total_amount": { + "description": "Final sale gross total after discounts and taxes, excluding tips.\nSame value as `Sale.price.gross_amount`, in minor units according to `currency.scale`.\nPayment amounts include tips and can therefore differ from this total.", + "allOf": [ + { + "$ref": "#/components/schemas/Amount" + } + ], + "example": 1250 }, "created_at": { "type": "string", "format": "date-time", - "description": "The timestamp of when the reader was created.", - "example": "2023-01-18T15:16:17Z" + "description": "Instant when the sale was created.", + "example": "2026-06-01T14:30:00Z" }, - "updated_at": { + "closed_at": { "type": "string", "format": "date-time", - "description": "The timestamp of when the reader was last updated.", - "example": "2023-01-20T15:16:17Z" + "description": "Instant when the sale was closed. Always present: non-finalised sales are never returned.", + "example": "2026-06-01T14:35:00Z" } - }, - "required": [ - "id", - "name", - "status", - "device", - "created_at", - "updated_at" - ] - }, - "ReaderName": { - "type": "string", - "description": "Custom human-readable, user-defined name for easier identification of the reader.", - "maxLength": 500, - "example": "Frontdesk" - }, - "ReaderStatus": { - "type": "string", - "example": "paired", - "enum": [ - "unknown", - "processing", - "paired", - "expired" - ], - "description": "The status of the reader object gives information about the current state of the reader.\n\nPossible values:\n\n- `unknown` - The reader status is unknown.\n- `processing` - The reader is created and waits for the physical device to confirm the pairing.\n- `paired` - The reader is paired with a merchant account and can be used with SumUp APIs.\n- `expired` - The pairing is expired and no longer usable with the account. The resource needs to get recreated." + } }, - "ReaderDevice": { + "SaleSearchResponse": { + "title": "SaleSearchResponse", "type": "object", - "description": "Information about the underlying physical device.", + "description": "Search hits and an optional pagination token. Results are ordered **newest first** by sale close date.", + "required": [ + "items" + ], "properties": { - "identifier": { - "type": "string", - "description": "A unique identifier of the physical device (e.g. serial number).", - "example": "U1DT3NA00-CN" + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SaleSearchItem" + }, + "example": [ + { + "id": "dbe3178d-4b83-5024-9b26-9b8e1b280514", + "state": "CLOSED", + "tax_mode": "GROSS", + "currency": { + "code": "EUR", + "scale": 2 + }, + "name": "Order 1234", + "total_amount": 1250, + "created_at": "2026-06-01T14:30:00Z", + "closed_at": "2026-06-01T14:35:00Z" + } + ] }, - "model": { + "pagination_token": { + "description": "Opaque token for the next page of search results.", "type": "string", - "description": "Identifier of the model of the device.", - "enum": [ - "solo", - "virtual-solo" - ], - "example": "solo" + "example": "66bcbtzelrubzeuzruzgu76678trncH" } - }, - "required": [ - "identifier", - "model" - ] - }, - "ReaderPairingCode": { - "type": "string", - "description": "The pairing code is a 8 or 9 character alphanumeric string that is displayed on a SumUp Device after initiating the pairing. It is used to link the physical device to the created pairing.", - "example": "4WLFDSBF", - "minLength": 8, - "maxLength": 9 + } }, "UpdateReaderSettingsError": { "description": "Details of a failed reader settings request.", @@ -11337,7 +13367,21 @@ "description": "A sample checkout", "hosted_checkout": { "enabled": true - } + }, + "redirect_url": "https://example.com/orders/123/complete" + } + }, + "Tokenization": { + "summary": "Save a customer card", + "description": "Create a checkout to collect consent and save a card through the Payment Widget.", + "value": { + "checkout_reference": "save-card-123", + "amount": 1, + "currency": "EUR", + "merchant_code": "MCXXXXXX", + "description": "Save a card for future payments", + "customer_id": "831ff8d4cd5958ab5670", + "purpose": "SETUP_RECURRING_PAYMENT" } } } @@ -11394,9 +13438,6 @@ "description": "Optional amount for partial refunds.", "content": { "application/json": { - "example": { - "amount": 5 - }, "schema": { "type": "object", "description": "Optional amount for partial refunds of transactions.", @@ -11408,6 +13449,18 @@ "example": 5 } } + }, + "examples": { + "FullRefund": { + "summary": "Full refund", + "value": {} + }, + "PartialRefund": { + "summary": "Partial refund", + "value": { + "amount": 24.42 + } + } } } } @@ -11549,6 +13602,22 @@ "hosted_checkout_url": "https://checkout.sumup.com/pay/8f9316a3-cda9-42a9-9771-54d534315676", "transactions": [] } + }, + "Tokenization": { + "summary": "Checkout for saving a card", + "value": { + "checkout_reference": "save-card-123", + "amount": 1, + "currency": "EUR", + "merchant_code": "MCXXXXXX", + "description": "Save a card for future payments", + "customer_id": "831ff8d4cd5958ab5670", + "purpose": "SETUP_RECURRING_PAYMENT", + "id": "7164c99b-13cb-42a1-8ba1-3c2c46a29de7", + "status": "PENDING", + "date": "2026-10-30T12:00:00+00:00", + "transactions": [] + } } } } @@ -11610,17 +13679,65 @@ "schema": { "$ref": "#/components/schemas/CheckoutSuccess" }, - "example": { - "checkout_reference": "f00a8f74-b05d-4605-bd73-2a901bae5802", - "amount": 10.1, - "currency": "EUR", - "merchant_code": "MH4H92C7", - "description": "Purchase", - "id": "4e425463-3e1b-431d-83fa-1e51c2925e99", - "status": "PENDING", - "date": "2020-02-29T10:56:56+00:00", - "transaction_code": "TEENSK4W2K", - "transaction_id": "410fc44a-5956-44e1-b5cc-19c6f8d727a4" + "examples": { + "Checkout": { + "value": { + "checkout_reference": "f00a8f74-b05d-4605-bd73-2a901bae5802", + "amount": 10.1, + "currency": "EUR", + "merchant_code": "MH4H92C7", + "description": "Purchase", + "id": "4e425463-3e1b-431d-83fa-1e51c2925e99", + "status": "PENDING", + "date": "2020-02-29T10:56:56+00:00", + "transaction_code": "TEENSK4W2K", + "transaction_id": "410fc44a-5956-44e1-b5cc-19c6f8d727a4" + } + }, + "PaidCheckout": { + "summary": "Paid checkout with a transaction to refund", + "value": { + "checkout_reference": "f00a8f74-b05d-4605-bd73-2a901bae5802", + "amount": 42.42, + "currency": "EUR", + "merchant_code": "MH4H92C7", + "description": "Purchase", + "id": "4e425463-3e1b-431d-83fa-1e51c2925e99", + "status": "PAID", + "date": "2020-02-29T10:56:56+00:00", + "transaction_code": "TEENSK4W2K", + "transaction_id": "410fc44a-5956-44e1-b5cc-19c6f8d727a4", + "transactions": [ + { + "id": "410fc44a-5956-44e1-b5cc-19c6f8d727a4", + "transaction_code": "TEENSK4W2K", + "amount": 42.42, + "currency": "EUR", + "status": "SUCCESSFUL", + "timestamp": "2026-10-30T12:00:00+00:00" + } + ] + } + }, + "TokenizedCheckout": { + "summary": "Checkout with a saved card", + "value": { + "checkout_reference": "save-card-123", + "amount": 1, + "currency": "EUR", + "merchant_code": "MCXXXXXX", + "description": "Save a card for future payments", + "customer_id": "831ff8d4cd5958ab5670", + "purpose": "SETUP_RECURRING_PAYMENT", + "id": "7164c99b-13cb-42a1-8ba1-3c2c46a29de7", + "status": "PAID", + "date": "2026-10-30T12:00:00+00:00", + "transactions": [], + "payment_instrument": { + "token": "6878cb7f-6515-47bf-bdd9-1408d270fdce" + } + } + } } } } From 1c0f0d6e57b1125bcbe6772e765000483ddc2ce4 Mon Sep 17 00:00:00 2001 From: "sumup-release-bot[bot]" <241716704+sumup-release-bot[bot]@users.noreply.github.com> Date: Tue, 3 Nov 2026 10:48:27 +0000 Subject: [PATCH 2/2] chore: generate code --- .../java/com/sumup/sdk/SumUpAsyncClient.java | 12 + src/main/java/com/sumup/sdk/SumUpClient.java | 12 + .../sumup/sdk/clients/SalesAsyncClient.java | 272 +++++++++++++++++ .../com/sumup/sdk/clients/SalesClient.java | 268 +++++++++++++++++ .../java/com/sumup/sdk/models/BasePerson.java | 61 ++-- .../com/sumup/sdk/models/CategoryV10.java | 61 ++++ .../sdk/models/DiscountApplicationMode.java | 54 ++++ .../com/sumup/sdk/models/DiscountClass.java | 60 ++++ .../com/sumup/sdk/models/DiscountLine.java | 186 ++++++++++++ .../com/sumup/sdk/models/DiscountSource.java | 103 +++++++ .../sumup/sdk/models/DiscountSourceAdHoc.java | 73 +++++ .../sumup/sdk/models/DiscountSourceBasic.java | 94 ++++++ .../sdk/models/DiscountSourceCoupon.java | 132 +++++++++ .../sdk/models/DiscountSourceLoyalty.java | 172 +++++++++++ .../DiscountSourceLoyaltySchemeType.java | 56 ++++ .../sdk/models/DiscountSourceLoyaltyType.java | 58 ++++ .../sumup/sdk/models/DiscountSourceOffer.java | 116 ++++++++ .../com/sumup/sdk/models/DiscountValue.java | 71 +++++ .../java/com/sumup/sdk/models/FeatureV10.java | 105 +++++++ .../sumup/sdk/models/FeatureValueTypeV10.java | 60 ++++ .../sumup/sdk/models/FinalPriceAmounts.java | 117 ++++++++ .../sumup/sdk/models/ItemReferencesV10.java | 101 +++++++ .../ItemReferencesV10CatalogSource.java | 56 ++++ .../sumup/sdk/models/LineItemPriceV10.java | 188 ++++++++++++ .../LineItemPriceV10TotalGrossAmount.java | 61 ++++ ...LineItemPriceV10TotalGrossAmountFinal.java | 64 ++++ .../LineItemPriceV10TotalNetAmount.java | 61 ++++ .../LineItemPriceV10TotalNetAmountFinal.java | 64 ++++ .../com/sumup/sdk/models/ModifierItem.java | 184 ++++++++++++ .../com/sumup/sdk/models/ModifierSet.java | 61 ++++ .../sdk/models/PaymentStatusFilterV10.java | 59 ++++ .../java/com/sumup/sdk/models/Person.java | 61 ++-- .../sdk/models/PositivePriceAmounts.java | 94 ++++++ .../sdk/models/PositivePriceWithTaxes.java | 45 +++ .../com/sumup/sdk/models/PositiveTaxLine.java | 142 +++++++++ .../com/sumup/sdk/models/PriceAmounts.java | 85 ++++++ .../models/PriceAmountsTotalGrossAmount.java | 61 ++++ .../models/PriceAmountsTotalNetAmount.java | 61 ++++ .../java/com/sumup/sdk/models/ProblemV10.java | 155 ++++++++++ .../com/sumup/sdk/models/PublicCardV10.java | 90 ++++++ .../sumup/sdk/models/PublicCardV10Type.java | 58 ++++ .../sdk/models/PublicGiftCardPayment.java | 51 ++++ .../sumup/sdk/models/PublicPaymentV10.java | 217 ++++++++++++++ .../sdk/models/PublicPaymentV10Status.java | 55 ++++ src/main/java/com/sumup/sdk/models/Sale.java | 279 ++++++++++++++++++ .../com/sumup/sdk/models/SaleLineItemV10.java | 266 +++++++++++++++++ .../models/SaleLineItemV10ServiceType.java | 56 ++++ .../java/com/sumup/sdk/models/SalePage.java | 70 +++++ .../com/sumup/sdk/models/SalePriceV10.java | 119 ++++++++ .../sdk/models/SalePriceV10GrossAmount.java | 66 +++++ .../sdk/models/SalePriceV10NetAmount.java | 64 ++++ .../com/sumup/sdk/models/SaleSearchItem.java | 195 ++++++++++++ .../sdk/models/SaleSearchItemTotalAmount.java | 65 ++++ .../sumup/sdk/models/SaleSearchRequest.java | 161 ++++++++++ .../sumup/sdk/models/SaleSearchResponse.java | 62 ++++ .../java/com/sumup/sdk/models/SaleSource.java | 113 +++++++ .../com/sumup/sdk/models/SaleStateV10.java | 52 ++++ .../sdk/models/SalesChannelFilterV10.java | 68 +++++ .../java/com/sumup/sdk/models/TaxLine.java | 141 +++++++++ .../sumup/sdk/models/TaxLineGrossAmount.java | 64 ++++ .../sumup/sdk/models/TaxLineNetAmount.java | 64 ++++ .../sumup/sdk/models/TaxLineTaxAmount.java | 64 ++++ .../java/com/sumup/sdk/models/TaxMode.java | 61 ++++ .../com/sumup/sdk/models/UnitOfMeasure.java | 78 +++++ 64 files changed, 6249 insertions(+), 76 deletions(-) create mode 100644 src/main/java/com/sumup/sdk/clients/SalesAsyncClient.java create mode 100644 src/main/java/com/sumup/sdk/clients/SalesClient.java create mode 100644 src/main/java/com/sumup/sdk/models/CategoryV10.java create mode 100644 src/main/java/com/sumup/sdk/models/DiscountApplicationMode.java create mode 100644 src/main/java/com/sumup/sdk/models/DiscountClass.java create mode 100644 src/main/java/com/sumup/sdk/models/DiscountLine.java create mode 100644 src/main/java/com/sumup/sdk/models/DiscountSource.java create mode 100644 src/main/java/com/sumup/sdk/models/DiscountSourceAdHoc.java create mode 100644 src/main/java/com/sumup/sdk/models/DiscountSourceBasic.java create mode 100644 src/main/java/com/sumup/sdk/models/DiscountSourceCoupon.java create mode 100644 src/main/java/com/sumup/sdk/models/DiscountSourceLoyalty.java create mode 100644 src/main/java/com/sumup/sdk/models/DiscountSourceLoyaltySchemeType.java create mode 100644 src/main/java/com/sumup/sdk/models/DiscountSourceLoyaltyType.java create mode 100644 src/main/java/com/sumup/sdk/models/DiscountSourceOffer.java create mode 100644 src/main/java/com/sumup/sdk/models/DiscountValue.java create mode 100644 src/main/java/com/sumup/sdk/models/FeatureV10.java create mode 100644 src/main/java/com/sumup/sdk/models/FeatureValueTypeV10.java create mode 100644 src/main/java/com/sumup/sdk/models/FinalPriceAmounts.java create mode 100644 src/main/java/com/sumup/sdk/models/ItemReferencesV10.java create mode 100644 src/main/java/com/sumup/sdk/models/ItemReferencesV10CatalogSource.java create mode 100644 src/main/java/com/sumup/sdk/models/LineItemPriceV10.java create mode 100644 src/main/java/com/sumup/sdk/models/LineItemPriceV10TotalGrossAmount.java create mode 100644 src/main/java/com/sumup/sdk/models/LineItemPriceV10TotalGrossAmountFinal.java create mode 100644 src/main/java/com/sumup/sdk/models/LineItemPriceV10TotalNetAmount.java create mode 100644 src/main/java/com/sumup/sdk/models/LineItemPriceV10TotalNetAmountFinal.java create mode 100644 src/main/java/com/sumup/sdk/models/ModifierItem.java create mode 100644 src/main/java/com/sumup/sdk/models/ModifierSet.java create mode 100644 src/main/java/com/sumup/sdk/models/PaymentStatusFilterV10.java create mode 100644 src/main/java/com/sumup/sdk/models/PositivePriceAmounts.java create mode 100644 src/main/java/com/sumup/sdk/models/PositivePriceWithTaxes.java create mode 100644 src/main/java/com/sumup/sdk/models/PositiveTaxLine.java create mode 100644 src/main/java/com/sumup/sdk/models/PriceAmounts.java create mode 100644 src/main/java/com/sumup/sdk/models/PriceAmountsTotalGrossAmount.java create mode 100644 src/main/java/com/sumup/sdk/models/PriceAmountsTotalNetAmount.java create mode 100644 src/main/java/com/sumup/sdk/models/ProblemV10.java create mode 100644 src/main/java/com/sumup/sdk/models/PublicCardV10.java create mode 100644 src/main/java/com/sumup/sdk/models/PublicCardV10Type.java create mode 100644 src/main/java/com/sumup/sdk/models/PublicGiftCardPayment.java create mode 100644 src/main/java/com/sumup/sdk/models/PublicPaymentV10.java create mode 100644 src/main/java/com/sumup/sdk/models/PublicPaymentV10Status.java create mode 100644 src/main/java/com/sumup/sdk/models/Sale.java create mode 100644 src/main/java/com/sumup/sdk/models/SaleLineItemV10.java create mode 100644 src/main/java/com/sumup/sdk/models/SaleLineItemV10ServiceType.java create mode 100644 src/main/java/com/sumup/sdk/models/SalePage.java create mode 100644 src/main/java/com/sumup/sdk/models/SalePriceV10.java create mode 100644 src/main/java/com/sumup/sdk/models/SalePriceV10GrossAmount.java create mode 100644 src/main/java/com/sumup/sdk/models/SalePriceV10NetAmount.java create mode 100644 src/main/java/com/sumup/sdk/models/SaleSearchItem.java create mode 100644 src/main/java/com/sumup/sdk/models/SaleSearchItemTotalAmount.java create mode 100644 src/main/java/com/sumup/sdk/models/SaleSearchRequest.java create mode 100644 src/main/java/com/sumup/sdk/models/SaleSearchResponse.java create mode 100644 src/main/java/com/sumup/sdk/models/SaleSource.java create mode 100644 src/main/java/com/sumup/sdk/models/SaleStateV10.java create mode 100644 src/main/java/com/sumup/sdk/models/SalesChannelFilterV10.java create mode 100644 src/main/java/com/sumup/sdk/models/TaxLine.java create mode 100644 src/main/java/com/sumup/sdk/models/TaxLineGrossAmount.java create mode 100644 src/main/java/com/sumup/sdk/models/TaxLineNetAmount.java create mode 100644 src/main/java/com/sumup/sdk/models/TaxLineTaxAmount.java create mode 100644 src/main/java/com/sumup/sdk/models/TaxMode.java create mode 100644 src/main/java/com/sumup/sdk/models/UnitOfMeasure.java diff --git a/src/main/java/com/sumup/sdk/SumUpAsyncClient.java b/src/main/java/com/sumup/sdk/SumUpAsyncClient.java index c657a5d..ccff8e3 100644 --- a/src/main/java/com/sumup/sdk/SumUpAsyncClient.java +++ b/src/main/java/com/sumup/sdk/SumUpAsyncClient.java @@ -10,6 +10,7 @@ import com.sumup.sdk.clients.ReadersAsyncClient; import com.sumup.sdk.clients.ReceiptsAsyncClient; import com.sumup.sdk.clients.RolesAsyncClient; +import com.sumup.sdk.clients.SalesAsyncClient; import com.sumup.sdk.clients.TokensAsyncClient; import com.sumup.sdk.clients.TransactionsAsyncClient; import com.sumup.sdk.core.ApiClient; @@ -32,6 +33,7 @@ public final class SumUpAsyncClient { private final ReadersAsyncClient readers; private final ReceiptsAsyncClient receipts; private final RolesAsyncClient roles; + private final SalesAsyncClient sales; private final TokensAsyncClient tokens; private final TransactionsAsyncClient transactions; @@ -73,6 +75,7 @@ private SumUpAsyncClient(ApiClient apiClient) { this.readers = new ReadersAsyncClient(this.apiClient); this.receipts = new ReceiptsAsyncClient(this.apiClient); this.roles = new RolesAsyncClient(this.apiClient); + this.sales = new SalesAsyncClient(this.apiClient); this.tokens = new TokensAsyncClient(this.apiClient); this.transactions = new TransactionsAsyncClient(this.apiClient); } @@ -217,6 +220,15 @@ public RolesAsyncClient roles() { return roles; } + /** + * Returns the SalesAsyncClient client for the "Sales" API group. + * + * @return Client for the associated API group. + */ + public SalesAsyncClient sales() { + return sales; + } + /** * Returns the TokensAsyncClient client for the "Tokens" API group. * diff --git a/src/main/java/com/sumup/sdk/SumUpClient.java b/src/main/java/com/sumup/sdk/SumUpClient.java index b3d9e0a..9474d2b 100644 --- a/src/main/java/com/sumup/sdk/SumUpClient.java +++ b/src/main/java/com/sumup/sdk/SumUpClient.java @@ -10,6 +10,7 @@ import com.sumup.sdk.clients.ReadersClient; import com.sumup.sdk.clients.ReceiptsClient; import com.sumup.sdk.clients.RolesClient; +import com.sumup.sdk.clients.SalesClient; import com.sumup.sdk.clients.TokensClient; import com.sumup.sdk.clients.TransactionsClient; import com.sumup.sdk.core.ApiClient; @@ -32,6 +33,7 @@ public final class SumUpClient { private final ReadersClient readers; private final ReceiptsClient receipts; private final RolesClient roles; + private final SalesClient sales; private final TokensClient tokens; private final TransactionsClient transactions; @@ -73,6 +75,7 @@ private SumUpClient(ApiClient apiClient) { this.readers = new ReadersClient(this.apiClient); this.receipts = new ReceiptsClient(this.apiClient); this.roles = new RolesClient(this.apiClient); + this.sales = new SalesClient(this.apiClient); this.tokens = new TokensClient(this.apiClient); this.transactions = new TransactionsClient(this.apiClient); } @@ -217,6 +220,15 @@ public RolesClient roles() { return roles; } + /** + * Returns the SalesClient client for the "Sales" API group. + * + * @return Client for the associated API group. + */ + public SalesClient sales() { + return sales; + } + /** * Returns the TokensClient client for the "Tokens" API group. * diff --git a/src/main/java/com/sumup/sdk/clients/SalesAsyncClient.java b/src/main/java/com/sumup/sdk/clients/SalesAsyncClient.java new file mode 100644 index 0000000..9d30c27 --- /dev/null +++ b/src/main/java/com/sumup/sdk/clients/SalesAsyncClient.java @@ -0,0 +1,272 @@ +// Code generated by sumup-java/codegen. DO NOT EDIT. +package com.sumup.sdk.clients; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.sumup.sdk.core.ApiClient; +import com.sumup.sdk.core.ApiException; +import com.sumup.sdk.core.HttpMethod; +import com.sumup.sdk.core.RequestOptions; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.CompletableFuture; + +/** + * Client for the "Sales" API group. + * + *
Operations related to reading sales data. + */ +public final class SalesAsyncClient { + private final ApiClient apiClient; + + /** + * Creates a new SalesAsyncClient instance backed by the provided ApiClient. + * + * @param apiClient Configured API client used to send HTTP requests. + */ + public SalesAsyncClient(ApiClient apiClient) { + this.apiClient = Objects.requireNonNull(apiClient, "apiClient"); + } + + /** + * Gets a sale + * + *
Returns `Sale` for `sale_id`, including item lines and `payments[]`. Non-finalised sales are + * never returned; only fully-paid sales. + * + *
Operation ID: GetSaleV10 + * + * @param merchantCode The merchant code. + * @param saleId The sale ID. + *
Call the overload that accepts RequestOptions to customize headers, authorization, or
+ * request timeout.
+ * @return CompletableFuture resolved with com.sumup.sdk.models.Sale parsed response.
+ * @throws ApiException if the SumUp API returns an error.
+ */
+ public CompletableFuture Returns `Sale` for `sale_id`, including item lines and `payments[]`. Non-finalised sales are
+ * never returned; only fully-paid sales.
+ *
+ * Operation ID: GetSaleV10
+ *
+ * @param merchantCode The merchant code.
+ * @param saleId The sale ID.
+ * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass
+ * {@code null} to use client defaults.
+ * @return CompletableFuture resolved with com.sumup.sdk.models.Sale parsed response.
+ * @throws ApiException if the SumUp API returns an error.
+ */
+ public CompletableFuture Returns a paginated list of `Sale` objects. Results are sorted **newest first** by the
+ * **newest event** recorded for each sale. Pagination tokens follow that order. Covers the
+ * merchant’s **last two years** of sales. Non-finalised sales are never returned; only fully-paid
+ * sales. Use `POST /sales/search` for filtered queries.
+ *
+ * Operation ID: ListSalesV10
+ *
+ * @param merchantCode The merchant code.
+ * Call the overload that accepts optional parameter objects or RequestOptions to customize
+ * headers, authorization, query values, or timeouts.
+ * @return CompletableFuture resolved with com.sumup.sdk.models.SalePage parsed response.
+ * @throws ApiException if the SumUp API returns an error.
+ */
+ public CompletableFuture Returns a paginated list of `Sale` objects. Results are sorted **newest first** by the
+ * **newest event** recorded for each sale. Pagination tokens follow that order. Covers the
+ * merchant’s **last two years** of sales. Non-finalised sales are never returned; only fully-paid
+ * sales. Use `POST /sales/search` for filtered queries.
+ *
+ * Operation ID: ListSalesV10
+ *
+ * @param merchantCode The merchant code.
+ * @param listSalesV10 Optional query parameters for this request.
+ * Call the overload that accepts RequestOptions to customize headers, authorization, or
+ * request timeout.
+ * @return CompletableFuture resolved with com.sumup.sdk.models.SalePage parsed response.
+ * @throws ApiException if the SumUp API returns an error.
+ */
+ public CompletableFuture Returns a paginated list of `Sale` objects. Results are sorted **newest first** by the
+ * **newest event** recorded for each sale. Pagination tokens follow that order. Covers the
+ * merchant’s **last two years** of sales. Non-finalised sales are never returned; only fully-paid
+ * sales. Use `POST /sales/search` for filtered queries.
+ *
+ * Operation ID: ListSalesV10
+ *
+ * @param merchantCode The merchant code.
+ * @param listSalesV10 Optional query parameters for this request.
+ * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass
+ * {@code null} to use client defaults.
+ * @return CompletableFuture resolved with com.sumup.sdk.models.SalePage parsed response.
+ * @throws ApiException if the SumUp API returns an error.
+ */
+ public CompletableFuture Returns a paginated list of `SaleSearchItem` rows matching filter criteria. Results are
+ * sorted **newest first** by **sale close date**. Filters from different categories stack with
+ * **logical AND**; multiple values in one array field stack with **logical OR**. Results cover
+ * the merchant’s **last two years** of sales (narrow further with `start_date` / `end_date`).
+ * Pagination tokens are not interchangeable with `GET /sales`.
+ *
+ * Operation ID: SearchSalesV10
+ *
+ * @param merchantCode The merchant code.
+ * @param request Request body payload.
+ * Call the overload that accepts RequestOptions to customize headers, authorization, or
+ * request timeout.
+ * @return CompletableFuture resolved with com.sumup.sdk.models.SaleSearchResponse parsed
+ * response.
+ * @throws ApiException if the SumUp API returns an error.
+ */
+ public CompletableFuture Returns a paginated list of `SaleSearchItem` rows matching filter criteria. Results are
+ * sorted **newest first** by **sale close date**. Filters from different categories stack with
+ * **logical AND**; multiple values in one array field stack with **logical OR**. Results cover
+ * the merchant’s **last two years** of sales (narrow further with `start_date` / `end_date`).
+ * Pagination tokens are not interchangeable with `GET /sales`.
+ *
+ * Operation ID: SearchSalesV10
+ *
+ * @param merchantCode The merchant code.
+ * @param request Request body payload.
+ * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass
+ * {@code null} to use client defaults.
+ * @return CompletableFuture resolved with com.sumup.sdk.models.SaleSearchResponse parsed
+ * response.
+ * @throws ApiException if the SumUp API returns an error.
+ */
+ public CompletableFuture Operations related to reading sales data.
+ */
+public final class SalesClient {
+ private final ApiClient apiClient;
+
+ /**
+ * Creates a new SalesClient instance backed by the provided ApiClient.
+ *
+ * @param apiClient Configured API client used to send HTTP requests.
+ */
+ public SalesClient(ApiClient apiClient) {
+ this.apiClient = Objects.requireNonNull(apiClient, "apiClient");
+ }
+
+ /**
+ * Gets a sale
+ *
+ * Returns `Sale` for `sale_id`, including item lines and `payments[]`. Non-finalised sales are
+ * never returned; only fully-paid sales.
+ *
+ * Operation ID: GetSaleV10
+ *
+ * @param merchantCode The merchant code.
+ * @param saleId The sale ID.
+ * Call the overload that accepts RequestOptions to customize headers, authorization, or
+ * request timeout.
+ * @return com.sumup.sdk.models.Sale parsed response.
+ * @throws ApiException if the SumUp API returns an error.
+ */
+ public com.sumup.sdk.models.Sale getSaleV10(String merchantCode, String saleId)
+ throws ApiException {
+ return getSaleV10(merchantCode, saleId, null);
+ }
+
+ /**
+ * Gets a sale
+ *
+ * Returns `Sale` for `sale_id`, including item lines and `payments[]`. Non-finalised sales are
+ * never returned; only fully-paid sales.
+ *
+ * Operation ID: GetSaleV10
+ *
+ * @param merchantCode The merchant code.
+ * @param saleId The sale ID.
+ * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass
+ * {@code null} to use client defaults.
+ * @return com.sumup.sdk.models.Sale parsed response.
+ * @throws ApiException if the SumUp API returns an error.
+ */
+ public com.sumup.sdk.models.Sale getSaleV10(
+ String merchantCode, String saleId, RequestOptions requestOptions) throws ApiException {
+ Objects.requireNonNull(merchantCode, "merchantCode");
+ Objects.requireNonNull(saleId, "saleId");
+ String path = "/v1.0/merchants/{merchant_code}/sales/{sale_id}";
+ path =
+ path.replace(
+ "{merchant_code}", ApiClient.urlEncode(ApiClient.parameterValue(merchantCode)));
+ path = path.replace("{sale_id}", ApiClient.urlEncode(ApiClient.parameterValue(saleId)));
+
+ return this.apiClient.send(
+ HttpMethod.GET,
+ path,
+ null,
+ null,
+ null,
+ new TypeReference Returns a paginated list of `Sale` objects. Results are sorted **newest first** by the
+ * **newest event** recorded for each sale. Pagination tokens follow that order. Covers the
+ * merchant’s **last two years** of sales. Non-finalised sales are never returned; only fully-paid
+ * sales. Use `POST /sales/search` for filtered queries.
+ *
+ * Operation ID: ListSalesV10
+ *
+ * @param merchantCode The merchant code.
+ * Call the overload that accepts optional parameter objects or RequestOptions to customize
+ * headers, authorization, query values, or timeouts.
+ * @return com.sumup.sdk.models.SalePage parsed response.
+ * @throws ApiException if the SumUp API returns an error.
+ */
+ public com.sumup.sdk.models.SalePage listSalesV10(String merchantCode) throws ApiException {
+ return listSalesV10(merchantCode, null);
+ }
+
+ /**
+ * Lists sales
+ *
+ * Returns a paginated list of `Sale` objects. Results are sorted **newest first** by the
+ * **newest event** recorded for each sale. Pagination tokens follow that order. Covers the
+ * merchant’s **last two years** of sales. Non-finalised sales are never returned; only fully-paid
+ * sales. Use `POST /sales/search` for filtered queries.
+ *
+ * Operation ID: ListSalesV10
+ *
+ * @param merchantCode The merchant code.
+ * @param listSalesV10 Optional query parameters for this request.
+ * Call the overload that accepts RequestOptions to customize headers, authorization, or
+ * request timeout.
+ * @return com.sumup.sdk.models.SalePage parsed response.
+ * @throws ApiException if the SumUp API returns an error.
+ */
+ public com.sumup.sdk.models.SalePage listSalesV10(
+ String merchantCode, ListSalesV10QueryParams listSalesV10) throws ApiException {
+ return listSalesV10(merchantCode, listSalesV10, null);
+ }
+
+ /**
+ * Lists sales
+ *
+ * Returns a paginated list of `Sale` objects. Results are sorted **newest first** by the
+ * **newest event** recorded for each sale. Pagination tokens follow that order. Covers the
+ * merchant’s **last two years** of sales. Non-finalised sales are never returned; only fully-paid
+ * sales. Use `POST /sales/search` for filtered queries.
+ *
+ * Operation ID: ListSalesV10
+ *
+ * @param merchantCode The merchant code.
+ * @param listSalesV10 Optional query parameters for this request.
+ * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass
+ * {@code null} to use client defaults.
+ * @return com.sumup.sdk.models.SalePage parsed response.
+ * @throws ApiException if the SumUp API returns an error.
+ */
+ public com.sumup.sdk.models.SalePage listSalesV10(
+ String merchantCode, ListSalesV10QueryParams listSalesV10, RequestOptions requestOptions)
+ throws ApiException {
+ Objects.requireNonNull(merchantCode, "merchantCode");
+ String path = "/v1.0/merchants/{merchant_code}/sales";
+ path =
+ path.replace(
+ "{merchant_code}", ApiClient.urlEncode(ApiClient.parameterValue(merchantCode)));
+ Map Returns a paginated list of `SaleSearchItem` rows matching filter criteria. Results are
+ * sorted **newest first** by **sale close date**. Filters from different categories stack with
+ * **logical AND**; multiple values in one array field stack with **logical OR**. Results cover
+ * the merchant’s **last two years** of sales (narrow further with `start_date` / `end_date`).
+ * Pagination tokens are not interchangeable with `GET /sales`.
+ *
+ * Operation ID: SearchSalesV10
+ *
+ * @param merchantCode The merchant code.
+ * @param request Request body payload.
+ * Call the overload that accepts RequestOptions to customize headers, authorization, or
+ * request timeout.
+ * @return com.sumup.sdk.models.SaleSearchResponse parsed response.
+ * @throws ApiException if the SumUp API returns an error.
+ */
+ public com.sumup.sdk.models.SaleSearchResponse searchSalesV10(
+ String merchantCode, com.sumup.sdk.models.SaleSearchRequest request) throws ApiException {
+ return searchSalesV10(merchantCode, request, null);
+ }
+
+ /**
+ * Searches sales
+ *
+ * Returns a paginated list of `SaleSearchItem` rows matching filter criteria. Results are
+ * sorted **newest first** by **sale close date**. Filters from different categories stack with
+ * **logical AND**; multiple values in one array field stack with **logical OR**. Results cover
+ * the merchant’s **last two years** of sales (narrow further with `start_date` / `end_date`).
+ * Pagination tokens are not interchangeable with `GET /sales`.
+ *
+ * Operation ID: SearchSalesV10
+ *
+ * @param merchantCode The merchant code.
+ * @param request Request body payload.
+ * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass
+ * {@code null} to use client defaults.
+ * @return com.sumup.sdk.models.SaleSearchResponse parsed response.
+ * @throws ApiException if the SumUp API returns an error.
+ */
+ public com.sumup.sdk.models.SaleSearchResponse searchSalesV10(
+ String merchantCode,
+ com.sumup.sdk.models.SaleSearchRequest request,
+ RequestOptions requestOptions)
+ throws ApiException {
+ Objects.requireNonNull(merchantCode, "merchantCode");
+ Objects.requireNonNull(request, "request");
+ String path = "/v1.0/merchants/{merchant_code}/sales/search";
+ path =
+ path.replace(
+ "{merchant_code}", ApiClient.urlEncode(ApiClient.parameterValue(merchantCode)));
+
+ return this.apiClient.send(
+ HttpMethod.POST,
+ path,
+ null,
+ null,
+ request,
+ new TypeReference