From 6b563a7aef7875e34e39ac850a327c78265bbd60 Mon Sep 17 00:00:00 2001 From: appscisumup Date: Tue, 4 Aug 2026 21:57:31 +0000 Subject: [PATCH 1/2] chore: synced local 'openapi.json' with remote 'specs/openapi.json' --- openapi.json | 5738 ++++++++++++++++++++++++++++---------------------- 1 file changed, 3163 insertions(+), 2575 deletions(-) diff --git a/openapi.json b/openapi.json index de333ee..061db8f 100755 --- a/openapi.json +++ b/openapi.json @@ -1,5 +1,5 @@ { - "openapi": "3.0.1", + "openapi": "3.0.3", "info": { "title": "SumUp REST API", "version": "1.0.0", @@ -15,38 +15,129 @@ "description": "Production server" } ], + "tags": [ + { + "name": "Checkouts", + "description": "Checkouts represent online payment sessions that you create before attempting to charge a payer. A checkout captures the payment intent, such as the amount, currency, merchant, and optional customer or redirect settings, and then moves through its lifecycle as you process it.\n\nUse this tag to:\n- create a checkout before collecting or confirming payment details\n- process the checkout with a card, saved card, wallet, or supported alternative payment method\n- retrieve or list checkouts to inspect their current state and associated payment attempts\n- deactivate a checkout that should no longer be used\n\nTypical workflow:\n- create a checkout with the order amount, currency, and merchant information\n- process the checkout through SumUp client tools such as the [Payment Widget and Swift Checkout SDK](https://developer.sumup.com/online-payments/checkouts)\n- retrieve the checkout or use the Transactions endpoints to inspect the resulting payment record\n\nCheckouts are used to initiate and orchestrate online payments. Transactions remain the authoritative record of the resulting payment outcome.", + "x-core-objects": [ + { + "$ref": "#/components/schemas/Checkout" + } + ] + }, + { + "name": "Customers", + "description": "Allow your regular customers to save their information with the Customers model.\n\nThis will prevent re-entering payment instrument information for recurring payments on your platform.\n\nDepending on the needs you can allow, creating, listing or deactivating payment instruments \u0026 creating, retrieving and updating customers.", + "x-core-objects": [ + { + "$ref": "#/components/schemas/Customer" + } + ] + }, + { + "name": "Transactions", + "description": "Transactions represent completed or attempted payment operations processed for a merchant account. A transaction contains the core payment result, such as the amount, currency, payment method, creation time, and current high-level status.\n\nIn addition to the main payment outcome, a transaction can contain related events that describe what happened after the original payment attempt. These events provide visibility into the financial lifecycle of the transaction, for example:\n- `PAYOUT`: the payment being prepared for payout or included in a payout to the merchant\n- `REFUND`: money returned to the payer\n- `CHARGE_BACK`: money reversed after the original payment\n- `PAYOUT_DEDUCTION`: an amount deducted from a payout to cover a refund or chargeback\n\nFrom an integrator's perspective, transactions are the authoritative record of payment outcomes. Use this tag to:\n- list transactions for reporting, reconciliation, and customer support workflows\n- retrieve a single transaction when you need the latest payment details\n- inspect `simple_status` for the current merchant-facing outcome of the payment\n- inspect `events` or `transaction_events` when you need refund, payout, or chargeback history\n\nTypical workflow:\n- create and process payments through the Checkouts endpoints\n- use the Transactions endpoints to read the resulting payment records\n- use the returned statuses and events to update your own order, accounting, or support systems" + }, + { + "name": "Payouts", + "description": "The Payouts model will allow you to track funds you’ve received from SumUp.\n\nYou can receive a detailed payouts list with information like dates, fees, references and statuses, using the `List payouts` endpoint.", + "x-core-objects": [ + { + "$ref": "#/components/schemas/FinancialPayouts" + } + ] + }, + { + "name": "Receipts", + "description": "The Receipts model obtains receipt-like details for specific transactions.", + "x-core-objects": [ + { + "$ref": "#/components/schemas/Receipt" + } + ] + }, + { + "name": "Readers" + }, + { + "name": "Members", + "description": "Endpoints to manage account members. Members are users that have membership within merchant accounts.", + "x-core-objects": [ + { + "$ref": "#/components/schemas/Member" + } + ], + "x-beta": true + }, + { + "name": "Memberships", + "description": "Endpoints to manage user's memberships. Memberships are used to connect the user to merchant accounts and to grant them access to the merchant's resources via roles.", + "x-core-objects": [ + { + "$ref": "#/components/schemas/Membership" + } + ], + "x-beta": true + }, + { + "name": "Roles", + "description": "Endpoints to manage custom roles. Custom roles allow you to tailor roles from individual permissions to match your needs. Once created, you can assign your custom roles to your merchant account members using the memberships.", + "x-core-objects": [ + { + "$ref": "#/components/schemas/Role" + } + ], + "x-beta": true + }, + { + "name": "Merchants", + "description": "A Merchant represents a single business which can use SumUp products like payment processing.", + "x-core-objects": [ + { + "$ref": "#/components/schemas/Merchant" + } + ] + } + ], "paths": { "/v0.1/merchants/{merchant_code}/payment-methods": { "get": { "operationId": "GetPaymentMethods", "summary": "Get available payment methods", "description": "Get payment methods available for the given merchant to use with a checkout.", + "tags": [ + "Checkouts" + ], + "x-codegen": { + "method_name": "list_available_payment_methods" + }, + "x-scopes": [], "parameters": [ { - "name": "merchant_code", "in": "path", - "description": "The SumUp merchant code.", + "name": "merchant_code", "required": true, + "description": "The SumUp merchant code.", "schema": { "type": "string", "example": "MH4H92C7" } }, { - "name": "amount", "in": "query", - "description": "The amount for which the payment methods should be eligible, in major units.", + "name": "amount", "required": false, + "description": "The amount for which the payment methods should be eligible, in major units.", "schema": { "type": "number", "example": 9.99 } }, { - "name": "currency", "in": "query", - "description": "The currency for which the payment methods should be eligible.", + "name": "currency", "required": false, + "description": "The currency for which the payment methods should be eligible.", "schema": { "type": "string", "example": "EUR" @@ -63,6 +154,14 @@ "properties": { "available_payment_methods": { "type": "array", + "example": [ + { + "id": "apple_pay" + }, + { + "id": "blik" + } + ], "items": { "type": "object", "required": [ @@ -70,20 +169,12 @@ ], "properties": { "id": { - "description": "The ID of the payment method.", "type": "string", + "description": "The ID of the payment method.", "example": "qr_code_pix" } } - }, - "example": [ - { - "id": "apple_pay" - }, - { - "id": "blik" - } - ] + } } } }, @@ -138,14 +229,7 @@ { "oauth2": [] } - ], - "tags": [ - "Checkouts" - ], - "x-codegen": { - "method_name": "list_available_payment_methods" - }, - "x-scopes": [] + ] } }, "/v0.1/checkouts": { @@ -153,9 +237,30 @@ "operationId": "CreateCheckout", "summary": "Create a checkout", "description": "Creates a new payment checkout resource. The unique `checkout_reference` created by this request, is used for further manipulation of the checkout.\n\nFor 3DS checkouts, add the `redirect_url` parameter to your request body schema.\nTo use the [Hosted Checkout](https://developer.sumup.com/online-payments/checkouts/hosted-checkout/) page, set the `hosted_checkout.enabled` to `true`.\n\nFollow by processing a checkout to charge the provided payment instrument.", + "tags": [ + "Checkouts" + ], + "security": [ + { + "apiKey": [] + }, + { + "oauth2": [ + "payments", + "checkouts.write" + ] + } + ], + "x-codegen": { + "method_name": "create" + }, + "x-scopes": [ + "payments", + "checkouts.write" + ], "requestBody": { - "description": "Details for creating a checkout resource.", "required": true, + "description": "Details for creating a checkout resource.", "content": { "application/json": { "schema": { @@ -437,7 +542,15 @@ } } } - }, + } + }, + "get": { + "operationId": "ListCheckouts", + "summary": "List checkouts", + "description": "Lists created checkout resources according to the applied `checkout_reference`.", + "tags": [ + "Checkouts" + ], "security": [ { "apiKey": [] @@ -445,25 +558,17 @@ { "oauth2": [ "payments", - "checkouts.write" + "checkouts.read" ] } ], - "tags": [ - "Checkouts" - ], "x-codegen": { - "method_name": "create" + "method_name": "list" }, "x-scopes": [ "payments", - "checkouts.write" - ] - }, - "get": { - "operationId": "ListCheckouts", - "summary": "List checkouts", - "description": "Lists created checkout resources according to the applied `checkout_reference`.", + "checkouts.read" + ], "parameters": [ { "name": "checkout_reference", @@ -523,28 +628,7 @@ } } } - }, - "security": [ - { - "apiKey": [] - }, - { - "oauth2": [ - "payments", - "checkouts.read" - ] - } - ], - "tags": [ - "Checkouts" - ], - "x-codegen": { - "method_name": "list" - }, - "x-scopes": [ - "payments", - "checkouts.read" - ] + } } }, "/v0.1/checkouts/{checkout_id}": { @@ -552,8 +636,8 @@ { "name": "checkout_id", "in": "path", - "description": "Unique ID of the checkout resource.", "required": true, + "description": "Unique ID of the checkout resource.", "schema": { "type": "string" } @@ -563,6 +647,27 @@ "operationId": "GetCheckout", "summary": "Retrieve a checkout", "description": "Retrieves an identified checkout resource. Use this request after processing a checkout to confirm its status and inform the end user respectively.", + "tags": [ + "Checkouts" + ], + "security": [ + { + "apiKey": [] + }, + { + "oauth2": [ + "payments", + "checkouts.read" + ] + } + ], + "x-codegen": { + "method_name": "get" + }, + "x-scopes": [ + "payments", + "checkouts.read" + ], "responses": { "200": { "description": "Returns the requested checkout resource.", @@ -627,7 +732,15 @@ } } } - }, + } + }, + "patch": { + "operationId": "UpdateCheckout", + "summary": "Update a checkout", + "description": "Updates an identified checkout resource.", + "tags": [ + "Checkouts" + ], "security": [ { "apiKey": [] @@ -635,28 +748,20 @@ { "oauth2": [ "payments", - "checkouts.read" + "checkouts.write" ] } ], - "tags": [ - "Checkouts" - ], "x-codegen": { - "method_name": "get" + "method_name": "update" }, "x-scopes": [ "payments", - "checkouts.read" - ] - }, - "patch": { - "operationId": "UpdateCheckout", - "summary": "Update a checkout", - "description": "Updates an identified checkout resource.", + "checkouts.write" + ], "requestBody": { - "description": "Details for updating a checkout resource.", "required": true, + "description": "Details for updating a checkout resource.", "content": { "application/json": { "schema": { @@ -739,11 +844,19 @@ } } } - }, - "security": [ - { - "apiKey": [] - }, + } + }, + "put": { + "operationId": "ProcessCheckout", + "summary": "Process a checkout", + "description": "Processing a checkout will attempt to charge the provided payment instrument for the amount of the specified checkout resource initiated in the `Create a checkout` endpoint.\n\nFollow this request with `Retrieve a checkout` to confirm its status.", + "tags": [ + "Checkouts" + ], + "security": [ + { + "apiKey": [] + }, { "oauth2": [ "payments", @@ -751,24 +864,16 @@ ] } ], - "tags": [ - "Checkouts" - ], "x-codegen": { - "method_name": "update" + "method_name": "process" }, "x-scopes": [ "payments", "checkouts.write" - ] - }, - "put": { - "operationId": "ProcessCheckout", - "summary": "Process a checkout", - "description": "Processing a checkout will attempt to charge the provided payment instrument for the amount of the specified checkout resource initiated in the `Create a checkout` endpoint.\n\nFollow this request with `Retrieve a checkout` to confirm its status.", + ], "requestBody": { - "description": "Details of the payment instrument for processing the checkout.", "required": true, + "description": "Details of the payment instrument for processing the checkout.", "content": { "application/json": { "schema": { @@ -990,7 +1095,7 @@ "rs": "ILnaUeQTKJ184fVrjGILrLjePX9E4rmz", "cs": "c8bc0ea231f8372431ca22d6f8319f8de0263d0b1705759ed27155f245f193c5" }, - "full": "https://r3.girogate.de/ti/simideal?tx=961473700&rs=ILnaUeQTKJ184fVrjGILrLjePX9E4rmz&cs=c8bc0ea231f8372431ca22d6f8319f8de0263d0b1705759ed27155f245f193c5", + "full": "https://r3.girogate.de/ti/simideal?tx=961473700\u0026rs=ILnaUeQTKJ184fVrjGILrLjePX9E4rmz\u0026cs=c8bc0ea231f8372431ca22d6f8319f8de0263d0b1705759ed27155f245f193c5", "mechanism": [ "browser" ] @@ -1008,7 +1113,7 @@ "rs": "5MioXoKt2Gwj9dLgqAX1bMRBuT5xTSdB", "cs": "697edacdd9175f3f99542500fa0ff08280b66aaff3c2641a2e212e4b039473cc" }, - "full": "https://r3.girogate.de/ti/simbcmc?tx=624788471&rs=5MioXoKt2Gwj9dLgqAX1bMRBuT5xTSdB&cs=697edacdd9175f3f99542500fa0ff08280b66aaff3c2641a2e212e4b039473cc", + "full": "https://r3.girogate.de/ti/simbcmc?tx=624788471\u0026rs=5MioXoKt2Gwj9dLgqAX1bMRBuT5xTSdB\u0026cs=697edacdd9175f3f99542500fa0ff08280b66aaff3c2641a2e212e4b039473cc", "mechanism": [ "browser" ] @@ -1140,7 +1245,15 @@ } } } - }, + } + }, + "delete": { + "operationId": "DeactivateCheckout", + "summary": "Deactivate a checkout", + "description": "Deactivates an identified checkout resource. If the checkout has already been processed it can not be deactivated.", + "tags": [ + "Checkouts" + ], "security": [ { "apiKey": [] @@ -1152,21 +1265,13 @@ ] } ], - "tags": [ - "Checkouts" - ], "x-codegen": { - "method_name": "process" + "method_name": "deactivate" }, "x-scopes": [ "payments", "checkouts.write" - ] - }, - "delete": { - "operationId": "DeactivateCheckout", - "summary": "Deactivate a checkout", - "description": "Deactivates an identified checkout resource. If the checkout has already been processed it can not be deactivated.", + ], "responses": { "200": { "description": "Returns the checkout object after successful deactivation.", @@ -1252,28 +1357,7 @@ } } } - }, - "security": [ - { - "apiKey": [] - }, - { - "oauth2": [ - "payments", - "checkouts.write" - ] - } - ], - "tags": [ - "Checkouts" - ], - "x-codegen": { - "method_name": "deactivate" - }, - "x-scopes": [ - "payments", - "checkouts.write" - ] + } } }, "/v0.2/checkouts/{checkout_id}/apple-pay-session": { @@ -1281,41 +1365,48 @@ "operationId": "CreateApplePaySession", "summary": "Create an Apple Pay session", "description": "Creates an Apple Pay merchant session for the specified checkout.\n\nUse this endpoint after the customer selects Apple Pay and before calling\n`ApplePaySession.completeMerchantValidation(...)` in the browser.\nSumUp validates the merchant session request and returns the Apple Pay\nsession object that your frontend should pass to Apple's JavaScript API.\n", + "tags": [ + "Checkouts" + ], "parameters": [ { "name": "checkout_id", "in": "path", - "description": "Unique ID of the checkout resource.", "required": true, + "description": "Unique ID of the checkout resource.", "schema": { "type": "string" } } ], + "x-codegen": { + "method_name": "create_apple_pay_session" + }, + "x-scopes": [], "requestBody": { "description": "The data needed to create an apple pay session for a checkout.", "content": { "application/json": { "schema": { "type": "object", + "required": [ + "context", + "target" + ], "properties": { "context": { - "description": "the context to create this apple pay session.", "type": "string", + "description": "the context to create this apple pay session.", "format": "hostname", "example": "example.com" }, "target": { - "description": "The target url to create this apple pay session.", "type": "string", + "description": "The target url to create this apple pay session.", "format": "uri", "example": "https://apple-pay-gateway-cert.apple.com/paymentservices/startSession" } - }, - "required": [ - "context", - "target" - ] + } } } } @@ -1339,7 +1430,7 @@ "operationalAnalyticsIdentifier": "Test Account:7801D328E6637EFC1ADE6CE01C671D2CD318E32CA4ED1F9FC390D170D827D9AB", "pspId": "7801D328E6637EFC1ADE6CE01C671D2CD318E32CA4ED1F9FC390D170D827D9AB", "retries": 0, - "signature": "" + "signature": "\u003capple-pay-signature\u003e" } } } @@ -1396,14 +1487,7 @@ { "oauth2": [] } - ], - "tags": [ - "Checkouts" - ], - "x-codegen": { - "method_name": "create_apple_pay_session" - }, - "x-scopes": [] + ] } }, "/v0.1/customers": { @@ -1411,9 +1495,30 @@ "operationId": "CreateCustomer", "summary": "Create a customer", "description": "Creates a new saved customer resource which you can later manipulate and save payment instruments to.", + "tags": [ + "Customers" + ], + "security": [ + { + "apiKey": [] + }, + { + "oauth2": [ + "payment_instruments", + "customers.write" + ] + } + ], + "x-codegen": { + "method_name": "create" + }, + "x-scopes": [ + "payment_instruments", + "customers.write" + ], "requestBody": { - "description": "Details of the customer.", "required": true, + "description": "Details of the customer.", "content": { "application/json": { "schema": { @@ -1537,28 +1642,7 @@ } } } - }, - "security": [ - { - "apiKey": [] - }, - { - "oauth2": [ - "payment_instruments", - "customers.write" - ] - } - ], - "tags": [ - "Customers" - ], - "x-codegen": { - "method_name": "create" - }, - "x-scopes": [ - "payment_instruments", - "customers.write" - ] + } } }, "/v0.1/customers/{customer_id}": { @@ -1566,8 +1650,8 @@ { "name": "customer_id", "in": "path", - "description": "Unique ID of the saved customer resource.", "required": true, + "description": "Unique ID of the saved customer resource.", "schema": { "type": "string" } @@ -1577,6 +1661,27 @@ "operationId": "GetCustomer", "summary": "Retrieve a customer", "description": "Retrieves an identified saved customer resource through the unique `customer_id` parameter, generated upon customer creation.", + "tags": [ + "Customers" + ], + "security": [ + { + "apiKey": [] + }, + { + "oauth2": [ + "payment_instruments", + "customers.read" + ] + } + ], + "x-codegen": { + "method_name": "get" + }, + "x-scopes": [ + "payment_instruments", + "customers.read" + ], "responses": { "200": { "description": "Returns the customer resource.", @@ -1649,7 +1754,15 @@ } } } - }, + } + }, + "put": { + "operationId": "UpdateCustomer", + "summary": "Update a customer", + "description": "Updates an identified saved customer resource's personal details.\n\nThe request only overwrites the parameters included in the request, all other parameters will remain with their initially assigned values.", + "tags": [ + "Customers" + ], "security": [ { "apiKey": [] @@ -1657,28 +1770,20 @@ { "oauth2": [ "payment_instruments", - "customers.read" + "customers.write" ] } ], - "tags": [ - "Customers" - ], "x-codegen": { - "method_name": "get" + "method_name": "update" }, "x-scopes": [ "payment_instruments", - "customers.read" - ] - }, - "put": { - "operationId": "UpdateCustomer", - "summary": "Update a customer", - "description": "Updates an identified saved customer resource's personal details.\n\nThe request only overwrites the parameters included in the request, all other parameters will remain with their initially assigned values.", + "customers.write" + ], "requestBody": { - "description": "Customer fields to update.", "required": true, + "description": "Customer fields to update.", "content": { "application/json": { "schema": { @@ -1764,28 +1869,7 @@ } } } - }, - "security": [ - { - "apiKey": [] - }, - { - "oauth2": [ - "payment_instruments", - "customers.write" - ] - } - ], - "tags": [ - "Customers" - ], - "x-codegen": { - "method_name": "update" - }, - "x-scopes": [ - "payment_instruments", - "customers.write" - ] + } } }, "/v0.1/customers/{customer_id}/payment-instruments": { @@ -1793,8 +1877,8 @@ { "name": "customer_id", "in": "path", - "description": "Unique ID of the saved customer resource.", "required": true, + "description": "Unique ID of the saved customer resource.", "schema": { "type": "string" } @@ -1804,6 +1888,27 @@ "operationId": "ListPaymentInstruments", "summary": "List payment instruments", "description": "Lists all payment instrument resources that are saved for an identified customer.", + "tags": [ + "Customers" + ], + "security": [ + { + "apiKey": [] + }, + { + "oauth2": [ + "payment_instruments", + "customers.read" + ] + } + ], + "x-codegen": { + "method_name": "list_payment_instruments" + }, + "x-scopes": [ + "payment_instruments", + "customers.read" + ], "responses": { "200": { "description": "Returns the list of saved payment instruments for the customer.", @@ -1879,28 +1984,7 @@ } } } - }, - "security": [ - { - "apiKey": [] - }, - { - "oauth2": [ - "payment_instruments", - "customers.read" - ] - } - ], - "tags": [ - "Customers" - ], - "x-codegen": { - "method_name": "list_payment_instruments" - }, - "x-scopes": [ - "payment_instruments", - "customers.read" - ] + } } }, "/v0.1/customers/{customer_id}/payment-instruments/{token}": { @@ -1908,8 +1992,8 @@ { "name": "customer_id", "in": "path", - "description": "Unique ID of the saved customer resource.", "required": true, + "description": "Unique ID of the saved customer resource.", "schema": { "type": "string" } @@ -1917,8 +2001,8 @@ { "name": "token", "in": "path", - "description": "Unique token identifying the card saved as a payment instrument resource.", "required": true, + "description": "Unique token identifying the card saved as a payment instrument resource.", "schema": { "type": "string" } @@ -1928,6 +2012,27 @@ "operationId": "DeactivatePaymentInstrument", "summary": "Deactivate a payment instrument", "description": "Deactivates an identified card payment instrument resource for a customer.", + "tags": [ + "Customers" + ], + "security": [ + { + "apiKey": [] + }, + { + "oauth2": [ + "payment_instruments", + "customers.write" + ] + } + ], + "x-codegen": { + "method_name": "deactivate_payment_instrument" + }, + "x-scopes": [ + "payment_instruments", + "customers.write" + ], "responses": { "204": { "description": "Returns an empty response body when the operation succeeds." @@ -2012,28 +2117,7 @@ } } } - }, - "security": [ - { - "apiKey": [] - }, - { - "oauth2": [ - "payment_instruments", - "customers.write" - ] - } - ], - "tags": [ - "Customers" - ], - "x-codegen": { - "method_name": "deactivate_payment_instrument" - }, - "x-scopes": [ - "payment_instruments", - "customers.write" - ] + } } }, "/v1.0/merchants/{merchant_code}/payments/{transaction_id}/refunds": { @@ -2051,8 +2135,8 @@ { "name": "transaction_id", "in": "path", - "description": "Unique ID of the transaction.", "required": true, + "description": "Unique ID of the transaction.", "schema": { "type": "string" } @@ -2062,6 +2146,27 @@ "operationId": "RefundTransaction", "summary": "Refund a transaction", "description": "Refunds an identified transaction either in full or partially.", + "tags": [ + "Transactions" + ], + "security": [ + { + "apiKey": [] + }, + { + "oauth2": [ + "payments", + "refunds.write" + ] + } + ], + "x-codegen": { + "method_name": "refund" + }, + "x-scopes": [ + "payments", + "refunds.write" + ], "requestBody": { "description": "Optional amount for partial refunds.", "content": { @@ -2070,13 +2175,13 @@ "amount": 5 }, "schema": { - "description": "Optional amount for partial refunds of transactions.", "type": "object", + "description": "Optional amount for partial refunds of transactions.", "properties": { "amount": { - "description": "Amount to be refunded. Eligible amount can't exceed the amount of the transaction and varies based on country and currency. If you do not specify a value, the system performs a full refund of the transaction.", "type": "number", "format": "float", + "description": "Amount to be refunded. Eligible amount can't exceed the amount of the transaction and varies based on country and currency. If you do not specify a value, the system performs a full refund of the transaction.", "example": 5 } } @@ -2209,35 +2314,35 @@ } } } - }, + } + } + }, + "/v2.1/merchants/{merchant_code}/transactions": { + "get": { + "operationId": "GetTransactionV2.1", + "summary": "Retrieve a transaction", + "description": "Retrieves the full details of an identified transaction. The transaction resource is identified by a query parameter and *one* of following parameters is required:\n- `id`\n- `transaction_code`\n- `foreign_transaction_id`\n- `client_transaction_id`", + "tags": [ + "Transactions" + ], "security": [ { "apiKey": [] }, { "oauth2": [ - "payments", - "refunds.write" + "transactions.history", + "transactions.read" ] } ], - "tags": [ - "Transactions" - ], "x-codegen": { - "method_name": "refund" + "method_name": "get" }, "x-scopes": [ - "payments", - "refunds.write" - ] - } - }, - "/v2.1/merchants/{merchant_code}/transactions": { - "get": { - "operationId": "GetTransactionV2.1", - "summary": "Retrieve a transaction", - "description": "Retrieves the full details of an identified transaction. The transaction resource is identified by a query parameter and *one* of following parameters is required:\n- `id`\n- `transaction_code`\n- `foreign_transaction_id`\n- `client_transaction_id`", + "transactions.history", + "transactions.read" + ], "parameters": [ { "name": "merchant_code", @@ -2351,7 +2456,17 @@ } } } - }, + } + } + }, + "/v2.1/merchants/{merchant_code}/transactions/history": { + "get": { + "operationId": "ListTransactionsV2.1", + "summary": "List transactions", + "description": "Lists detailed history of all transactions associated with the merchant profile.", + "tags": [ + "Transactions" + ], "security": [ { "apiKey": [] @@ -2363,23 +2478,13 @@ ] } ], - "tags": [ - "Transactions" - ], "x-codegen": { - "method_name": "get" + "method_name": "list" }, "x-scopes": [ "transactions.history", "transactions.read" - ] - } - }, - "/v2.1/merchants/{merchant_code}/transactions/history": { - "get": { - "operationId": "ListTransactionsV2.1", - "summary": "List transactions", - "description": "Lists detailed history of all transactions associated with the merchant profile.", + ], "parameters": [ { "name": "merchant_code", @@ -2406,11 +2511,11 @@ "description": "Specifies the order in which the returned results are displayed.", "schema": { "type": "string", - "default": "ascending", "enum": [ "ascending", "descending" - ] + ], + "default": "ascending" } }, { @@ -2426,19 +2531,19 @@ "in": "query", "description": "Filters the returned results by user email.", "required": false, + "example": [ + "merchant@example.com" + ], "schema": { "type": "array", + "example": [ + "merchant@example.com" + ], "items": { "type": "string", "format": "email" - }, - "example": [ - "merchant@example.com" - ] - }, - "example": [ - "merchant@example.com" - ] + } + } }, { "name": "statuses[]", @@ -2559,9 +2664,6 @@ "properties": { "items": { "type": "array", - "items": { - "$ref": "#/components/schemas/TransactionHistory" - }, "example": [ { "transaction_code": "TEENSK4W2K", @@ -2579,14 +2681,17 @@ "payout_type": "BANK_ACCOUNT", "refunded_amount": 0 } - ] + ], + "items": { + "$ref": "#/components/schemas/TransactionHistory" + } }, "links": { "type": "array", + "example": [], "items": { "$ref": "#/components/schemas/TransactionsHistoryLink" - }, - "example": [] + } } } }, @@ -2655,35 +2760,37 @@ } } } - }, + } + } + }, + "/v1.0/merchants/{merchant_code}/payouts": { + "get": { + "summary": "List payouts", + "operationId": "ListPayoutsV1", + "description": "Lists payout and payout-deduction records for the specified merchant account within the requested date range.\n\nThe response can include:\n- regular payouts (`type = PAYOUT`)\n- deduction records for refunds, chargebacks, direct debit returns, or balance adjustments\n\nResults are sorted by payout date in the requested `order`.", + "tags": [ + "Payouts" + ], "security": [ { "apiKey": [] }, { "oauth2": [ - "transactions.history", - "transactions.read" + "user.profile", + "user.profile_readonly", + "payouts.read" ] } ], - "tags": [ - "Transactions" - ], "x-codegen": { "method_name": "list" }, "x-scopes": [ - "transactions.history", - "transactions.read" - ] - } - }, - "/v1.0/merchants/{merchant_code}/payouts": { - "get": { - "operationId": "ListPayoutsV1", - "summary": "List payouts", - "description": "Lists payout and payout-deduction records for the specified merchant account within the requested date range.\n\nThe response can include:\n- regular payouts (`type = PAYOUT`)\n- deduction records for refunds, chargebacks, direct debit returns, or balance adjustments\n\nResults are sorted by payout date in the requested `order`.", + "user.profile", + "user.profile_readonly", + "payouts.read" + ], "parameters": [ { "name": "merchant_code", @@ -2696,8 +2803,8 @@ } }, { - "name": "start_date", "in": "query", + "name": "start_date", "description": "Start date of the payout period filter, inclusive, in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) `date` format (`YYYY-MM-DD`).", "required": true, "schema": { @@ -2707,8 +2814,8 @@ } }, { - "name": "end_date", "in": "query", + "name": "end_date", "description": "End date of the payout period filter, inclusive, in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) `date` format (`YYYY-MM-DD`). Must be greater than or equal to `start_date`.", "required": true, "schema": { @@ -2718,45 +2825,45 @@ } }, { - "name": "format", "in": "query", + "name": "format", "description": "Response format for the payout list.", "required": false, "schema": { "type": "string", - "example": "json", - "default": "json", "enum": [ "json", "csv" - ] + ], + "default": "json", + "example": "json" } }, { - "name": "limit", "in": "query", + "name": "limit", "description": "Maximum number of payout records to return.", "required": false, "schema": { "type": "integer", - "example": 10, + "minimum": 1, "maximum": 9999, - "minimum": 1 + "example": 10 } }, { - "name": "order", "in": "query", + "name": "order", "description": "Sort direction for the returned payouts.", "required": false, "schema": { "type": "string", - "example": "desc", - "default": "asc", "enum": [ "asc", "desc" - ] + ], + "default": "asc", + "example": "desc" } } ], @@ -2784,8 +2891,8 @@ }, "text/plain": { "schema": { - "description": "CSV-formatted payout export returned when `format=csv`.", - "type": "string" + "type": "string", + "description": "CSV-formatted payout export returned when `format=csv`." }, "example": "id,type,amount,date,currency,fee,status,reference,transaction_code\n123456789,PAYOUT,132.45,2024-02-29,EUR,3.12,SUCCESSFUL,payout-2024-02-29,TEENSK4W2K" } @@ -2852,41 +2959,37 @@ } } } - }, + } + } + }, + "/v1.1/receipts/{transaction_id}": { + "get": { + "operationId": "GetReceipt", + "summary": "Retrieve receipt details", + "description": "Retrieves receipt specific data for a transaction.", + "tags": [ + "Receipts" + ], "security": [ { "apiKey": [] }, { "oauth2": [ - "user.profile", - "user.profile_readonly", - "payouts.read" + "receipts.read" ] } ], - "tags": [ - "Payouts" - ], "x-codegen": { - "method_name": "list" + "method_name": "get" }, "x-scopes": [ - "user.profile", - "user.profile_readonly", - "payouts.read" - ] - } - }, - "/v1.1/receipts/{transaction_id}": { - "get": { - "operationId": "GetReceipt", - "summary": "Retrieve receipt details", - "description": "Retrieves receipt specific data for a transaction.", + "receipts.read" + ], "parameters": [ { - "name": "transaction_id", "in": "path", + "name": "transaction_id", "description": "SumUp unique transaction ID or transaction code, e.g. TS7HDYLSKD.", "required": true, "schema": { @@ -2894,8 +2997,8 @@ } }, { - "name": "mid", "in": "query", + "name": "mid", "description": "Merchant code.", "required": true, "schema": { @@ -2903,8 +3006,8 @@ } }, { - "name": "tx_event_id", "in": "query", + "name": "tx_event_id", "description": "The ID of the transaction event (refund).", "required": false, "schema": { @@ -3008,33 +3111,200 @@ } } } - }, - "security": [ + } + } + }, + "/v0/merchants/{merchant_code}/readers/{reader_id}/go-checkout": { + "post": { + "description": "Initiates a payment on the SumUp Go terminal identified by the reader ID.\n\nUse `client_transaction_id` as an idempotency key: retrying the request with the same value returns the result of the original payment instead of creating a duplicate.", + "operationId": "CreateGoReaderCheckout", + "parameters": [ { - "apiKey": [] + "description": "Access token in the format 'Bearer {token}'.", + "in": "header", + "name": "Authorization", + "required": true, + "schema": { + "type": "string" + } }, { - "oauth2": [ - "receipts.read" - ] + "name": "merchant_code", + "description": "Short unique identifier for the merchant.", + "in": "path", + "required": true, + "schema": { + "type": "string", + "example": "MK10CL2A" + } + }, + { + "name": "reader_id", + "in": "path", + "description": "The unique identifier of the reader.", + "required": true, + "schema": { + "$ref": "#/components/schemas/ReaderID" + } } ], + "requestBody": { + "required": true, + "description": "Payment details to initiate on the reader.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReaderPaymentRequestParams" + } + } + } + }, + "responses": { + "200": { + "description": "Returns the result of the payment initiated on the reader.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReaderPaymentResponse" + } + } + } + }, + "400": { + "description": "The request is invalid.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + }, + "example": { + "type": "https://developer.sumup.com/problem/bad-request", + "title": "Bad Request", + "status": 400, + "detail": "Request validation failed." + } + } + } + }, + "401": { + "description": "Authentication failed or missing required scope.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + }, + "example": { + "type": "https://developer.sumup.com/problem/unauthorized", + "title": "Unauthorized", + "status": 401, + "detail": "Authentication credentials are missing or invalid." + } + } + } + }, + "404": { + "description": "The requested Reader resource does not exist.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + }, + "example": { + "type": "https://developer.sumup.com/problem/not-found", + "title": "Requested resource couldn't be found.", + "status": 404, + "detail": "The requested resource doesn't exist or does not belong to you." + } + } + } + }, + "422": { + "description": "The request could not be processed as it violates a business rule.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + }, + "example": { + "type": "https://developer.sumup.com/problem/validation-error", + "title": "Unprocessable Entity", + "status": 422, + "detail": "Validation failed." + } + } + } + }, + "500": { + "description": "An unexpected error occurred while processing the request.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + }, + "example": { + "type": "https://developer.sumup.com/problem/internal-server-error", + "title": "Internal Server Error", + "status": 500, + "detail": "An unexpected error occurred while processing the request." + } + } + } + } + }, + "summary": "Create a Go Reader Payment", "tags": [ - "Receipts" + "Readers" + ], + "x-scopes": [ + "payments", + "readers.write" + ], + "x-permissions": [ + "readers_checkout_create" ], "x-codegen": { - "method_name": "get" + "method_name": "create_go_checkout", + "ignore": true }, - "x-scopes": [ - "receipts.read" + "security": [ + { + "apiKey": [] + }, + { + "oauth2": [ + "payments", + "readers.write" + ] + } ] } }, "/v0.1/memberships": { "get": { - "operationId": "ListMemberships", "summary": "List memberships", "description": "List memberships of the current user.", + "tags": [ + "Memberships" + ], + "operationId": "ListMemberships", + "x-codegen": { + "method_name": "list" + }, + "x-scopes": [ + "user.profile", + "user.profile_readonly" + ], + "security": [ + { + "apiKey": [] + }, + { + "oauth2": [ + "user.profile", + "user.profile_readonly" + ] + } + ], "parameters": [ { "name": "offset", @@ -3042,9 +3312,9 @@ "description": "Offset of the first member to return.", "schema": { "type": "integer", - "example": 0, "default": 0, - "minimum": 0 + "minimum": 0, + "example": 0 } }, { @@ -3053,10 +3323,10 @@ "description": "Maximum number of members to return.", "schema": { "type": "integer", - "example": 10, "default": 10, + "minimum": 1, "maximum": 25, - "minimum": 1 + "example": 10 } }, { @@ -3113,12 +3383,12 @@ "in": "query", "description": "Filter memberships by the parent of the resource the membership is in.\nWhen filtering by parent both `resource.parent.id` and `resource.parent.type` must be present. Pass explicit null to filter for resources without a parent.", "schema": { + "nullable": true, "allOf": [ { "$ref": "#/components/schemas/ResourceType" } - ], - "nullable": true + ] } }, { @@ -3135,8 +3405,8 @@ "role_accountant" ] }, - "explode": true, - "style": "form" + "style": "form", + "explode": true } ], "responses": { @@ -3146,6 +3416,10 @@ "application/json": { "schema": { "type": "object", + "required": [ + "total_count", + "items" + ], "properties": { "items": { "type": "array", @@ -3157,11 +3431,7 @@ "type": "integer", "example": 3 } - }, - "required": [ - "total_count", - "items" - ] + } } } } @@ -3198,35 +3468,11 @@ } } } - }, - "security": [ - { - "apiKey": [] - }, - { - "oauth2": [ - "user.profile", - "user.profile_readonly" - ] - } - ], - "tags": [ - "Memberships" - ], - "x-codegen": { - "method_name": "list" - }, - "x-scopes": [ - "user.profile", - "user.profile_readonly" - ] + } } }, "/v0.1/merchants/{merchant_code}/members": { "get": { - "operationId": "ListMerchantMembers", - "summary": "List members", - "description": "Lists merchant members.", "parameters": [ { "name": "offset", @@ -3234,9 +3480,9 @@ "description": "Offset of the first member to return.", "schema": { "type": "integer", - "example": 0, "default": 0, - "minimum": 0 + "minimum": 0, + "example": 0 } }, { @@ -3245,22 +3491,22 @@ "description": "Maximum number of members to return.", "schema": { "type": "integer", - "example": 10, "default": 10, + "minimum": 1, "maximum": 25, - "minimum": 1 + "example": 10 } }, { "name": "scroll", "in": "query", "description": "Indicates to skip count query.", + "x-document": false, "schema": { "type": "boolean", - "example": true, - "default": false - }, - "x-document": false + "default": false, + "example": true + } }, { "name": "email", @@ -3303,13 +3549,13 @@ "role_accountant" ] }, - "explode": true, - "style": "form" + "style": "form", + "explode": true }, { "name": "merchant_code", - "in": "path", "description": "Short unique identifier for the merchant.", + "in": "path", "required": true, "schema": { "type": "string", @@ -3317,6 +3563,37 @@ } } ], + "summary": "List members", + "description": "Lists merchant members.", + "tags": [ + "Members" + ], + "operationId": "ListMerchantMembers", + "x-codegen": { + "method_name": "list" + }, + "x-permissions": [ + { + "relation": "merchant_read", + "object_type": "merchant", + "object_id_param": "merchant_code" + } + ], + "x-scopes": [ + "user.subaccounts", + "members.read" + ], + "security": [ + { + "apiKey": [] + }, + { + "oauth2": [ + "user.subaccounts", + "members.read" + ] + } + ], "responses": { "200": { "description": "Returns a list of Member objects.", @@ -3324,7 +3601,10 @@ "application/json": { "schema": { "type": "object", - "properties": { + "required": [ + "items" + ], + "properties": { "items": { "type": "array", "items": { @@ -3335,10 +3615,7 @@ "type": "integer", "example": 3 } - }, - "required": [ - "items" - ] + } } } } @@ -3359,7 +3636,15 @@ } } } - }, + } + }, + "post": { + "operationId": "CreateMerchantMember", + "summary": "Create a member", + "description": "Create a merchant member.", + "tags": [ + "Members" + ], "security": [ { "apiKey": [] @@ -3367,43 +3652,23 @@ { "oauth2": [ "user.subaccounts", - "members.read" + "members.write" ] } ], - "tags": [ - "Members" - ], "x-codegen": { - "method_name": "list" + "method_name": "create" }, "x-permissions": [ { - "relation": "merchant_read", + "relation": "members_create", "object_type": "merchant", "object_id_param": "merchant_code" } ], "x-scopes": [ "user.subaccounts", - "members.read" - ] - }, - "post": { - "operationId": "CreateMerchantMember", - "summary": "Create a member", - "description": "Create a merchant member.", - "parameters": [ - { - "name": "merchant_code", - "in": "path", - "description": "Short unique identifier for the merchant.", - "required": true, - "schema": { - "type": "string", - "example": "MK10CL2A" - } - } + "members.write" ], "requestBody": { "required": true, @@ -3411,37 +3676,41 @@ "application/json": { "schema": { "type": "object", + "required": [ + "email", + "roles" + ], "properties": { "is_managed_user": { - "description": "True if the user is managed by the merchant. In this case, we'll created a virtual user with the provided password and nickname.", - "type": "boolean" + "type": "boolean", + "description": "True if the user is managed by the merchant. In this case, we'll created a virtual user with the provided password and nickname." }, "email": { - "description": "Email address of the member to add.", "type": "string", "format": "email", + "description": "Email address of the member to add.", "maxLength": 256 }, "password": { - "description": "Password of the member to add. Only used if `is_managed_user` is true. In the case of service accounts, the password is not used and can not be defined by the caller.", "type": "string", + "minLength": 8, "format": "password", - "minLength": 8 + "description": "Password of the member to add. Only used if `is_managed_user` is true. In the case of service accounts, the password is not used and can not be defined by the caller." }, "nickname": { - "description": "Nickname of the member to add. Only used if `is_managed_user` is true. Used for display purposes only.", "type": "string", "example": "Test User", + "description": "Nickname of the member to add. Only used if `is_managed_user` is true. Used for display purposes only.", "maxLength": 64 }, "roles": { - "description": "List of roles to assign to the new member.", "type": "array", + "description": "List of roles to assign to the new member.", + "maxItems": 124, "items": { "type": "string", "maxLength": 64 - }, - "maxItems": 124 + } }, "metadata": { "$ref": "#/components/schemas/Metadata" @@ -3455,11 +3724,7 @@ "roles": [ "role_employee" ] - }, - "required": [ - "email", - "roles" - ] + } } } } @@ -3524,61 +3789,51 @@ } } }, - "security": [ - { - "apiKey": [] - }, + "parameters": [ { - "oauth2": [ - "user.subaccounts", - "members.write" - ] + "name": "merchant_code", + "description": "Short unique identifier for the merchant.", + "in": "path", + "required": true, + "schema": { + "type": "string", + "example": "MK10CL2A" + } } - ], + ] + } + }, + "/v0.1/merchants/{merchant_code}/members/{member_id}": { + "get": { + "summary": "Retrieve a member", + "description": "Retrieve a merchant member.", "tags": [ "Members" ], + "operationId": "GetMerchantMember", "x-codegen": { - "method_name": "create" + "method_name": "get" }, "x-permissions": [ { - "relation": "members_create", + "relation": "members_view", "object_type": "merchant", "object_id_param": "merchant_code" } ], "x-scopes": [ "user.subaccounts", - "members.write" - ] - } - }, - "/v0.1/merchants/{merchant_code}/members/{member_id}": { - "get": { - "operationId": "GetMerchantMember", - "summary": "Retrieve a member", - "description": "Retrieve a merchant member.", - "parameters": [ + "members.read" + ], + "security": [ { - "name": "merchant_code", - "in": "path", - "description": "Short unique identifier for the merchant.", - "required": true, - "schema": { - "type": "string", - "example": "MK10CL2A" - } + "apiKey": [] }, { - "name": "member_id", - "in": "path", - "description": "The ID of the member to retrieve.", - "required": true, - "schema": { - "type": "string", - "example": "mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP" - } + "oauth2": [ + "user.subaccounts", + "members.read" + ] } ], "responses": { @@ -3609,59 +3864,59 @@ } } }, - "security": [ + "parameters": [ { - "apiKey": [] + "name": "merchant_code", + "description": "Short unique identifier for the merchant.", + "in": "path", + "required": true, + "schema": { + "type": "string", + "example": "MK10CL2A" + } }, { - "oauth2": [ - "user.subaccounts", - "members.read" - ] + "in": "path", + "name": "member_id", + "description": "The ID of the member to retrieve.", + "required": true, + "schema": { + "type": "string", + "example": "mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP" + } } - ], + ] + }, + "put": { + "summary": "Update a member", + "description": "Update the merchant member.", "tags": [ "Members" ], + "operationId": "UpdateMerchantMember", "x-codegen": { - "method_name": "get" + "method_name": "update" }, "x-permissions": [ { - "relation": "members_view", + "relation": "members_update", "object_type": "merchant", "object_id_param": "merchant_code" } ], "x-scopes": [ "user.subaccounts", - "members.read" - ] - }, - "put": { - "operationId": "UpdateMerchantMember", - "summary": "Update a member", - "description": "Update the merchant member.", - "parameters": [ + "members.write" + ], + "security": [ { - "name": "merchant_code", - "in": "path", - "description": "Short unique identifier for the merchant.", - "required": true, - "schema": { - "type": "string", - "example": "MK10CL2A" - } + "apiKey": [] }, { - "name": "member_id", - "in": "path", - "description": "The ID of the member to retrieve.", - "required": true, - "schema": { - "type": "string", - "example": "mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP" - } + "oauth2": [ + "user.subaccounts", + "members.write" + ] } ], "requestBody": { @@ -3673,11 +3928,11 @@ "properties": { "roles": { "type": "array", + "maxItems": 124, "items": { "type": "string", "maxLength": 64 - }, - "maxItems": 124 + } }, "metadata": { "$ref": "#/components/schemas/Metadata" @@ -3686,20 +3941,20 @@ "$ref": "#/components/schemas/Attributes" }, "user": { - "description": "Allows you to update user data of managed users.", "type": "object", + "description": "Allows you to update user data of managed users.", "properties": { "nickname": { - "description": "User's nickname. Used for display purposes only.", "type": "string", "example": "Test User", + "description": "User's nickname. Used for display purposes only.", "maxLength": 64 }, "password": { - "description": "Password of the member to add. Only used if `is_managed_user` is true.", "type": "string", "format": "password", - "minLength": 8 + "minLength": 8, + "description": "Password of the member to add. Only used if `is_managed_user` is true." } } } @@ -3796,26 +4051,42 @@ } } }, - "security": [ + "parameters": [ { - "apiKey": [] + "name": "merchant_code", + "description": "Short unique identifier for the merchant.", + "in": "path", + "required": true, + "schema": { + "type": "string", + "example": "MK10CL2A" + } }, { - "oauth2": [ - "user.subaccounts", - "members.write" - ] + "in": "path", + "name": "member_id", + "description": "The ID of the member to retrieve.", + "required": true, + "schema": { + "type": "string", + "example": "mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP" + } } - ], + ] + }, + "delete": { + "summary": "Delete a member", + "description": "Deletes a merchant member.", "tags": [ "Members" ], + "operationId": "DeleteMerchantMember", "x-codegen": { - "method_name": "update" + "method_name": "delete" }, "x-permissions": [ { - "relation": "members_update", + "relation": "members_delete", "object_type": "merchant", "object_id_param": "merchant_code" } @@ -3823,32 +4094,16 @@ "x-scopes": [ "user.subaccounts", "members.write" - ] - }, - "delete": { - "operationId": "DeleteMerchantMember", - "summary": "Delete a member", - "description": "Deletes a merchant member.", - "parameters": [ + ], + "security": [ { - "name": "merchant_code", - "in": "path", - "description": "Short unique identifier for the merchant.", - "required": true, - "schema": { - "type": "string", - "example": "MK10CL2A" - } + "apiKey": [] }, { - "name": "member_id", - "in": "path", - "description": "The ID of the member to retrieve.", - "required": true, - "schema": { - "type": "string", - "example": "mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP" - } + "oauth2": [ + "user.subaccounts", + "members.write" + ] } ], "responses": { @@ -3888,51 +4143,61 @@ } } }, - "security": [ + "parameters": [ { - "apiKey": [] + "name": "merchant_code", + "description": "Short unique identifier for the merchant.", + "in": "path", + "required": true, + "schema": { + "type": "string", + "example": "MK10CL2A" + } }, { - "oauth2": [ - "user.subaccounts", - "members.write" - ] + "in": "path", + "name": "member_id", + "description": "The ID of the member to retrieve.", + "required": true, + "schema": { + "type": "string", + "example": "mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP" + } } - ], + ] + } + }, + "/v0.1/merchants/{merchant_code}/roles": { + "get": { + "summary": "List roles", + "description": "List merchant's custom roles.", "tags": [ - "Members" + "Roles" ], + "operationId": "ListMerchantRoles", "x-codegen": { - "method_name": "delete" + "method_name": "list" }, "x-permissions": [ { - "relation": "members_delete", + "relation": "roles_list", "object_type": "merchant", "object_id_param": "merchant_code" } ], "x-scopes": [ "user.subaccounts", - "members.write" - ] - } - }, - "/v0.1/merchants/{merchant_code}/roles": { - "get": { - "operationId": "ListMerchantRoles", - "summary": "List roles", - "description": "List merchant's custom roles.", - "parameters": [ + "roles.read" + ], + "security": [ { - "name": "merchant_code", - "in": "path", - "description": "Short unique identifier for the merchant.", - "required": true, - "schema": { - "type": "string", - "example": "MK10CL2A" - } + "apiKey": [] + }, + { + "oauth2": [ + "user.subaccounts", + "roles.read" + ] } ], "responses": { @@ -3942,6 +4207,9 @@ "application/json": { "schema": { "type": "object", + "required": [ + "items" + ], "properties": { "items": { "type": "array", @@ -3949,10 +4217,7 @@ "$ref": "#/components/schemas/Role" } } - }, - "required": [ - "items" - ] + } } } } @@ -3974,6 +4239,26 @@ } } }, + "parameters": [ + { + "name": "merchant_code", + "description": "Short unique identifier for the merchant.", + "in": "path", + "required": true, + "schema": { + "type": "string", + "example": "MK10CL2A" + } + } + ] + }, + "post": { + "operationId": "CreateMerchantRole", + "summary": "Create a role", + "description": "Create a custom role for the merchant. Roles are defined by the set of permissions that they grant to the members that they are assigned to.", + "tags": [ + "Roles" + ], "security": [ { "apiKey": [] @@ -3981,43 +4266,23 @@ { "oauth2": [ "user.subaccounts", - "roles.read" + "roles.write" ] } ], - "tags": [ - "Roles" - ], "x-codegen": { - "method_name": "list" + "method_name": "create" }, "x-permissions": [ { - "relation": "roles_list", + "relation": "roles_create", "object_type": "merchant", "object_id_param": "merchant_code" } ], "x-scopes": [ "user.subaccounts", - "roles.read" - ] - }, - "post": { - "operationId": "CreateMerchantRole", - "summary": "Create a role", - "description": "Create a custom role for the merchant. Roles are defined by the set of permissions that they grant to the members that they are assigned to.", - "parameters": [ - { - "name": "merchant_code", - "in": "path", - "description": "Short unique identifier for the merchant.", - "required": true, - "schema": { - "type": "string", - "example": "MK10CL2A" - } - } + "roles.write" ], "requestBody": { "required": true, @@ -4025,15 +4290,20 @@ "application/json": { "schema": { "type": "object", + "required": [ + "name", + "permissions" + ], "properties": { "name": { - "description": "User-defined name of the role.", "type": "string", - "example": "Senior Shop Manager II" + "example": "Senior Shop Manager II", + "description": "User-defined name of the role." }, "permissions": { - "description": "User's permissions.", "type": "array", + "description": "User's permissions.", + "maxItems": 100, "items": { "type": "string" }, @@ -4041,22 +4311,17 @@ "catalog_access", "taxes_access", "members_access" - ], - "maxItems": 100 + ] }, "metadata": { "$ref": "#/components/schemas/Metadata" }, "description": { - "description": "User-defined description of the role.", "type": "string", - "example": "Manges the shop and the employees." + "example": "Manges the shop and the employees.", + "description": "User-defined description of the role." } - }, - "required": [ - "name", - "permissions" - ] + } } } } @@ -4105,61 +4370,51 @@ } } }, - "security": [ - { - "apiKey": [] - }, + "parameters": [ { - "oauth2": [ - "user.subaccounts", - "roles.write" - ] + "name": "merchant_code", + "description": "Short unique identifier for the merchant.", + "in": "path", + "required": true, + "schema": { + "type": "string", + "example": "MK10CL2A" + } } - ], + ] + } + }, + "/v0.1/merchants/{merchant_code}/roles/{role_id}": { + "get": { + "summary": "Retrieve a role", + "description": "Retrieve a custom role by ID.", "tags": [ "Roles" ], + "operationId": "GetMerchantRole", "x-codegen": { - "method_name": "create" + "method_name": "get" }, "x-permissions": [ { - "relation": "roles_create", + "relation": "roles_view", "object_type": "merchant", "object_id_param": "merchant_code" } ], "x-scopes": [ "user.subaccounts", - "roles.write" - ] - } - }, - "/v0.1/merchants/{merchant_code}/roles/{role_id}": { - "get": { - "operationId": "GetMerchantRole", - "summary": "Retrieve a role", - "description": "Retrieve a custom role by ID.", - "parameters": [ + "roles.read" + ], + "security": [ { - "name": "merchant_code", - "in": "path", - "description": "Short unique identifier for the merchant.", - "required": true, - "schema": { - "type": "string", - "example": "MK10CL2A" - } + "apiKey": [] }, { - "name": "role_id", - "in": "path", - "description": "The ID of the role to retrieve.", - "required": true, - "schema": { - "type": "string", - "example": "role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP" - } + "oauth2": [ + "user.subaccounts", + "roles.read" + ] } ], "responses": { @@ -4190,44 +4445,11 @@ } } }, - "security": [ - { - "apiKey": [] - }, - { - "oauth2": [ - "user.subaccounts", - "roles.read" - ] - } - ], - "tags": [ - "Roles" - ], - "x-codegen": { - "method_name": "get" - }, - "x-permissions": [ - { - "relation": "roles_view", - "object_type": "merchant", - "object_id_param": "merchant_code" - } - ], - "x-scopes": [ - "user.subaccounts", - "roles.read" - ] - }, - "delete": { - "operationId": "DeleteMerchantRole", - "summary": "Delete a role", - "description": "Delete a custom role.", "parameters": [ { "name": "merchant_code", - "in": "path", "description": "Short unique identifier for the merchant.", + "in": "path", "required": true, "schema": { "type": "string", @@ -4235,8 +4457,8 @@ } }, { - "name": "role_id", "in": "path", + "name": "role_id", "description": "The ID of the role to retrieve.", "required": true, "schema": { @@ -4244,10 +4466,43 @@ "example": "role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP" } } + ] + }, + "delete": { + "operationId": "DeleteMerchantRole", + "summary": "Delete a role", + "description": "Delete a custom role.", + "tags": [ + "Roles" ], - "responses": { - "200": { - "description": "Returns an empty response if the role deletion succeeded." + "security": [ + { + "apiKey": [] + }, + { + "oauth2": [ + "user.subaccounts", + "roles.write" + ] + } + ], + "x-codegen": { + "method_name": "delete" + }, + "x-permissions": [ + { + "relation": "roles_delete", + "object_type": "merchant", + "object_id_param": "merchant_code" + } + ], + "x-scopes": [ + "user.subaccounts", + "roles.write" + ], + "responses": { + "200": { + "description": "Returns an empty response if the role deletion succeeded." }, "400": { "description": "Invalid request.", @@ -4282,6 +4537,36 @@ } } }, + "parameters": [ + { + "name": "merchant_code", + "description": "Short unique identifier for the merchant.", + "in": "path", + "required": true, + "schema": { + "type": "string", + "example": "MK10CL2A" + } + }, + { + "in": "path", + "name": "role_id", + "description": "The ID of the role to retrieve.", + "required": true, + "schema": { + "type": "string", + "example": "role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP" + } + } + ] + }, + "patch": { + "operationId": "UpdateMerchantRole", + "summary": "Update a role", + "description": "Update a custom role.", + "tags": [ + "Roles" + ], "security": [ { "apiKey": [] @@ -4293,15 +4578,12 @@ ] } ], - "tags": [ - "Roles" - ], "x-codegen": { - "method_name": "delete" + "method_name": "update" }, "x-permissions": [ { - "relation": "roles_delete", + "relation": "roles_update", "object_type": "merchant", "object_id_param": "merchant_code" } @@ -4309,33 +4591,6 @@ "x-scopes": [ "user.subaccounts", "roles.write" - ] - }, - "patch": { - "operationId": "UpdateMerchantRole", - "summary": "Update a role", - "description": "Update a custom role.", - "parameters": [ - { - "name": "merchant_code", - "in": "path", - "description": "Short unique identifier for the merchant.", - "required": true, - "schema": { - "type": "string", - "example": "MK10CL2A" - } - }, - { - "name": "role_id", - "in": "path", - "description": "The ID of the role to retrieve.", - "required": true, - "schema": { - "type": "string", - "example": "role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP" - } - } ], "requestBody": { "required": true, @@ -4345,13 +4600,14 @@ "type": "object", "properties": { "name": { - "description": "User-defined name of the role.", "type": "string", - "example": "Senior Shop Manager II" + "example": "Senior Shop Manager II", + "description": "User-defined name of the role." }, "permissions": { - "description": "User's permissions.", "type": "array", + "description": "User's permissions.", + "maxItems": 100, "items": { "type": "string" }, @@ -4359,13 +4615,12 @@ "catalog_access", "taxes_access", "members_access" - ], - "maxItems": 100 + ] }, "description": { - "description": "User-defined description of the role.", "type": "string", - "example": "Manges the shop and the employees." + "example": "Manges the shop and the employees.", + "description": "User-defined description of the role." } }, "example": { @@ -4424,33 +4679,27 @@ } } }, - "security": [ + "parameters": [ { - "apiKey": [] + "name": "merchant_code", + "description": "Short unique identifier for the merchant.", + "in": "path", + "required": true, + "schema": { + "type": "string", + "example": "MK10CL2A" + } }, { - "oauth2": [ - "user.subaccounts", - "roles.write" - ] - } - ], - "tags": [ - "Roles" - ], - "x-codegen": { - "method_name": "update" - }, - "x-permissions": [ - { - "relation": "roles_update", - "object_type": "merchant", - "object_id_param": "merchant_code" + "in": "path", + "name": "role_id", + "description": "The ID of the role to retrieve.", + "required": true, + "schema": { + "type": "string", + "example": "role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP" + } } - ], - "x-scopes": [ - "user.subaccounts", - "roles.write" ] } }, @@ -4459,11 +4708,14 @@ "operationId": "GetMerchant", "summary": "Get Merchant", "description": "Returns a Merchant for a valid Merchant code.", + "tags": [ + "Merchants" + ], "parameters": [ { "name": "version", - "in": "query", "description": "The version of the resource. At the moment, the only supported value is `latest`. When provided and the requested resource's `change_status` is pending, the resource will be returned with all pending changes applied. When no changes are pending the resource is returned as is. The `change_status` in the response body will reflect the current state of the resource.\n", + "in": "query", "schema": { "type": "string", "examples": [ @@ -4473,8 +4725,8 @@ }, { "name": "merchant_code", - "in": "path", "description": "Short unique identifier for the merchant.", + "in": "path", "required": true, "schema": { "type": "string", @@ -4482,6 +4734,31 @@ } } ], + "externalDocs": { + "description": "Merchant documentation", + "url": "https://developer.sumup.com/tools/models/merchant" + }, + "x-codegen": { + "method_name": "get" + }, + "x-scopes": [ + "user.profile", + "user.profile_readonly" + ], + "x-permissions": [ + "merchant_read" + ], + "security": [ + { + "apiKey": [] + }, + { + "oauth2": [ + "user.profile", + "user.profile_readonly" + ] + } + ], "responses": { "200": { "description": "Returns a Merchant for a valid identifier.", @@ -4503,35 +4780,7 @@ } } } - }, - "externalDocs": { - "description": "Merchant documentation", - "url": "https://developer.sumup.com/tools/models/merchant" - }, - "security": [ - { - "apiKey": [] - }, - { - "oauth2": [ - "user.profile", - "user.profile_readonly" - ] - } - ], - "tags": [ - "Merchants" - ], - "x-codegen": { - "method_name": "get" - }, - "x-permissions": [ - "merchant_read" - ], - "x-scopes": [ - "user.profile", - "user.profile_readonly" - ] + } } }, "/v1/merchants/{merchant_code}/persons": { @@ -4539,11 +4788,14 @@ "operationId": "ListPersons", "summary": "List Persons", "description": "Returns the Persons related to a Merchant.", + "tags": [ + "Merchants" + ], "parameters": [ { "name": "version", - "in": "query", "description": "The version of the resource. At the moment, the only supported value is `latest`. When provided and the requested resource's `change_status` is pending, the resource will be returned with all pending changes applied. When no changes are pending the resource is returned as is. The `change_status` in the response body will reflect the current state of the resource.\n", + "in": "query", "schema": { "type": "string", "examples": [ @@ -4553,8 +4805,8 @@ }, { "name": "merchant_code", - "in": "path", "description": "Short unique identifier for the merchant.", + "in": "path", "required": true, "schema": { "type": "string", @@ -4562,6 +4814,31 @@ } } ], + "externalDocs": { + "description": "Persons documentation", + "url": "https://developer.sumup.com/tools/models/merchant#persons" + }, + "x-scopes": [ + "user.profile", + "user.profile_readonly" + ], + "x-permissions": [ + "persons_read" + ], + "x-codegen": { + "method_name": "list_persons" + }, + "security": [ + { + "apiKey": [] + }, + { + "oauth2": [ + "user.profile", + "user.profile_readonly" + ] + } + ], "responses": { "200": { "description": "Returns a list of Persons for a valid Merchant identifier.", @@ -4583,47 +4860,22 @@ } } } - }, - "externalDocs": { - "description": "Persons documentation", - "url": "https://developer.sumup.com/tools/models/merchant#persons" - }, - "security": [ - { - "apiKey": [] - }, - { - "oauth2": [ - "user.profile", - "user.profile_readonly" - ] - } - ], + } + } + }, + "/v1/merchants/{merchant_code}/persons/{person_id}": { + "get": { + "operationId": "GetPerson", + "summary": "Get Person", + "description": "Returns a single Person related to a Merchant.", "tags": [ "Merchants" ], - "x-codegen": { - "method_name": "list_persons" - }, - "x-permissions": [ - "persons_read" - ], - "x-scopes": [ - "user.profile", - "user.profile_readonly" - ] - } - }, - "/v1/merchants/{merchant_code}/persons/{person_id}": { - "get": { - "operationId": "GetPerson", - "summary": "Get Person", - "description": "Returns a single Person related to a Merchant.", "parameters": [ { "name": "version", - "in": "query", "description": "The version of the resource. At the moment, the only supported value is `latest`. When provided and the requested resource's `change_status` is pending, the resource will be returned with all pending changes applied. When no changes are pending the resource is returned as is. The `change_status` in the response body will reflect the current state of the resource.\n", + "in": "query", "schema": { "type": "string", "examples": [ @@ -4633,8 +4885,8 @@ }, { "name": "merchant_code", - "in": "path", "description": "Short unique identifier for the merchant.", + "in": "path", "required": true, "schema": { "type": "string", @@ -4643,8 +4895,8 @@ }, { "name": "person_id", - "in": "path", "description": "Person ID", + "in": "path", "required": true, "schema": { "type": "string", @@ -4656,6 +4908,31 @@ } } ], + "externalDocs": { + "description": "Persons documentation", + "url": "https://developer.sumup.com/tools/models/merchant#persons" + }, + "x-scopes": [ + "user.profile", + "user.profile_readonly" + ], + "x-permissions": [ + "persons_read" + ], + "x-codegen": { + "method_name": "get_person" + }, + "security": [ + { + "apiKey": [] + }, + { + "oauth2": [ + "user.profile", + "user.profile_readonly" + ] + } + ], "responses": { "200": { "description": "Returns a Person for a valid identifier.", @@ -4677,52 +4954,40 @@ } } } - }, - "externalDocs": { - "description": "Persons documentation", - "url": "https://developer.sumup.com/tools/models/merchant#persons" - }, - "security": [ - { - "apiKey": [] - }, - { - "oauth2": [ - "user.profile", - "user.profile_readonly" - ] - } - ], + } + } + }, + "/v0.1/merchants/{merchant_code}/readers": { + "get": { + "summary": "List Readers", + "description": "List all readers of the merchant.", + "operationId": "ListReaders", "tags": [ - "Merchants" + "Readers" ], "x-codegen": { - "method_name": "get_person" + "method_name": "list" }, "x-permissions": [ - "persons_read" + { + "relation": "readers_list", + "object_type": "merchant", + "object_id_param": "merchant_code" + } ], "x-scopes": [ - "user.profile", - "user.profile_readonly" - ] - } - }, - "/v0.1/merchants/{merchant_code}/readers": { - "get": { - "operationId": "ListReaders", - "summary": "List Readers", - "description": "List all readers of the merchant.", - "parameters": [ + "readers.read", + "terminals.read" + ], + "security": [ { - "name": "merchant_code", - "in": "path", - "description": "Short unique identifier for the merchant.", - "required": true, - "schema": { - "type": "string", - "example": "MK10CL2A" - } + "apiKey": [] + }, + { + "oauth2": [ + "readers.read", + "terminals.read" + ] } ], "responses": { @@ -4732,6 +4997,9 @@ "application/json": { "schema": { "type": "object", + "required": [ + "items" + ], "properties": { "items": { "type": "array", @@ -4739,10 +5007,7 @@ "$ref": "#/components/schemas/Reader" } } - }, - "required": [ - "items" - ] + } } } } @@ -4764,49 +5029,49 @@ } } }, - "security": [ - { - "apiKey": [] - }, + "parameters": [ { - "oauth2": [ - "readers.read", - "terminals.read" - ] + "name": "merchant_code", + "description": "Short unique identifier for the merchant.", + "in": "path", + "required": true, + "schema": { + "type": "string", + "example": "MK10CL2A" + } } - ], + ] + }, + "post": { + "summary": "Create a Reader", + "operationId": "CreateReader", + "description": "Create a new Reader for the merchant account.", "tags": [ "Readers" ], "x-codegen": { - "method_name": "list" + "method_name": "create" }, "x-permissions": [ { - "relation": "readers_list", + "relation": "readers_create", "object_type": "merchant", "object_id_param": "merchant_code" } ], "x-scopes": [ - "readers.read", - "terminals.read" - ] - }, - "post": { - "operationId": "CreateReader", - "summary": "Create a Reader", - "description": "Create a new Reader for the merchant account.", - "parameters": [ + "readers.write", + "terminals.write" + ], + "security": [ { - "name": "merchant_code", - "in": "path", - "description": "Short unique identifier for the merchant.", - "required": true, - "schema": { - "type": "string", - "example": "MK10CL2A" - } + "apiKey": [] + }, + { + "oauth2": [ + "readers.write", + "terminals.write" + ] } ], "requestBody": { @@ -4815,6 +5080,10 @@ "application/json": { "schema": { "type": "object", + "required": [ + "pairing_code", + "name" + ], "properties": { "pairing_code": { "$ref": "#/components/schemas/ReaderPairingCode" @@ -4825,11 +5094,7 @@ "metadata": { "$ref": "#/components/schemas/Metadata" } - }, - "required": [ - "pairing_code", - "name" - ] + } } } } @@ -4926,45 +5191,57 @@ } } }, - "security": [ - { - "apiKey": [] - }, + "parameters": [ { - "oauth2": [ - "readers.write", - "terminals.write" - ] + "name": "merchant_code", + "description": "Short unique identifier for the merchant.", + "in": "path", + "required": true, + "schema": { + "type": "string", + "example": "MK10CL2A" + } } - ], + ] + } + }, + "/v0.1/merchants/{merchant_code}/readers/{reader_id}": { + "get": { + "summary": "Retrieve a Reader", + "description": "Retrieve a Reader.", + "operationId": "GetReader", "tags": [ "Readers" ], "x-codegen": { - "method_name": "create" + "method_name": "get" }, "x-permissions": [ { - "relation": "readers_create", + "relation": "readers_view", "object_type": "merchant", "object_id_param": "merchant_code" } ], "x-scopes": [ - "readers.write", - "terminals.write" - ] - } - }, - "/v0.1/merchants/{merchant_code}/readers/{reader_id}": { - "get": { - "operationId": "GetReader", - "summary": "Retrieve a Reader", - "description": "Retrieve a Reader.", + "readers.read", + "terminals.read" + ], + "security": [ + { + "apiKey": [] + }, + { + "oauth2": [ + "readers.read", + "terminals.read" + ] + } + ], "parameters": [ { - "name": "If-Modified-Since", "in": "header", + "name": "If-Modified-Since", "description": "Return the reader only if it has been modified after the specified timestamp given in the headers.\n\nTimestamps are accepted in the following formats:\n\n - HTTP Standard: [IMF format (RFC 5322)](https://www.rfc-editor.org/rfc/rfc5322#section-3.3), sometimes also referred to as [RFC 7231](https://www.rfc-editor.org/rfc/rfc7231#section-7.1.1.1).\n - RFC 3339: Used for timestamps in JSON payloads on this API.", "required": false, "schema": { @@ -4978,15 +5255,15 @@ { "format": "date-time", "type": "string", - "example": "2023-05-30T10:38:01+00:00" + "example": "2023-05-30T10:38:01Z" } ] } }, { "name": "merchant_code", - "in": "path", "description": "Short unique identifier for the merchant.", + "in": "path", "required": true, "schema": { "type": "string", @@ -5030,59 +5307,38 @@ } } } + } + }, + "delete": { + "summary": "Delete a reader", + "description": "Delete a reader.", + "operationId": "DeleteReader", + "tags": [ + "Readers" + ], + "x-codegen": { + "method_name": "delete" }, - "security": [ + "x-permissions": [ { - "apiKey": [] - }, - { - "oauth2": [ - "readers.read", - "terminals.read" - ] - } - ], - "tags": [ - "Readers" - ], - "x-codegen": { - "method_name": "get" - }, - "x-permissions": [ - { - "relation": "readers_view", + "relation": "readers_delete", "object_type": "merchant", "object_id_param": "merchant_code" } ], "x-scopes": [ - "readers.read", - "terminals.read" - ] - }, - "delete": { - "operationId": "DeleteReader", - "summary": "Delete a reader", - "description": "Delete a reader.", - "parameters": [ + "readers.write", + "terminals.write" + ], + "security": [ { - "name": "merchant_code", - "in": "path", - "description": "Short unique identifier for the merchant.", - "required": true, - "schema": { - "type": "string", - "example": "MK10CL2A" - } + "apiKey": [] }, { - "name": "reader_id", - "in": "path", - "description": "The unique identifier of the reader.", - "required": true, - "schema": { - "$ref": "#/components/schemas/ReaderID" - } + "oauth2": [ + "readers.write", + "terminals.write" + ] } ], "responses": { @@ -5106,26 +5362,41 @@ } } }, - "security": [ + "parameters": [ { - "apiKey": [] + "name": "merchant_code", + "description": "Short unique identifier for the merchant.", + "in": "path", + "required": true, + "schema": { + "type": "string", + "example": "MK10CL2A" + } }, { - "oauth2": [ - "readers.write", - "terminals.write" - ] + "name": "reader_id", + "in": "path", + "description": "The unique identifier of the reader.", + "required": true, + "schema": { + "$ref": "#/components/schemas/ReaderID" + } } - ], + ] + }, + "patch": { + "summary": "Update a Reader", + "description": "Update a Reader.", + "operationId": "UpdateReader", "tags": [ "Readers" ], "x-codegen": { - "method_name": "delete" + "method_name": "update" }, "x-permissions": [ { - "relation": "readers_delete", + "relation": "readers_update", "object_type": "merchant", "object_id_param": "merchant_code" } @@ -5133,31 +5404,16 @@ "x-scopes": [ "readers.write", "terminals.write" - ] - }, - "patch": { - "operationId": "UpdateReader", - "summary": "Update a Reader", - "description": "Update a Reader.", - "parameters": [ + ], + "security": [ { - "name": "merchant_code", - "in": "path", - "description": "Short unique identifier for the merchant.", - "required": true, - "schema": { - "type": "string", - "example": "MK10CL2A" - } + "apiKey": [] }, { - "name": "reader_id", - "in": "path", - "description": "The unique identifier of the reader.", - "required": true, - "schema": { - "$ref": "#/components/schemas/ReaderID" - } + "oauth2": [ + "readers.write", + "terminals.write" + ] } ], "requestBody": { @@ -5222,87 +5478,102 @@ } } }, - "security": [ + "parameters": [ { - "apiKey": [] + "name": "merchant_code", + "description": "Short unique identifier for the merchant.", + "in": "path", + "required": true, + "schema": { + "type": "string", + "example": "MK10CL2A" + } }, { - "oauth2": [ - "readers.write", - "terminals.write" - ] - } - ], - "tags": [ - "Readers" - ], - "x-codegen": { - "method_name": "update" - }, - "x-permissions": [ - { - "relation": "readers_update", - "object_type": "merchant", - "object_id_param": "merchant_code" + "name": "reader_id", + "in": "path", + "description": "The unique identifier of the reader.", + "required": true, + "schema": { + "$ref": "#/components/schemas/ReaderID" + } } - ], - "x-scopes": [ - "readers.write", - "terminals.write" ] } }, "/v0.1/merchants/{merchant_code}/readers/{reader_id}/checkout": { "post": { - "operationId": "CreateReaderCheckout", - "summary": "Create a Reader Checkout", + "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" + } + } + } + } + } + }, "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", + "operationId": "CreateReaderCheckout", "parameters": [ { - "name": "merchant_code", - "in": "path", "description": "Merchant Code", + "example": "MC0X0ABC", + "in": "path", + "name": "merchant_code", "required": true, "schema": { "type": "string" - }, - "example": "MC0X0ABC" + } }, { - "name": "reader_id", - "in": "path", "description": "The unique identifier of the Reader", + "example": "rdr_3MSAFM23CK82VSTT4BN6RWSQ65", + "in": "path", + "name": "reader_id", "required": true, "schema": { "type": "string" - }, - "example": "rdr_3MSAFM23CK82VSTT4BN6RWSQ65" + } } ], "requestBody": { - "description": "A checkout initial attributes", - "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateReaderCheckoutRequest" } } - } + }, + "description": "A checkout initial attributes", + "required": true }, "responses": { "201": { - "description": "The Checkout got successfully created for the given reader.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateReaderCheckoutResponse" } } - } + }, + "description": "The Checkout got successfully created for the given reader." }, "400": { - "description": "Response when given params (or one of them) are invalid", "content": { "application/json": { "schema": { @@ -5320,10 +5591,10 @@ "$ref": "#/components/schemas/Problem" } } - } + }, + "description": "Response when given params (or one of them) are invalid" }, "401": { - "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -5341,10 +5612,10 @@ "$ref": "#/components/schemas/Problem" } } - } + }, + "description": "Unauthorized" }, "404": { - "description": "Response when given reader is not found", "content": { "application/json": { "schema": { @@ -5362,10 +5633,10 @@ "$ref": "#/components/schemas/Problem" } } - } + }, + "description": "Response when given reader is not found" }, "422": { - "description": "Response when given params (or one of them) are invalid", "content": { "application/json": { "schema": { @@ -5383,31 +5654,8 @@ "$ref": "#/components/schemas/Problem" } } - } - } - }, - "callbacks": { - "ReaderCheckoutStatusChange": { - "{$request.body#/return_url}": { - "post": { - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReaderCheckoutStatusChange" - } - } - } - }, - "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" - } - }, - "callbacks": {} - } - } + }, + "description": "Response when given params (or one of them) are invalid" } }, "security": [ @@ -5420,6 +5668,7 @@ ] } ], + "summary": "Create a Reader Checkout", "tags": [ "Readers" ], @@ -5427,7 +5676,7 @@ "method_name": "create_checkout" }, "x-permissions": [ - "readers_checkout_create" + "readers.checkouts.create" ], "x-scopes": [ "readers.write" @@ -5436,44 +5685,43 @@ }, "/v0.1/merchants/{merchant_code}/readers/{reader_id}/status": { "get": { - "operationId": "GetReaderStatus", - "summary": "Get a Reader Status", + "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": [ { - "name": "merchant_code", - "in": "path", "description": "Merchant Code", + "example": "MC0X0ABC", + "in": "path", + "name": "merchant_code", "required": true, "schema": { "type": "string" - }, - "example": "MC0X0ABC" + } }, { - "name": "reader_id", - "in": "path", "description": "The unique identifier of the Reader", + "example": "rdr_3MSAFM23CK82VSTT4BN6RWSQ65", + "in": "path", + "name": "reader_id", "required": true, "schema": { "type": "string" - }, - "example": "rdr_3MSAFM23CK82VSTT4BN6RWSQ65" + } } ], "responses": { "200": { - "description": "Response with the device status.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StatusResponse" } } - } + }, + "description": "Response with the device status." }, "400": { - "description": "Response when given params (or one of them) are invalid", "content": { "application/json": { "schema": { @@ -5491,10 +5739,10 @@ "$ref": "#/components/schemas/Problem" } } - } + }, + "description": "Response when given params (or one of them) are invalid" }, "401": { - "description": "Response when given merchant's token is invalid", "content": { "application/json": { "schema": { @@ -5512,10 +5760,10 @@ "$ref": "#/components/schemas/Problem" } } - } + }, + "description": "Response when given merchant's token is invalid" }, "404": { - "description": "Response when given reader is not found", "content": { "application/json": { "schema": { @@ -5533,10 +5781,10 @@ "$ref": "#/components/schemas/Problem" } } - } + }, + "description": "Response when given reader is not found" } }, - "callbacks": {}, "security": [ { "apiKey": [] @@ -5547,6 +5795,7 @@ ] } ], + "summary": "Get a Reader Status", "tags": [ "Readers" ], @@ -5554,7 +5803,7 @@ "method_name": "get_status" }, "x-permissions": [ - "readers_view" + "readers.view" ], "x-scopes": [ "readers.read" @@ -5563,47 +5812,46 @@ }, "/v0.1/merchants/{merchant_code}/readers/{reader_id}/terminate": { "post": { - "operationId": "CreateReaderTerminate", - "summary": "Terminate a Reader Checkout", + "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": [ { - "name": "merchant_code", - "in": "path", "description": "Merchant Code", + "example": "MC0X0ABC", + "in": "path", + "name": "merchant_code", "required": true, "schema": { "type": "string" - }, - "example": "MC0X0ABC" + } }, { - "name": "reader_id", - "in": "path", "description": "The unique identifier of the Reader", + "example": "rdr_3MSAFM23CK82VSTT4BN6RWSQ65", + "in": "path", + "name": "reader_id", "required": true, "schema": { "type": "string" - }, - "example": "rdr_3MSAFM23CK82VSTT4BN6RWSQ65" + } } ], "requestBody": { - "description": "A checkout initial attributes", - "required": false, "content": { "application/json": {} - } + }, + "description": "A checkout initial attributes", + "required": false }, "responses": { "202": { - "description": "The Terminate action was successfully dispatched for the given reader.", "content": { "application/json": {} - } + }, + "description": "The Terminate action was successfully dispatched for the given reader." }, "400": { - "description": "Response when given params (or one of them) are invalid", "content": { "application/json": { "schema": { @@ -5621,10 +5869,10 @@ "$ref": "#/components/schemas/Problem" } } - } + }, + "description": "Response when given params (or one of them) are invalid" }, "401": { - "description": "Unauthorized", "content": { "application/json": { "schema": { @@ -5642,10 +5890,10 @@ "$ref": "#/components/schemas/Problem" } } - } + }, + "description": "Unauthorized" }, "404": { - "description": "Response when given reader is not found", "content": { "application/json": { "schema": { @@ -5663,10 +5911,10 @@ "$ref": "#/components/schemas/Problem" } } - } + }, + "description": "Response when given reader is not found" }, "422": { - "description": "Response when given params (or one of them) are invalid", "content": { "application/json": { "schema": { @@ -5684,10 +5932,10 @@ "$ref": "#/components/schemas/Problem" } } - } + }, + "description": "Response when given params (or one of them) are invalid" } }, - "callbacks": {}, "security": [ { "apiKey": [] @@ -5698,6 +5946,7 @@ ] } ], + "summary": "Terminate a Reader Checkout", "tags": [ "Readers" ], @@ -5705,265 +5954,198 @@ "method_name": "terminate_checkout" }, "x-permissions": [ - "readers_checkout_create" + "readers.checkouts.delete" ], "x-scopes": [ "readers.write" ] } + }, + "/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" + } + }, + { + "description": "The unique identifier of the Reader", + "example": "rdr_3MSAFM23CK82VSTT4BN6RWSQ65", + "in": "path", + "name": "reader_id", + "required": true, + "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": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetReaderCheckoutResponse" + } + } + }, + "description": "The Checkout got successfully retrieved for the given reader." + }, + "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" + }, + "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": [] + }, + { + "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" + ] + } } }, "components": { - "parameters": { - "ChangesSinceFilter": { - "name": "changes_since", - "in": "query", - "description": "Filters the results by the latest modification time of resources and returns only transactions that are modified *at or after* the specified timestamp (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format).", - "required": false, - "schema": { - "type": "string", - "format": "date-time" - } - }, - "CheckoutID": { - "name": "checkout_id", - "in": "path", - "required": true, - "description": "Unique ID of the checkout resource.", - "schema": { - "type": "string" - } - }, - "CheckoutReference": { - "name": "checkout_reference", - "in": "query", - "description": "Filters the list of checkout resources by the unique ID of the checkout.", - "required": false, - "schema": { - "type": "string" - } - }, - "CustomerID": { - "name": "customer_id", - "in": "path", - "required": true, - "description": "Unique ID of the saved customer resource.", - "schema": { - "type": "string" - } - }, - "EntryModesFilter": { - "name": "entry_modes[]", - "in": "query", - "description": "Filters the returned results by the specified list of entry modes.", - "required": false, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntryMode" + "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" + }, + "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" + }, + "line_1": { + "type": "string", + "description": "First line of the address with details of the street name and number.", + "example": "Sample street" + }, + "line_2": { + "type": "string", + "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" } } }, - "LimitFilter": { - "name": "limit", - "in": "query", - "description": "Specifies the maximum number of results per page. Value must be a positive integer and if not specified, will return 10 results.", - "schema": { - "type": "integer" - } - }, - "NewestRefFilter": { - "name": "newest_ref", - "in": "query", - "description": "Filters the results by the reference ID of transaction events and returns only transactions with events whose IDs are *smaller* than the specified value. This parameters supersedes the `newest_time` parameter (if both are provided in the request).", - "required": false, - "schema": { - "type": "string" - } - }, - "NewestTimeFilter": { - "name": "newest_time", - "in": "query", - "description": "Filters the results by the creation time of resources and returns only transactions that are created *before* the specified timestamp (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format).", - "required": false, - "schema": { - "type": "string", - "format": "date-time" - } - }, - "OrderFilter": { - "name": "order", - "in": "query", - "description": "Specifies the order in which the returned results are displayed.", - "schema": { - "type": "string", - "default": "ascending", - "enum": [ - "ascending", - "descending" - ] - } - }, - "PaymentTypesFilter": { - "name": "payment_types[]", - "in": "query", - "description": "Filters the returned results by the specified list of payment types used for the transactions.", - "required": false, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentType" - } - } - }, - "StatusesFilter": { - "name": "statuses[]", - "in": "query", - "description": "Filters the returned results by the specified list of final statuses of the transactions.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "SUCCESSFUL", - "CANCELLED", - "FAILED", - "REFUNDED", - "CHARGE_BACK" - ] - } - } - }, - "Token": { - "name": "token", - "in": "path", - "required": true, - "description": "Unique token identifying the card saved as a payment instrument resource.", - "schema": { - "type": "string" - } - }, - "TransactionCode": { - "name": "transaction_code", - "in": "query", - "description": "Retrieves the transaction resource with the specified transaction code.", - "required": false, - "schema": { - "type": "string" - } - }, - "TransactionID": { - "name": "id", - "in": "query", - "description": "Retrieves the transaction resource with the specified transaction ID (the `id` parameter in the transaction resource).", - "required": false, - "schema": { - "type": "string" - } - }, - "TypesFilter": { - "name": "types[]", - "in": "query", - "description": "Filters the returned results by the specified list of transaction types.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "PAYMENT", - "REFUND", - "CHARGE_BACK" - ] - } - } - }, - "UsersFilter": { - "name": "users[]", - "in": "query", - "description": "Filters the returned results by user email.", - "required": false, - "example": [ - "merchant@example.com" - ], - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "email" - }, - "example": [ - "merchant@example.com" - ] - } - } - }, - "schemas": { - "AddressLegacy": { - "description": "Profile's personal address information.", - "type": "object", - "properties": { - "city": { - "description": "City name from the address.", - "type": "string", - "example": "Berlin" - }, - "country": { - "description": "Two letter country code formatted according to [ISO3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).", - "type": "string", - "example": "DE" - }, - "line_1": { - "description": "First line of the address with details of the street name and number.", - "type": "string", - "example": "Sample street" - }, - "line_2": { - "description": "Second line of the address with details of the building, unit, apartment, and floor numbers.", - "type": "string", - "example": "ap. 5" - }, - "postal_code": { - "description": "Postal code from the address.", - "type": "string", - "example": "10115" - }, - "state": { - "description": "State name or abbreviation from the address.", - "type": "string", - "example": "Berlin" - } - }, - "title": "Address Legacy" - }, "Card": { - "description": "__Required when payment type is `card`.__ Details of the payment card.", + "title": "Card", "type": "object", + "description": "__Required when payment type is `card`.__ Details of the payment card.", "properties": { "name": { - "description": "Name of the cardholder as it appears on the payment card.", "type": "string", - "example": "FIRSTNAME LASTNAME", - "writeOnly": true + "description": "Name of the cardholder as it appears on the payment card.", + "writeOnly": true, + "example": "FIRSTNAME LASTNAME" }, "number": { - "description": "Number of the payment card (without spaces).", "type": "string", - "example": "1234567890123456", - "writeOnly": true + "description": "Number of the payment card (without spaces).", + "writeOnly": true, + "example": "1234567890123456" }, "expiry_year": { - "description": "Year from the expiration time of the payment card. Accepted formats are `YY` and `YYYY`.", "type": "string", - "example": "2023", - "maxLength": 4, + "description": "Year from the expiration time of the payment card. Accepted formats are `YY` and `YYYY`.", + "writeOnly": true, "minLength": 2, - "writeOnly": true + "maxLength": 4, + "example": "2023" }, "expiry_month": { - "description": "Month from the expiration time of the payment card. Accepted format is `MM`.", "type": "string", + "description": "Month from the expiration time of the payment card. Accepted format is `MM`.", + "writeOnly": true, "enum": [ "01", "02", @@ -5977,24 +6159,23 @@ "10", "11", "12" - ], - "writeOnly": true + ] }, "cvv": { - "description": "Three or four-digit card verification value (security code) of the payment card.", "type": "string", - "example": "123", + "description": "Three or four-digit card verification value (security code) of the payment card.", + "writeOnly": true, "maxLength": 4, "minLength": 3, - "writeOnly": true + "example": "123" }, "zip_code": { - "description": "Required five-digit ZIP code. Applicable only to merchant users in the USA.", "type": "string", - "example": "12345", + "description": "Required five-digit ZIP code. Applicable only to merchant users in the USA.", + "writeOnly": true, "maxLength": 5, "minLength": 5, - "writeOnly": true + "example": "12345" }, "type": { "$ref": "#/components/schemas/CardType" @@ -6007,194 +6188,184 @@ "expiry_year", "cvv", "type" - ], - "title": "Card" + ] }, "CardResponse": { - "description": "Details of the payment card.", + "title": "Card Response", "type": "object", + "description": "Details of the payment card.", "properties": { "last_4_digits": { - "description": "Last 4 digits of the payment card number.", "type": "string", - "example": "3456", - "maxLength": 4, + "description": "Last 4 digits of the payment card number.", + "readOnly": true, "minLength": 4, - "readOnly": true + "maxLength": 4, + "example": "3456" }, "type": { "$ref": "#/components/schemas/CardType" } - }, - "title": "Card Response" + } }, "Device": { + "title": "Device", "description": "Details of the device used to create the transaction.", "type": "object", "properties": { "name": { - "description": "Device name.", "type": "string", + "description": "Device name.", "example": "m0xx" }, "system_name": { - "description": "Device OS.", "type": "string", + "description": "Device OS.", "example": "Android" }, "model": { - "description": "Device model.", "type": "string", + "description": "Device model.", "example": "GT-I9300" }, "system_version": { - "description": "Device OS version.", "type": "string", + "description": "Device OS version.", "example": "4.3" }, "uuid": { - "description": "Device UUID.", "type": "string", + "description": "Device UUID.", "example": "3ae2a6b7-fb0d-3b50-adbf-cb7e2db30cd2" } - }, - "title": "Device" + } }, "ElvCardAccount": { + "title": "ELV Card Account", "description": "Details of the ELV card account associated with the transaction.", "type": "object", "properties": { "sort_code": { - "description": "ELV card sort code.", "type": "string", + "description": "ELV card sort code.", "example": "87096214" }, "last_4_digits": { - "description": "ELV card account number last 4 digits.", "type": "string", + "description": "ELV card account number last 4 digits.", "example": "5674" }, "sequence_no": { - "description": "ELV card sequence number.", "type": "integer", + "description": "ELV card sequence number.", "example": 1 }, "iban": { - "description": "ELV IBAN.", "type": "string", + "description": "ELV IBAN.", "example": "DE60870962140012345674" } - }, - "title": "ELV Card Account" + } }, "HostedCheckout": { - "description": "Hosted Checkout configuration. Enable it to receive a SumUp-hosted payment page URL in the checkout response.", + "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": { - "description": "Whether the checkout should include a SumUp-hosted payment page.", "type": "boolean", + "description": "Whether the checkout should include a SumUp-hosted payment page.", "example": true } }, "required": [ "enabled" - ], - "title": "Hosted Checkout" + ] }, "Checkout": { - "description": "Core checkout resource returned by the Checkouts API. A checkout is created before payment processing and then updated as payment attempts, redirects, and resulting transactions are attached to it.", "type": "object", + "title": "Checkout", + "description": "Core checkout resource returned by the Checkouts API. A checkout is created before payment processing and then updated as payment attempts, redirects, and resulting transactions are attached to it.", "properties": { "checkout_reference": { - "description": "Merchant-defined reference for the checkout. Use it to correlate the SumUp checkout with your own order, cart, subscription, or payment attempt in your systems.", "type": "string", - "example": "f00a8f74-b05d-4605-bd73-2a901bae5802", - "maxLength": 90 + "maxLength": 90, + "description": "Merchant-defined reference for the checkout. Use it to correlate the SumUp checkout with your own order, cart, subscription, or payment attempt in your systems.", + "example": "f00a8f74-b05d-4605-bd73-2a901bae5802" }, "amount": { - "description": "Amount to be charged to the payer, expressed in major units.", "type": "number", "format": "float", + "description": "Amount to be charged to the payer, expressed in major units.", "example": 10.1 }, "currency": { "$ref": "#/components/schemas/Currency" }, "merchant_code": { - "description": "Merchant account that receives the payment.", "type": "string", + "description": "Merchant account that receives the payment.", "example": "MH4H92C7" }, "description": { - "description": "Short merchant-defined description shown in SumUp tools and reporting. Use it to make the checkout easier to recognize in dashboards, support workflows, and reconciliation.", "type": "string", + "description": "Short merchant-defined description shown in SumUp tools and reporting. Use it to make the checkout easier to recognize in dashboards, support workflows, and reconciliation.", "example": "Purchase" }, "return_url": { - "description": "Optional backend callback URL used by SumUp to notify your platform about processing updates for the checkout.", "type": "string", "format": "uri", + "description": "Optional backend callback URL used by SumUp to notify your platform about processing updates for the checkout.", "example": "http://example.com" }, "id": { - "description": "Unique SumUp identifier of the checkout resource.", "type": "string", - "example": "4e425463-3e1b-431d-83fa-1e51c2925e99", - "readOnly": true + "description": "Unique SumUp identifier of the checkout resource.", + "readOnly": true, + "example": "4e425463-3e1b-431d-83fa-1e51c2925e99" }, "status": { - "description": "Current high-level state of the checkout. `PENDING` means the checkout exists but is not yet completed, `PAID` means a payment succeeded, `FAILED` means the latest processing attempt failed, and `EXPIRED` means the checkout can no longer be processed.", "type": "string", - "example": "PENDING", + "description": "Current high-level state of the checkout. `PENDING` means the checkout exists but is not yet completed, `PAID` means a payment succeeded, `FAILED` means the latest processing attempt failed, and `EXPIRED` means the checkout can no longer be processed.", "enum": [ "PENDING", "FAILED", "PAID", "EXPIRED" - ] + ], + "example": "PENDING" }, "date": { - "description": "Date and time of the creation of the payment checkout. Response format expressed according to [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) code.", "type": "string", + "example": "2020-02-29T10:56:56+00:00", "format": "date-time", - "example": "2020-02-29T10:56:56+00:00" + "description": "Date and time of the creation of the payment checkout. Response format expressed according to [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) code." }, "valid_until": { - "description": "Optional expiration timestamp. The checkout must be processed before this moment, otherwise it becomes unusable. If omitted, the checkout does not have an explicit expiry time.", "type": "string", - "format": "date-time", "example": "2020-02-29T10:56:56+00:00", + "format": "date-time", + "description": "Optional expiration timestamp. The checkout must be processed before this moment, otherwise it becomes unusable. If omitted, the checkout does not have an explicit expiry time.", "nullable": true }, "customer_id": { - "description": "Merchant-scoped identifier of the customer associated with the checkout. Use it when storing payment instruments or reusing saved customer context for recurring and returning-payer flows.", "type": "string", + "description": "Merchant-scoped identifier of the customer associated with the checkout. Use it when storing payment instruments or reusing saved customer context for recurring and returning-payer flows.", "example": "831ff8d4cd5958ab5670" }, "mandate": { "$ref": "#/components/schemas/MandateResponse" }, "hosted_checkout_url": { - "description": "URL of the SumUp-hosted payment page that handles the payment flow. Returned when Hosted Checkout is enabled for the checkout.", "type": "string", "format": "uri", - "example": "https://checkout.sumup.com/pay/8f9316a3-cda9-42a9-9771-54d534315676", - "readOnly": true + "description": "URL of the SumUp-hosted payment page that handles the payment flow. Returned when Hosted Checkout is enabled for the checkout.", + "readOnly": true, + "example": "https://checkout.sumup.com/pay/8f9316a3-cda9-42a9-9771-54d534315676" }, "transactions": { - "description": "Payment attempts and resulting transaction records linked to this checkout. Use the Transactions endpoints when you need the authoritative payment result and event history.", "type": "array", - "items": { - "allOf": [ - { - "$ref": "#/components/schemas/TransactionBase" - }, - { - "$ref": "#/components/schemas/TransactionCheckoutInfo" - } - ] - }, + "description": "Payment attempts and resulting transaction records linked to this checkout. Use the Transactions endpoints when you need the authoritative payment result and event history.", "example": [ { "id": "410fc44a-5956-44e1-b5cc-19c6f8d727a4", @@ -6212,54 +6383,64 @@ "auth_code": "012345" } ], - "uniqueItems": true + "uniqueItems": true, + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/TransactionBase" + }, + { + "$ref": "#/components/schemas/TransactionCheckoutInfo" + } + ] + } } - }, - "title": "Checkout" + } }, "CheckoutCreateRequest": { - "description": "Request body for creating a checkout before processing payment. Define the payment amount, currency, merchant, and optional customer or redirect behavior here.", + "title": "Checkout Create Request", "type": "object", + "description": "Request body for creating a checkout before processing payment. Define the payment amount, currency, merchant, and optional customer or redirect behavior here.", "properties": { "checkout_reference": { - "description": "Merchant-defined reference for the new checkout. It should be unique enough for you to identify the payment attempt in your own systems.", "type": "string", - "example": "f00a8f74-b05d-4605-bd73-2a901bae5802", - "maxLength": 90 + "maxLength": 90, + "description": "Merchant-defined reference for the new checkout. It should be unique enough for you to identify the payment attempt in your own systems.", + "example": "f00a8f74-b05d-4605-bd73-2a901bae5802" }, "amount": { - "description": "Amount to be charged to the payer, expressed in major units.", "type": "number", "format": "float", + "description": "Amount to be charged to the payer, expressed in major units.", "example": 10.1 }, "currency": { "$ref": "#/components/schemas/Currency" }, "merchant_code": { - "description": "Merchant account that should receive the payment.", "type": "string", + "description": "Merchant account that should receive the payment.", "example": "MH4H92C7" }, "description": { - "description": "Short merchant-defined description shown in SumUp tools and reporting for easier identification of the checkout.", "type": "string", + "description": "Short merchant-defined description shown in SumUp tools and reporting for easier identification of the checkout.", "example": "Purchase" }, "return_url": { - "description": "Optional backend callback URL used by SumUp to notify your platform about processing updates for the checkout.", "type": "string", "format": "uri", + "description": "Optional backend callback URL used by SumUp to notify your platform about processing updates for the checkout.", "example": "http://example.com/" }, "customer_id": { - "description": "Merchant-scoped customer identifier. Required when setting up recurring payments and useful when the checkout should be linked to a returning payer.", "type": "string", + "description": "Merchant-scoped customer identifier. Required when setting up recurring payments and useful when the checkout should be linked to a returning payer.", "example": "831ff8d4cd5958ab5670" }, "purpose": { - "description": "Business purpose of the checkout. Use `CHECKOUT` for a standard payment and `SETUP_RECURRING_PAYMENT` when collecting consent and payment details for future recurring charges.", "type": "string", + "description": "Business purpose of the checkout. Use `CHECKOUT` for a standard payment and `SETUP_RECURRING_PAYMENT` when collecting consent and payment details for future recurring charges.", "default": "CHECKOUT", "enum": [ "CHECKOUT", @@ -6267,16 +6448,16 @@ ] }, "valid_until": { - "description": "Optional expiration timestamp. The checkout must be processed before this moment, otherwise it becomes unusable. If omitted, the checkout does not have an explicit expiry time.", "type": "string", - "format": "date-time", "example": "2020-02-29T10:56:56+00:00", + "format": "date-time", + "description": "Optional expiration timestamp. The checkout must be processed before this moment, otherwise it becomes unusable. If omitted, the checkout does not have an explicit expiry time.", "nullable": true }, "redirect_url": { - "description": "URL where the payer should be sent after a redirect-based payment or SCA flow completes. This is required for [APMs](https://developer.sumup.com/online-payments/apm/introduction) and recommended for card checkouts that may require [3DS](https://developer.sumup.com/online-payments/features/3ds). If it is omitted, the [Payment Widget](https://developer.sumup.com/online-payments/checkouts) can render the challenge in an iframe instead of using a full-page redirect.", "type": "string", - "example": "https://mysite.com/completed_purchase" + "example": "https://mysite.com/completed_purchase", + "description": "URL where the payer should be sent after a redirect-based payment or SCA flow completes. This is required for [APMs](https://developer.sumup.com/online-payments/apm/introduction) and recommended for card checkouts that may require [3DS](https://developer.sumup.com/online-payments/features/3ds). If it is omitted, the [Payment Widget](https://developer.sumup.com/online-payments/checkouts) can render the challenge in an iframe instead of using a full-page redirect." }, "hosted_checkout": { "$ref": "#/components/schemas/HostedCheckout" @@ -6287,56 +6468,55 @@ "amount", "currency", "merchant_code" - ], - "title": "Checkout Create Request" + ] }, "CheckoutUpdateRequest": { - "description": "Request body for updating an existing checkout. Include only the fields that should be changed.", + "title": "Checkout Update Request", "type": "object", + "description": "Request body for updating an existing checkout. Include only the fields that should be changed.", "properties": { "amount": { - "description": "Updated amount to be charged to the payer, expressed in major units.", "type": "number", "format": "float", + "description": "Updated amount to be charged to the payer, expressed in major units.", "example": 12.5 }, "currency": { "$ref": "#/components/schemas/Currency" }, "description": { - "description": "Updated short merchant-defined description shown in SumUp tools and reporting.", "type": "string", + "description": "Updated short merchant-defined description shown in SumUp tools and reporting.", "example": "Updated purchase" }, "checkout_reference": { - "description": "Updated merchant-defined reference for the checkout.", "type": "string", - "example": "f00a8f74-b05d-4605-bd73-2a901bae5802", - "maxLength": 90 + "maxLength": 90, + "description": "Updated merchant-defined reference for the checkout.", + "example": "f00a8f74-b05d-4605-bd73-2a901bae5802" }, "valid_until": { - "description": "Updated expiration timestamp. The checkout must be processed before this moment, otherwise it becomes unusable.", "type": "string", - "format": "date-time", "example": "2020-02-29T10:56:56+00:00", + "format": "date-time", + "description": "Updated expiration timestamp. The checkout must be processed before this moment, otherwise it becomes unusable.", "nullable": true }, "customer_id": { - "description": "Updated merchant-scoped customer identifier associated with the checkout.", "type": "string", + "description": "Updated merchant-scoped customer identifier associated with the checkout.", "example": "831ff8d4cd5958ab5670" } - }, - "title": "Checkout Update Request" + } }, "ProcessCheckout": { - "description": "Request body for attempting payment on an existing checkout. The required companion fields depend on the selected `payment_type`, for example card details, saved-card data, or payer information required by a specific payment method.", + "title": "Process Checkout", "type": "object", + "description": "Request body for attempting payment on an existing checkout. The required companion fields depend on the selected `payment_type`, for example card details, saved-card data, or payer information required by a specific payment method.", "properties": { "payment_type": { - "description": "Payment method used for this processing attempt. It determines which additional request fields are required.", "type": "string", - "example": "card", + "description": "Payment method used for this processing attempt. It determines which additional request fields are required.", "enum": [ "card", "boleto", @@ -6345,14 +6525,15 @@ "bancontact", "google_pay", "apple_pay" - ] + ], + "example": "card" }, "installments": { - "description": "Number of installments for deferred payments. Available only to merchant users in Brazil.", "type": "integer", - "example": 1, + "description": "Number of installments for deferred payments. Available only to merchant users in Brazil.", + "minimum": 1, "maximum": 12, - "minimum": 1 + "example": 1 }, "mandate": { "$ref": "#/components/schemas/MandatePayload" @@ -6361,8 +6542,8 @@ "$ref": "#/components/schemas/Card" }, "google_pay": { - "description": "Raw `PaymentData` object received from Google Pay. Send the Google Pay response payload as-is.", "type": "object", + "description": "Raw `PaymentData` object received from Google Pay. Send the Google Pay response payload as-is.", "example": { "apiVersionMinor": 0, "apiVersion": 2, @@ -6381,8 +6562,8 @@ } }, "apple_pay": { - "description": "Raw payment token object received from Apple Pay. Send the Apple Pay response payload as-is.", "type": "object", + "description": "Raw payment token object received from Apple Pay. Send the Apple Pay response payload as-is.", "example": { "token": { "paymentData": { @@ -6405,13 +6586,13 @@ } }, "token": { - "description": "Saved-card token to use instead of raw card details when processing with a previously stored payment instrument.", "type": "string", + "description": "Saved-card token to use instead of raw card details when processing with a previously stored payment instrument.", "example": "ba85dfee-c3cf-48a6-84f5-d7d761fbba50" }, "customer_id": { - "description": "Customer identifier associated with the saved payment instrument. Required when `token` is provided.", "type": "string", + "description": "Customer identifier associated with the saved payment instrument. Required when `token` is provided.", "example": "MEDKHDTI" }, "personal_details": { @@ -6420,10 +6601,10 @@ }, "required": [ "payment_type" - ], - "title": "Process Checkout" + ] }, "CheckoutSuccess": { + "title": "Checkout Success", "description": "Checkout resource returned after a synchronous processing attempt. In addition to the base checkout fields, it can include the resulting transaction identifiers and any newly created payment instrument token.", "allOf": [ { @@ -6433,68 +6614,67 @@ "type": "object", "properties": { "transaction_code": { - "description": "Transaction code of the successful transaction with which the payment for the checkout is completed.", "type": "string", - "example": "TEENSK4W2K", - "readOnly": true + "description": "Transaction code of the successful transaction with which the payment for the checkout is completed.", + "readOnly": true, + "example": "TEENSK4W2K" }, "transaction_id": { - "description": "Transaction ID of the successful transaction with which the payment for the checkout is completed.", "type": "string", - "example": "410fc44a-5956-44e1-b5cc-19c6f8d727a4", - "readOnly": true + "description": "Transaction ID of the successful transaction with which the payment for the checkout is completed.", + "readOnly": true, + "example": "410fc44a-5956-44e1-b5cc-19c6f8d727a4" }, "merchant_name": { - "description": "Name of the merchant", "type": "string", + "description": "Name of the merchant", "example": "Sample Merchant" }, "redirect_url": { - "description": "URL where the payer is redirected after a redirect-based payment or SCA flow completes.", "type": "string", - "example": "https://mysite.com/completed_purchase" + "example": "https://mysite.com/completed_purchase", + "description": "URL where the payer is redirected after a redirect-based payment or SCA flow completes." }, "payment_instrument": { - "description": "Details of the saved payment instrument created or reused during checkout processing.", "type": "object", + "description": "Details of the saved payment instrument created or reused during checkout processing.", "properties": { "token": { - "description": "Token value", "type": "string", + "description": "Token value", "example": "e76d7e5c-9375-4fac-a7e7-b19dc5302fbc" } } } } } - ], - "title": "Checkout Success" + ] }, "CheckoutAccepted": { - "description": "Response returned when checkout processing requires an additional payer action, such as a 3DS challenge or a redirect to an external payment method page.", + "title": "Checkout Accepted", "type": "object", + "description": "Response returned when checkout processing requires an additional payer action, such as a 3DS challenge or a redirect to an external payment method page.", "properties": { "next_step": { - "description": "Instructions for the next action the payer or client must take.", "type": "object", + "description": "Instructions for the next action the payer or client must take.", "properties": { "url": { - "description": "URL to open or submit in order to continue processing.", "type": "string", - "example": "https://dummy-3ds-gateway.com/cap?RID=1233&VAA=A" + "example": "https://dummy-3ds-gateway.com/cap?RID=1233\u0026VAA=A", + "description": "URL to open or submit in order to continue processing." }, "method": { - "description": "HTTP method to use when following the next step.", "type": "string", - "example": "POST" + "example": "POST", + "description": "HTTP method to use when following the next step." }, "redirect_url": { - "description": "Merchant URL where the payer returns after the external flow finishes.", "type": "string", - "example": "https://mysite.com/completed_purchase" + "example": "https://mysite.com/completed_purchase", + "description": "Merchant URL where the payer returns after the external flow finishes." }, "mechanism": { - "description": "Allowed presentation mechanisms for the next step. `iframe` means the flow can be embedded, while `browser` means it can be completed through a full-page redirect.", "type": "array", "items": { "type": "string", @@ -6502,59 +6682,59 @@ "iframe", "browser" ] - } + }, + "description": "Allowed presentation mechanisms for the next step. `iframe` means the flow can be embedded, while `browser` means it can be completed through a full-page redirect." }, "payload": { - "description": "Parameters required to complete the next step. The exact keys depend on the payment provider and flow type.", "type": "object", + "description": "Parameters required to complete the next step. The exact keys depend on the payment provider and flow type.", + "additionalProperties": { + "type": "string" + }, "example": { "PaReq": "eJxVUttu2zAM/RXDr4MjyY5dO6BVuE27FZuDZHGG9VGRmMSFb/Wljff1k9KkF0APPCR1eHQouD6WhfWCbZfXVWyzCbUtrGSt8mof25vs3gltq+tFpURRVxjbI3b2NYfs0CLO1yiHFjmk2HVij1auYrsRW1+F0U4qZxfKwJlur4QTYcQcJoIdc+XO2/poc1gmv/GZw3k216MnLpAL1JytPIiq5yDk883Dgk+DwPV9IGcIJbYPc84o1Ye6lHqu5wVA3tJQiRL5eiiHxlqKscSq76xfeZn3qICciiDroerbkYeuvnYBMLQFP/R9MyOkM9cnCoGYJJAPScvBRJ0mOeaKr/6l08XT6jXN7tx0vvHSbOMtsj1dzB9jIKYDlOiRu1omYyy0WDCj0YxFQE55EKWZzj2f6ee9xdCYEcmnwucEaN9bvaeRR1ehFn9BgMdGr0l3aCvfYyAfem9/GENlrz36ufpTBPTv07r8lm3qpPiOo1y/7u+SJImNzacmw5hrX1wt/kRpABBDQ84bJOf16+jLt/gPhUvGGw==", "MD": "b1a536c0-29b9-11eb-adc1-0242ac120002", "TermUrl": "https://api.sumup.com/v0.1/checkouts/e552de3b-1777-4c91-bdb8-756967678572/complete_payment" - }, - "additionalProperties": { - "type": "string" } } } } - }, - "title": "Checkout Accepted" + } }, "Customer": { - "description": "Saved customer details.", "type": "object", + "title": "Customer", + "description": "Saved customer details.", + "required": [ + "customer_id" + ], "properties": { "customer_id": { - "description": "Unique ID of the customer.", "type": "string", + "description": "Unique ID of the customer.", "example": "831ff8d4cd5958ab5670" }, "personal_details": { "$ref": "#/components/schemas/PersonalDetails" } - }, - "required": [ - "customer_id" - ], - "title": "Customer" + } }, "Error": { - "description": "Error message structure.", + "title": "Error", "type": "object", + "description": "Error message structure.", "properties": { "message": { - "description": "Short description of the error.", "type": "string", + "description": "Short description of the error.", "example": "Resource not found" }, "error_code": { - "description": "Platform code for the error.", "type": "string", + "description": "Platform code for the error.", "example": "NOT_FOUND" } - }, - "title": "Error" + } }, "Problem": { "description": "A RFC 9457 problem details object.\n\nAdditional properties specific to the problem type may be present.", @@ -6594,6 +6774,7 @@ "title": "Problem" }, "ErrorExtended": { + "title": "Error Extended", "description": "Error payload with the invalid parameter reference.", "allOf": [ { @@ -6603,58 +6784,64 @@ "type": "object", "properties": { "param": { - "description": "Parameter name (with relative location) to which the error applies. Parameters from embedded resources are displayed using dot notation. For example, `card.name` refers to the `name` parameter embedded in the `card` object.", - "type": "string" + "type": "string", + "description": "Parameter name (with relative location) to which the error applies. Parameters from embedded resources are displayed using dot notation. For example, `card.name` refers to the `name` parameter embedded in the `card` object." } } } - ], - "title": "Error Extended" + ] }, "ErrorForbidden": { - "description": "Error message for forbidden requests.", + "title": "Error Forbidden", "type": "object", + "description": "Error message for forbidden requests.", "properties": { "error_message": { - "description": "Short description of the error.", "type": "string", + "description": "Short description of the error.", "example": "request_not_allowed" }, "error_code": { - "description": "Platform code for the error.", "type": "string", + "description": "Platform code for the error.", "example": "FORBIDDEN" }, "status_code": { - "description": "HTTP status code for the error.", "type": "string", + "description": "HTTP status code for the error.", "example": "403" } - }, - "title": "Error Forbidden" + } }, "DetailsError": { - "description": "Error message structure.", + "title": "Details Error", "type": "object", + "description": "Error message structure.", "properties": { "title": { - "description": "Short title of the error.", "type": "string", + "description": "Short title of the error.", "example": "Bad Request" }, "details": { - "description": "Details of the error.", "type": "string", + "description": "Details of the error.", "example": "One or more of the parameters are invalid." }, "status": { - "description": "The status code.", "type": "number", + "description": "The status code.", "example": 400 }, "failed_constraints": { - "description": "List of violated validation constraints.", "type": "array", + "description": "List of violated validation constraints.", + "example": [ + { + "message": "Currency must also be specified when filtering by amount", + "reference": "currency" + } + ], "items": { "type": "object", "properties": { @@ -6665,18 +6852,12 @@ "type": "string" } } - }, - "example": [ - { - "message": "Currency must also be specified when filtering by amount", - "reference": "currency" - } - ] + } } - }, - "title": "Details Error" + } }, "Event": { + "title": "Event", "description": "High-level transaction event details.", "type": "object", "properties": { @@ -6693,227 +6874,227 @@ "$ref": "#/components/schemas/TransactionEventStatus" }, "amount": { - "description": "Amount of the event.", "type": "number", - "format": "float" + "format": "float", + "description": "Amount of the event." }, "timestamp": { - "description": "Date and time of the transaction event.", "type": "string", - "format": "date-time" + "format": "date-time", + "description": "Date and time of the transaction event." }, "fee_amount": { - "description": "Amount of the fee related to the event.", "type": "number", - "format": "float" + "format": "float", + "description": "Amount of the fee related to the event." }, "installment_number": { - "description": "Consecutive number of the installment.", - "type": "integer" + "type": "integer", + "description": "Consecutive number of the installment." }, "deducted_amount": { - "description": "Amount deducted for the event.", "type": "number", - "format": "float" + "format": "float", + "description": "Amount deducted for the event." }, "deducted_fee_amount": { - "description": "Amount of the fee deducted for the event.", "type": "number", - "format": "float" + "format": "float", + "description": "Amount of the fee deducted for the event." } - }, - "title": "Event" + } }, "FinancialPayouts": { + "title": "Financial Payouts", "description": "Ordered list of payout and payout-deduction records.", "type": "array", "items": { "$ref": "#/components/schemas/FinancialPayout" - }, - "title": "Financial Payouts" + } }, "FinancialPayout": { + "title": "Financial Payout", "description": "A single payout-related record.\n\nA record can represent either:\n- an actual payout sent to the merchant (`type = PAYOUT`)\n- a deduction applied against merchant funds for a refund, chargeback, direct debit return, or balance adjustment", "type": "object", + "required": [ + "id", + "type", + "amount", + "date", + "currency", + "fee", + "status", + "reference", + "transaction_code" + ], "properties": { "id": { - "description": "Unique identifier of the payout-related record.", "type": "integer", + "description": "Unique identifier of the payout-related record.", "example": 123456789 }, "type": { - "description": "High-level payout record category.", "type": "string", - "example": "PAYOUT", + "description": "High-level payout record category.", "enum": [ "PAYOUT", "CHARGE_BACK_DEDUCTION", "REFUND_DEDUCTION", "DD_RETURN_DEDUCTION", "BALANCE_DEDUCTION" - ] + ], + "example": "PAYOUT" }, "amount": { - "description": "Amount of the payout or deduction in major units.", "type": "number", "format": "float", + "description": "Amount of the payout or deduction in major units.", "example": 132.45 }, "date": { - "description": "Payout date associated with the record, in `YYYY-MM-DD` format.", "type": "string", "format": "date", + "description": "Payout date associated with the record, in `YYYY-MM-DD` format.", "example": "2024-02-29" }, "currency": { - "description": "Three-letter ISO 4217 currency code of the payout.", "type": "string", + "description": "Three-letter ISO 4217 currency code of the payout.", "example": "EUR" }, "fee": { - "description": "Fee amount associated with the payout record, in major units.", "type": "number", "format": "float", + "description": "Fee amount associated with the payout record, in major units.", "example": 3.12 }, "status": { - "description": "Merchant-facing outcome of the payout record.", "type": "string", - "example": "SUCCESSFUL", + "description": "Merchant-facing outcome of the payout record.", "enum": [ "SUCCESSFUL", "FAILED" - ] + ], + "example": "SUCCESSFUL" }, "reference": { - "description": "Processor or payout reference associated with the record.", "type": "string", + "description": "Processor or payout reference associated with the record.", "example": "payout-2024-02-29" }, "transaction_code": { - "description": "Transaction code of the original sale associated with the payout or deduction.", "type": "string", + "description": "Transaction code of the original sale associated with the payout or deduction.", "example": "TEENSK4W2K" } - }, - "required": [ - "id", - "type", - "amount", - "date", - "currency", - "fee", - "status", - "reference", - "transaction_code" - ], - "title": "Financial Payout" + } }, "Link": { - "description": "Details of a link to a related resource.", + "title": "Link", "type": "object", + "description": "Details of a link to a related resource.", "properties": { "rel": { - "description": "Specifies the relation to the current resource.", - "type": "string" + "type": "string", + "description": "Specifies the relation to the current resource." }, "href": { - "description": "URL for accessing the related resource.", "type": "string", - "format": "uri" + "format": "uri", + "description": "URL for accessing the related resource." }, "type": { - "description": "Specifies the media type of the related resource.", - "type": "string" + "type": "string", + "description": "Specifies the media type of the related resource." }, "min_amount": { - "description": "Minimum allowed amount for the refund.", "type": "number", - "format": "float" + "format": "float", + "description": "Minimum allowed amount for the refund." }, "max_amount": { - "description": "Maximum allowed amount for the refund.", "type": "number", - "format": "float" + "format": "float", + "description": "Maximum allowed amount for the refund." } - }, - "title": "Link" + } }, "TransactionsHistoryLink": { + "title": "Transactions History Link", "description": "Hypermedia link used for transaction history pagination.", "type": "object", "properties": { "rel": { - "description": "Relation.", "type": "string", + "description": "Relation.", "example": "next" }, "href": { - "description": "Location.", "type": "string", - "example": "limit=10&oldest_ref=090df9bf-93b7-40f1-8181-fbdb236568a1&order=ascending" + "description": "Location.", + "example": "limit=10\u0026oldest_ref=090df9bf-93b7-40f1-8181-fbdb236568a1\u0026order=ascending" } }, "required": [ "rel", "href" - ], - "title": "Transactions History Link" + ] }, "MandatePayload": { - "description": "Mandate details used when a checkout should create a reusable card token for future recurring or merchant-initiated payments.", + "title": "Mandate Payload", "type": "object", + "description": "Mandate details used when a checkout should create a reusable card token for future recurring or merchant-initiated payments.", "properties": { "type": { - "description": "Type of mandate to create for the saved payment instrument.", "type": "string", - "example": "recurrent", + "description": "Type of mandate to create for the saved payment instrument.", "enum": [ "recurrent" - ] + ], + "example": "recurrent" }, "user_agent": { - "description": "Browser or client user agent observed when consent was collected.", "type": "string", + "description": "Browser or client user agent observed when consent was collected.", "example": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.104 Safari/537.36" }, "user_ip": { - "description": "IP address of the payer when the mandate was accepted.", "type": "string", + "description": "IP address of the payer when the mandate was accepted.", "example": "172.217.169.174" } }, - "example": { - "type": "recurrent", - "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.104 Safari/537.36", - "user_ip": "172.217.169.174" - }, "required": [ "type", "user_agent" ], - "title": "Mandate Payload" + "example": { + "type": "recurrent", + "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.104 Safari/537.36", + "user_ip": "172.217.169.174" + } }, "MandateResponse": { - "description": "Details of the mandate linked to the saved payment instrument.", + "title": "Mandate Response", "type": "object", + "description": "Details of the mandate linked to the saved payment instrument.", "properties": { "type": { - "description": "Type of mandate stored for the checkout or payment instrument.", - "type": "string" + "type": "string", + "description": "Type of mandate stored for the checkout or payment instrument." }, "status": { - "description": "Current lifecycle status of the mandate.", "type": "string", - "example": "active", + "description": "Current lifecycle status of the mandate.", "enum": [ "active", "inactive" - ] + ], + "example": "active" }, "merchant_code": { - "description": "Merchant account for which the mandate is valid.", "type": "string", + "description": "Merchant account for which the mandate is valid.", "example": "MH4H92C7" } }, @@ -6921,42 +7102,42 @@ "type": "recurrent", "status": "active", "merchant_code": "MH4H92C7" - }, - "title": "Mandate Response" + } }, "PaymentInstrumentResponse": { - "description": "Payment Instrument Response", + "title": "Payment Instrument Response", "type": "object", + "description": "Payment Instrument Response", "properties": { "token": { - "description": "Unique token identifying the saved payment card for a customer.", "type": "string", + "description": "Unique token identifying the saved payment card for a customer.", "readOnly": true }, "active": { - "description": "Indicates whether the payment instrument is active and can be used for payments. To deactivate it, send a `DELETE` request to the resource endpoint.", "type": "boolean", - "default": true, - "readOnly": true + "description": "Indicates whether the payment instrument is active and can be used for payments. To deactivate it, send a `DELETE` request to the resource endpoint.", + "readOnly": true, + "default": true }, "type": { - "description": "Type of the payment instrument.", "type": "string", + "description": "Type of the payment instrument.", "enum": [ "card" ] }, "card": { - "description": "Details of the payment card.", "type": "object", + "description": "Details of the payment card.", "properties": { "last_4_digits": { - "description": "Last 4 digits of the payment card number.", "type": "string", - "example": "3456", - "maxLength": 4, + "description": "Last 4 digits of the payment card number.", + "readOnly": true, "minLength": 4, - "readOnly": true + "maxLength": 4, + "example": "3456" }, "type": { "$ref": "#/components/schemas/CardType" @@ -6967,8 +7148,8 @@ "$ref": "#/components/schemas/MandateResponse" }, "created_at": { - "description": "Creation date of payment instrument. Response format expressed according to [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) code.", "type": "string", + "description": "Creation date of payment instrument. Response format expressed according to [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) code.", "format": "date-time" } }, @@ -6986,112 +7167,112 @@ "type": "VISA" }, "created_at": "2021-03-30T10:06:07.000+00:00" - }, - "title": "Payment Instrument Response" + } }, "PersonalDetails": { - "description": "Personal details for the customer.", + "title": "Personal Details", "type": "object", + "description": "Personal details for the customer.", "properties": { "first_name": { - "description": "First name of the customer.", "type": "string", + "description": "First name of the customer.", "example": "John" }, "last_name": { - "description": "Last name of the customer.", "type": "string", + "description": "Last name of the customer.", "example": "Doe" }, "email": { - "description": "Email address of the customer.", "type": "string", + "description": "Email address of the customer.", "example": "user@example.com" }, "phone": { - "description": "Phone number of the customer.", "type": "string", + "description": "Phone number of the customer.", "example": "+491635559723" }, "birth_date": { - "description": "Date of birth of the customer.", "type": "string", + "description": "Date of birth of the customer.", "format": "date", "example": "1993-12-31" }, "tax_id": { - "description": "An identification number user for tax purposes (e.g. CPF)", "type": "string", - "example": "423.378.593-47", - "maxLength": 255 + "description": "An identification number user for tax purposes (e.g. CPF)", + "maxLength": 255, + "example": "423.378.593-47" }, "address": { "$ref": "#/components/schemas/AddressLegacy" } - }, - "title": "Personal Details" + } }, "Product": { - "description": "Purchase product.", + "title": "Product", "type": "object", + "description": "Purchase product.", "properties": { "name": { - "description": "Product name.", "type": "string", + "description": "Product name.", "example": "Purchase reader for merchant with code ME3FCAVF" }, "price_label": { - "description": "Product description.", - "type": "string" + "type": "string", + "description": "Product description." }, "price": { - "description": "Product price.", "type": "number", "format": "decimal", + "description": "Product price.", "example": 100 }, "vat_rate": { - "description": "VAT percentage.", "type": "number", - "format": "decimal" + "format": "decimal", + "description": "VAT percentage." }, "single_vat_amount": { - "description": "VAT amount for a single product.", "type": "number", - "format": "decimal" + "format": "decimal", + "description": "VAT amount for a single product." }, "price_with_vat": { - "description": "Product price incl. VAT.", "type": "number", - "format": "decimal" + "format": "decimal", + "description": "Product price incl. VAT." }, "vat_amount": { - "description": "VAT amount.", "type": "number", - "format": "decimal" + "format": "decimal", + "description": "VAT amount." }, "quantity": { - "description": "Product quantity.", "type": "integer", + "description": "Product quantity.", "example": 1 }, "total_price": { - "description": "Quantity x product price.", "type": "number", "format": "decimal", + "description": "Quantity x product price.", "example": 100 }, "total_with_vat": { - "description": "Total price incl. VAT.", "type": "number", - "format": "decimal" + "format": "decimal", + "description": "Total price incl. VAT." } - }, - "title": "Product" + } }, "Receipt": { - "description": "Receipt details for a transaction.", "type": "object", + "title": "Receipt", + "description": "Receipt details for a transaction.", "properties": { "transaction_data": { "$ref": "#/components/schemas/ReceiptTransaction" @@ -7100,13 +7281,13 @@ "$ref": "#/components/schemas/ReceiptMerchantData" }, "emv_data": { - "description": "EMV-specific metadata returned for card-present payments.", "type": "object", + "description": "EMV-specific metadata returned for card-present payments.", "example": {} }, "acquirer_data": { - "description": "Acquirer-specific metadata related to the card authorization.", "type": "object", + "description": "Acquirer-specific metadata related to the card authorization.", "example": { "authorization_code": "053201", "return_code": "00" @@ -7126,10 +7307,10 @@ } } } - }, - "title": "Receipt" + } }, "ReceiptEvent": { + "title": "Receipt Event", "description": "Transaction event details as rendered on the receipt.", "type": "object", "properties": { @@ -7146,59 +7327,59 @@ "$ref": "#/components/schemas/TransactionEventStatus" }, "amount": { - "description": "Amount of the event.", "type": "string", - "format": "double" + "format": "double", + "description": "Amount of the event." }, "timestamp": { - "description": "Date and time of the transaction event.", "type": "string", - "format": "date-time" + "format": "date-time", + "description": "Date and time of the transaction event." }, "receipt_no": { - "description": "Receipt number associated with the event.", - "type": "string" + "type": "string", + "description": "Receipt number associated with the event." } - }, - "title": "Receipt Event" + } }, "ReceiptCard": { + "title": "Receipt Card", "description": "Payment card details displayed on the receipt.", "type": "object", "properties": { "last_4_digits": { - "description": "Card last 4 digits.", - "type": "string" + "type": "string", + "description": "Card last 4 digits." }, "type": { - "description": "Card Scheme.", - "type": "string" + "type": "string", + "description": "Card Scheme." } - }, - "title": "Receipt Card" + } }, "ReceiptReader": { + "title": "Receipt Reader", "description": "Card reader details displayed on the receipt.", "type": "object", "properties": { "code": { - "description": "Reader serial number.", - "type": "string" + "type": "string", + "description": "Reader serial number." }, "type": { - "description": "Reader type.", - "type": "string" + "type": "string", + "description": "Reader type." } - }, - "title": "Receipt Reader" + } }, "ReceiptMerchantData": { - "description": "Receipt merchant data", + "title": "Receipt Merchant Data", "type": "object", + "description": "Receipt merchant data", "properties": { "merchant_profile": { - "description": "Merchant profile details displayed on the receipt.", "type": "object", + "description": "Merchant profile details displayed on the receipt.", "properties": { "merchant_code": { "type": "string", @@ -7257,63 +7438,78 @@ } }, "locale": { - "description": "Locale used for rendering localized receipt fields.", - "type": "string" + "type": "string", + "description": "Locale used for rendering localized receipt fields." } - }, - "title": "Receipt Merchant Data" + } }, "ReceiptTransaction": { - "description": "Transaction information.", + "title": "Receipt Transaction", "type": "object", + "description": "Transaction information.", + "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": { - "description": "Transaction code.", - "type": "string" + "type": "string", + "description": "Transaction code." }, "transaction_id": { "$ref": "#/components/schemas/TransactionID" }, "merchant_code": { - "description": "Merchant code.", - "type": "string" + "type": "string", + "description": "Merchant code." }, "amount": { - "description": "Transaction amount.", - "type": "string" + "type": "string", + "description": "Transaction amount." }, "vat_amount": { - "description": "Transaction VAT amount.", - "type": "string" + "type": "string", + "description": "Transaction VAT amount." }, "tip_amount": { - "description": "Tip amount (included in transaction amount).", - "type": "string" + "type": "string", + "description": "Tip amount (included in transaction amount)." }, "currency": { - "description": "Transaction currency.", - "type": "string" + "type": "string", + "description": "Transaction currency." }, "timestamp": { - "description": "Time created at.", "type": "string", - "format": "date-time" + "format": "date-time", + "description": "Time created at." }, "status": { - "description": "Transaction processing status.", - "type": "string" + "type": "string", + "description": "Transaction processing status." }, "payment_type": { - "description": "Transaction type.", - "type": "string" + "type": "string", + "description": "Transaction type." }, "entry_mode": { - "description": "Transaction entry mode.", - "type": "string" + "type": "string", + "description": "Transaction entry mode." }, "verification_method": { - "description": "Cardholder verification method.", - "type": "string" + "type": "string", + "description": "Cardholder verification method." }, "card_reader": { "$ref": "#/components/schemas/ReceiptReader" @@ -7322,145 +7518,130 @@ "$ref": "#/components/schemas/ReceiptCard" }, "installments_count": { - "description": "Number of installments.", - "type": "integer" + "type": "integer", + "description": "Number of installments." }, "process_as": { - "description": "Debit/Credit.", "type": "string", - "example": "CREDIT", + "description": "Debit/Credit.", "enum": [ "CREDIT", "DEBIT" - ] + ], + "example": "CREDIT" }, "products": { - "description": "Products", "type": "array", + "description": "Products", "items": { "type": "object", "properties": { "name": { - "description": "Product name", "type": "string", + "description": "Product name", "example": "Coffee" }, "description": { - "description": "Product description", - "type": "string" + "type": "string", + "description": "Product description" }, "price": { - "description": "Product price", "type": "string", "format": "double", + "description": "Product price", "example": "150.0" }, "vat_rate": { - "description": "VAT rate", "type": "string", "format": "double", + "description": "VAT rate", "example": "0.0" }, "single_vat_amount": { - "description": "VAT amount for a single product", "type": "string", "format": "double", + "description": "VAT amount for a single product", "example": "0.0" }, "price_with_vat": { - "description": "Product price including VAT", "type": "string", "format": "double", + "description": "Product price including VAT", "example": "150.0" }, "vat_amount": { - "description": "VAT amount", "type": "string", "format": "double", + "description": "VAT amount", "example": "0.0" }, "quantity": { - "description": "Product quantity", "type": "integer", "format": "int64", + "description": "Product quantity", "example": 1 }, "total_price": { - "description": "Quantity x product price", "type": "string", "format": "double", + "description": "Quantity x product price", "example": "150.0" }, "total_with_vat": { - "description": "Total price including VAT", "type": "string", "format": "double", + "description": "Total price including VAT", "example": "150.0" } } } }, "vat_rates": { - "description": "Vat rates.", "type": "array", + "description": "Vat rates.", "items": { "type": "object", "properties": { "gross": { - "description": "Gross", "type": "number", - "format": "float" + "format": "float", + "description": "Gross" }, "net": { - "description": "Net", "type": "number", - "format": "float" + "format": "float", + "description": "Net" }, "rate": { - "description": "Rate", "type": "number", - "format": "float" + "format": "float", + "description": "Rate" }, "vat": { - "description": "Vat", "type": "number", - "format": "float" + "format": "float", + "description": "Vat" } } } }, "events": { - "description": "Events", "type": "array", + "description": "Events", "items": { "$ref": "#/components/schemas/ReceiptEvent" } }, "receipt_no": { - "description": "Receipt number", - "type": "string" + "type": "string", + "description": "Receipt number" } - }, - "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" - }, - "title": "Receipt Transaction" + } }, "TransactionEvent": { - "description": "Detailed information about a transaction event.", + "title": "Transaction Event", "type": "object", + "description": "Detailed information about a transaction event.", "properties": { "id": { "$ref": "#/components/schemas/TransactionEventID" @@ -7472,65 +7653,65 @@ "$ref": "#/components/schemas/TransactionEventStatus" }, "amount": { - "description": "Amount of the event.", "type": "number", "format": "decimal", + "description": "Amount of the event.", "example": 58.8 }, "due_date": { - "description": "Date when the transaction event is due to occur.", "type": "string", "format": "date", + "description": "Date when the transaction event is due to occur.", "example": "2020-05-25" }, "date": { - "description": "Date when the transaction event occurred.", "type": "string", "format": "date", + "description": "Date when the transaction event occurred.", "example": "2020-05-25" }, "installment_number": { - "description": "Consecutive number of the installment that is paid. Applicable only payout events, i.e. `event_type = PAYOUT`.", "type": "integer", + "description": "Consecutive number of the installment that is paid. Applicable only payout events, i.e. `event_type = PAYOUT`.", "example": 1 }, "timestamp": { - "description": "Date and time of the transaction event.", "type": "string", "format": "date-time", + "description": "Date and time of the transaction event.", "example": "2020-05-25T10:49:42.784Z" } - }, - "title": "Transaction Event" + } }, "TransactionBase": { - "description": "Details of the transaction.", + "title": "Transaction Base", "type": "object", + "description": "Details of the transaction.", "properties": { "id": { - "description": "Unique ID of the transaction.", "type": "string", + "description": "Unique ID of the transaction.", "example": "6b425463-3e1b-431d-83fa-1e51c2925e99" }, "transaction_code": { - "description": "Transaction code returned by the acquirer/processing entity after processing the transaction.", "type": "string", + "description": "Transaction code returned by the acquirer/processing entity after processing the transaction.", "example": "TEENSK4W2K" }, "amount": { - "description": "Total amount of the transaction.", "type": "number", "format": "float", + "description": "Total amount of the transaction.", "example": 10.1 }, "currency": { "$ref": "#/components/schemas/Currency" }, "timestamp": { - "description": "Date and time of the creation of the transaction. Response format expressed according to [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) code.", "type": "string", + "example": "2020-02-29T10:56:56.876Z", "format": "date-time", - "example": "2020-02-29T10:56:56.876Z" + "description": "Date and time of the creation of the transaction. Response format expressed according to [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) code." }, "status": { "$ref": "#/components/schemas/TransactionStatus" @@ -7539,74 +7720,74 @@ "$ref": "#/components/schemas/PaymentType" }, "installments_count": { - "description": "Current number of the installment for deferred payments.", "type": "integer", + "description": "Current number of the installment for deferred payments.", "minimum": 1 } - }, - "title": "Transaction Base" + } }, "TransactionCheckoutInfo": { + "title": "Transaction Checkout Info", "description": "Checkout-specific fields associated with a transaction.", "type": "object", "properties": { "merchant_code": { - "description": "Unique code of the registered merchant to whom the payment is made.", "type": "string", + "description": "Unique code of the registered merchant to whom the payment is made.", "example": "MH4H92C7" }, "vat_amount": { - "description": "Amount of the applicable VAT (out of the total transaction amount).", "type": "number", "format": "float", + "description": "Amount of the applicable VAT (out of the total transaction amount).", "example": 6 }, "tip_amount": { - "description": "Amount of the tip (out of the total transaction amount).", "type": "number", "format": "float", + "description": "Amount of the tip (out of the total transaction amount).", "example": 3 }, "entry_mode": { "$ref": "#/components/schemas/EntryMode" }, "auth_code": { - "description": "Authorization code for the transaction sent by the payment card issuer or bank. Applicable only to card payments.", "type": "string", + "description": "Authorization code for the transaction sent by the payment card issuer or bank. Applicable only to card payments.", "example": "053201" } - }, - "title": "Transaction Checkout Info" + } }, "TransactionMixinHistory": { + "title": "Transaction Mixin History", "description": "Additional transaction fields used by history and detailed views.", "type": "object", "properties": { "product_summary": { - "description": "Short description of the payment. The value is taken from the `description` property of the related checkout resource.", - "type": "string" + "type": "string", + "description": "Short description of the payment. The value is taken from the `description` property of the related checkout resource." }, "payouts_total": { - "description": "Total number of payouts to the registered user specified in the `user` property.", - "type": "integer" + "type": "integer", + "description": "Total number of payouts to the registered user specified in the `user` property." }, "payouts_received": { - "description": "Number of payouts that are made to the registered user specified in the `user` property.", - "type": "integer" + "type": "integer", + "description": "Number of payouts that are made to the registered user specified in the `user` property." }, "payout_plan": { - "description": "Payout plan of the registered user at the time when the transaction was made.", "type": "string", + "description": "Payout plan of the registered user at the time when the transaction was made.", "enum": [ "SINGLE_PAYMENT", "TRUE_INSTALLMENT", "ACCELERATED_INSTALLMENT" ] } - }, - "title": "Transaction Mixin History" + } }, "TransactionHistory": { + "title": "Transaction History", "description": "Transaction entry returned in history listing responses.", "allOf": [ { @@ -7622,17 +7803,17 @@ "$ref": "#/components/schemas/TransactionID" }, "client_transaction_id": { - "description": "Client-specific ID of the transaction.", - "type": "string" + "type": "string", + "description": "Client-specific ID of the transaction." }, "user": { - "description": "Email address of the registered user (merchant) to whom the payment is made.", "type": "string", - "format": "email" + "format": "email", + "description": "Email address of the registered user (merchant) to whom the payment is made." }, "type": { - "description": "Type of the transaction for the registered user specified in the `user` property.", "type": "string", + "description": "Type of the transaction for the registered user specified in the `user` property.", "enum": [ "PAYMENT", "REFUND", @@ -7643,34 +7824,34 @@ "$ref": "#/components/schemas/CardType" }, "payout_date": { - "description": "Payout date (if paid out at once).", "type": "string", "format": "date", + "description": "Payout date (if paid out at once).", "example": "2019-08-28" }, "payout_type": { - "description": "Payout type.", "type": "string", - "example": "BANK_ACCOUNT", + "description": "Payout type.", "enum": [ "BANK_ACCOUNT", "PREPAID_CARD" - ] + ], + "example": "BANK_ACCOUNT" }, "refunded_amount": { - "description": "Total refunded amount.", "type": "number", "format": "decimal", + "description": "Total refunded amount.", "example": 0 } } } - ], - "title": "Transaction History" + ] }, "PaymentType": { - "description": "Payment type used for the transaction.", + "title": "Payment Type", "type": "string", + "description": "Payment type used for the transaction.", "enum": [ "CASH", "POS", @@ -7683,12 +7864,12 @@ "DIRECT_DEBIT", "APM", "UNKNOWN" - ], - "title": "Payment Type" + ] }, "EntryMode": { - "description": "Entry mode of the payment details.", + "title": "Entry Mode", "type": "string", + "description": "Entry mode of the payment details.", "enum": [ "BOLETO", "SOFORT", @@ -7717,12 +7898,12 @@ "MOTO", "CONTACTLESS_MAGSTRIPE", "N/A" - ], - "title": "Entry Mode" + ] }, "CardType": { - "description": "Issuing card network of the payment card used for the transaction.", + "title": "Card Type", "type": "string", + "description": "Issuing card network of the payment card used for the transaction.", "enum": [ "ALELO", "AMEX", @@ -7748,10 +7929,10 @@ "VPAY", "VR", "UNKNOWN" - ], - "title": "Card Type" + ] }, "TransactionFull": { + "title": "Transaction Full", "description": "Full transaction resource with checkout, payout, and event details.", "allOf": [ { @@ -7767,24 +7948,24 @@ "type": "object", "properties": { "foreign_transaction_id": { - "description": "External/foreign transaction id (passed by clients).", "type": "string", + "description": "External/foreign transaction id (passed by clients).", "example": "J13253253x1" }, "client_transaction_id": { - "description": "Client transaction id.", "type": "string", + "description": "Client transaction id.", "example": "urn:sumup:pos:sale:MNKKNGST:1D4E3B2D-111D-48D7-9AF0-832DAEF63DD7;2" }, "username": { - "description": "Email address of the registered user (merchant) to whom the payment is made.", "type": "string", - "format": "email" + "format": "email", + "description": "Email address of the registered user (merchant) to whom the payment is made." }, "fee_amount": { - "description": "Transaction SumUp total fee amount.", "type": "number", "format": "decimal", + "description": "Transaction SumUp total fee amount.", "example": 8 }, "lat": { @@ -7797,17 +7978,17 @@ "$ref": "#/components/schemas/HorizontalAccuracy" }, "merchant_id": { - "description": "SumUp merchant internal Id.", "type": "integer", "format": "int64", + "description": "SumUp merchant internal Id.", "example": 136902 }, "device_info": { "$ref": "#/components/schemas/Device" }, "simple_payment_type": { - "description": "Simple name of the payment type.", "type": "string", + "description": "Simple name of the payment type.", "enum": [ "CASH", "CC_SIGNATURE", @@ -7826,8 +8007,8 @@ ] }, "verification_method": { - "description": "Verification method used for the transaction.", "type": "string", + "description": "Verification method used for the transaction.", "enum": [ "none", "signature", @@ -7844,83 +8025,83 @@ "$ref": "#/components/schemas/ElvCardAccount" }, "local_time": { - "description": "Local date and time of the creation of the transaction.", "type": "string", - "format": "date-time" + "format": "date-time", + "description": "Local date and time of the creation of the transaction." }, "payout_date": { - "description": "The date of the payout.", "type": "string", "format": "date", + "description": "The date of the payout.", "example": "2019-08-28" }, "payout_type": { - "description": "Payout type for the transaction.", "type": "string", + "description": "Payout type for the transaction.", "enum": [ "BANK_ACCOUNT", "PREPAID_CARD" ] }, "process_as": { - "description": "Debit/Credit.", "type": "string", - "example": "CREDIT", + "description": "Debit/Credit.", "enum": [ "CREDIT", "DEBIT" - ] + ], + "example": "CREDIT" }, "products": { - "description": "List of products from the merchant's catalogue for which the transaction serves as a payment.", "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": { - "description": "List of VAT rates applicable to the transaction.", "type": "array", + "description": "List of VAT rates applicable to the transaction.", "items": { "type": "object", "properties": { "rate": { - "description": "VAT rate.", "type": "number", "format": "decimal", + "description": "VAT rate.", "example": 0.045 }, "net": { - "description": "NET amount of products having this VAT rate applied.", "type": "number", "format": "decimal", + "description": "NET amount of products having this VAT rate applied.", "example": 1.36 }, "vat": { - "description": "VAT amount of this rate applied.", "type": "number", "format": "decimal", + "description": "VAT amount of this rate applied.", "example": 0.06 }, "gross": { - "description": "Gross amount of products having this VAT rate applied.", "type": "number", "format": "decimal", + "description": "Gross amount of products having this VAT rate applied.", "example": 1.42 } } } }, "transaction_events": { - "description": "Detailed list of events related to the transaction.", "type": "array", + "description": "Detailed list of events related to the transaction.", "items": { "$ref": "#/components/schemas/TransactionEvent" } }, "simple_status": { - "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.", "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", @@ -7935,22 +8116,22 @@ ] }, "links": { - "description": "List of hyperlinks for accessing related resources.", "type": "array", + "description": "List of hyperlinks for accessing related resources.", "items": { "$ref": "#/components/schemas/Link" } }, "events": { - "description": "Compact list of events related to the transaction.", "type": "array", + "description": "Compact list of events related to the transaction.", "items": { "$ref": "#/components/schemas/Event" } }, "location": { - "description": "Details of the payment location as received from the payment terminal.", "type": "object", + "description": "Details of the payment location as received from the payment terminal.", "properties": { "lat": { "$ref": "#/components/schemas/Lat" @@ -7964,18 +8145,17 @@ } }, "tax_enabled": { - "description": "Indicates whether tax deduction is enabled for the transaction.", - "type": "boolean" + "type": "boolean", + "description": "Indicates whether tax deduction is enabled for the transaction." } } } - ], - "title": "Transaction Full" + ] }, "Currency": { - "description": "Three-letter [ISO4217](https://en.wikipedia.org/wiki/ISO_4217) code of the currency for the amount. Currently supported currency values are enumerated above.", + "title": "Currency", "type": "string", - "example": "EUR", + "description": "Three-letter [ISO4217](https://en.wikipedia.org/wiki/ISO_4217) code of the currency for the amount. Currently supported currency values are enumerated above.", "enum": [ "BGN", "BRL", @@ -7994,34 +8174,35 @@ "SEK", "USD" ], - "title": "Currency" + "example": "EUR" }, "TransactionStatus": { - "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.", + "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" - ], - "title": "Transaction Status" + ] }, "TransactionEventType": { - "description": "Type of the transaction event.", + "title": "Transaction Event Type", "type": "string", + "description": "Type of the transaction event.", "enum": [ "PAYOUT", "CHARGE_BACK", "REFUND", "PAYOUT_DEDUCTION" - ], - "title": "Transaction Event Type" + ] }, "TransactionEventStatus": { - "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.", + "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", @@ -8030,45 +8211,135 @@ "REFUNDED", "SCHEDULED", "SUCCESSFUL" - ], - "title": "Transaction Event Status" + ] }, "TransactionEventID": { - "description": "Unique ID of the transaction event.", + "title": "Transaction Event ID", "type": "integer", "format": "int64", - "title": "Transaction Event ID" + "description": "Unique ID of the transaction event." }, "HorizontalAccuracy": { - "description": "Indication of the precision of the geographical position received from the payment terminal.", + "title": "Horizontal Accuracy", "type": "number", "format": "float", - "title": "Horizontal Accuracy" + "description": "Indication of the precision of the geographical position received from the payment terminal." }, "Lat": { - "description": "Latitude value from the coordinates of the payment location (as received from the payment terminal reader).", + "title": "Latitude", "type": "number", "format": "float", - "maximum": 90, + "description": "Latitude value from the coordinates of the payment location (as received from the payment terminal reader).", "minimum": 0, - "title": "Latitude" + "maximum": 90 }, "Lon": { - "description": "Longitude value from the coordinates of the payment location (as received from the payment terminal reader).", + "title": "Longitude", "type": "number", "format": "float", - "maximum": 180, + "description": "Longitude value from the coordinates of the payment location (as received from the payment terminal reader).", "minimum": 0, - "title": "Longitude" + "maximum": 180 }, "TransactionID": { - "description": "Unique ID of the transaction.", + "title": "Transaction ID", + "type": "string", + "description": "Unique ID of the transaction." + }, + "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" + }, + "Amount": { + "properties": { + "currency": { + "description": "Currency ISO 4217 code", + "example": "MXN", + "type": "string" + }, + "value": { + "description": "Amount in minor units (e.g. cents).", + "example": 1000, + "type": "integer" + } + }, + "required": [ + "currency", + "value" + ], + "type": "object" + }, + "ReaderID": { "type": "string", - "title": "Transaction ID" + "description": "Unique identifier of the reader that the payment is initiated on.", + "example": "rdr_3MSAFM23CK82VSTT4BN6RWSQ65", + "minLength": 30, + "maxLength": 30 + }, + "ReaderPaymentRequestParams": { + "properties": { + "affiliate": { + "$ref": "#/components/schemas/Affiliate" + }, + "client_transaction_id": { + "description": "Caller-supplied correlation identifier, used as the idempotency key.", + "example": "19e12390-72cf-4f9f-80b5-b0c8a67fa43f", + "type": "string" + }, + "tip_amount": { + "description": "Optional tip amount in minor units, added on top of total_amount.", + "example": 100, + "type": "integer" + }, + "total_amount": { + "$ref": "#/components/schemas/Amount" + } + }, + "required": [ + "total_amount", + "client_transaction_id" + ], + "type": "object" + }, + "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": { - "description": "The status of the membership.", "type": "string", + "description": "The status of the membership.", "enum": [ "accepted", "pending", @@ -8078,40 +8349,54 @@ ] }, "ResourceType": { - "description": "The type of the membership resource.\nPossible values are:\n* `merchant` - merchant account(s)\n* `organization` - organization(s)", "type": "string", + "description": "The type of the membership resource.\nPossible values are:\n* `merchant` - merchant account(s)\n* `organization` - organization(s)", "example": "merchant" }, "Membership": { - "description": "A membership associates a user with a resource, memberships is defined by user, resource, resource type, and associated roles.", + "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": { - "description": "ID of the membership.", "type": "string", + "description": "ID of the membership.", "example": "mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP" }, "resource_id": { - "description": "ID of the resource the membership is in.", "type": "string", + "description": "ID of the resource the membership is in.", "example": "M2DDT39A" }, "type": { "$ref": "#/components/schemas/ResourceType" }, "roles": { - "description": "User's roles.", "type": "array", - "items": { - "type": "string" - }, + "description": "User's roles.", "example": [ "role_admin" - ] + ], + "items": { + "type": "string" + } }, "permissions": { - "description": "User's 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" }, @@ -8124,19 +8409,17 @@ "create_referral", "developer_settings_edit", "developer_settings_access" - ], - "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." + ] }, "created_at": { - "description": "The timestamp of when the membership was created.", "type": "string", + "description": "The timestamp of when the membership was created.", "format": "date-time", "example": "2023-01-20T15:16:17Z" }, "updated_at": { - "description": "The timestamp of when the membership was last updated.", "type": "string", + "description": "The timestamp of when the membership was last updated.", "format": "date-time", "example": "2023-01-20T15:16:17Z" }, @@ -8155,91 +8438,90 @@ "resource": { "$ref": "#/components/schemas/MembershipResource" } - }, + } + }, + "MembershipResource": { + "title": "Resource", + "type": "object", + "description": "Information about the resource the membership is in.", "required": [ "id", - "resource_id", "type", - "roles", - "permissions", + "name", "created_at", - "updated_at", - "status", - "resource" + "updated_at" ], - "title": "Membership" - }, - "MembershipResource": { - "description": "Information about the resource the membership is in.", - "type": "object", "properties": { "id": { - "description": "ID of the resource the membership is in.", "type": "string", + "description": "ID of the resource the membership is in.", "example": "M2DDT39A" }, "type": { "$ref": "#/components/schemas/ResourceType" }, "name": { - "description": "Display name of the resource.", "type": "string", + "description": "Display name of the resource.", "example": "Acme Corp" }, "logo": { - "description": "Logo fo the resource.", "type": "string", + "description": "Logo fo the resource.", "format": "uri", - "example": "https://images.sumup.com/img_2x4y6z8a0b1c2d3e4f5g6h7j8k.png", - "maxLength": 256 + "maxLength": 256, + "example": "https://images.sumup.com/img_2x4y6z8a0b1c2d3e4f5g6h7j8k.png" }, "created_at": { - "description": "The timestamp of when the membership resource was created.", "type": "string", + "description": "The timestamp of when the membership resource was created.", "format": "date-time", "example": "2023-01-20T15:16:17Z" }, "updated_at": { - "description": "The timestamp of when the membership resource was last updated.", "type": "string", + "description": "The timestamp of when the membership resource was last updated.", "format": "date-time", "example": "2023-01-20T15:16:17Z" }, "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", - "type", - "name", + "roles", + "permissions", "created_at", - "updated_at" + "updated_at", + "status" ], - "title": "Resource" - }, - "Member": { - "description": "A member is user within specific resource identified by resource id, resource type, and associated roles.", - "type": "object", "properties": { "id": { - "description": "ID of the member.", "type": "string", + "description": "ID of the member.", "example": "mem_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP" }, "roles": { - "description": "User's roles.", "type": "array", - "items": { - "type": "string" - }, + "description": "User's roles.", "example": [ "role_admin" - ] + ], + "items": { + "type": "string" + } }, "permissions": { - "description": "User's 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" }, @@ -8252,19 +8534,17 @@ "create_referral", "developer_settings_edit", "developer_settings_access" - ], - "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." + ] }, "created_at": { - "description": "The timestamp of when the member was created.", "type": "string", + "description": "The timestamp of when the member was created.", "format": "date-time", "example": "2023-01-20T15:16:17Z" }, "updated_at": { - "description": "The timestamp of when the member was last updated.", "type": "string", + "description": "The timestamp of when the member was last updated.", "format": "date-time", "example": "2023-01-20T15:16:17Z" }, @@ -8310,24 +8590,20 @@ "service_account_user": false }, "status": "accepted" - }, - "required": [ - "id", - "roles", - "permissions", - "created_at", - "updated_at", - "status" - ], - "title": "Member" + } }, "Invite": { - "description": "Pending invitation for membership.", + "title": "Invite", "type": "object", + "description": "Pending invitation for membership.", + "required": [ + "email", + "expires_at" + ], "properties": { "email": { - "description": "Email address of the invited user.", "type": "string", + "description": "Email address of the invited user.", "format": "email", "example": "boaty.mcboatface@sumup.com" }, @@ -8336,158 +8612,153 @@ "format": "date-time", "example": "2023-01-20T15:16:17Z" } - }, - "required": [ - "email", - "expires_at" - ], - "title": "Invite" + } }, "MembershipUser": { - "description": "Information about the user associated with the membership.", "type": "object", + "description": "Information about the user associated with the membership.", + "required": [ + "id", + "type", + "email", + "mfa_on_login_enabled", + "virtual_user", + "service_account_user" + ], "properties": { "id": { - "description": "Identifier for the End-User (also called Subject).", "type": "string", + "description": "Identifier for the End-User (also called Subject).", "example": "44ca0f5b-813b-46e1-aee7-e6242010662e" }, "type": { "$ref": "#/components/schemas/UserType" }, "email": { - "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.", "type": "string", - "example": "example@sumup.com" + "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." }, "mfa_on_login_enabled": { - "description": "True if the user has enabled MFA on login.", "type": "boolean", - "example": true + "example": true, + "description": "True if the user has enabled MFA on login." }, "virtual_user": { - "description": "True if the user is a virtual user (operator).", "type": "boolean", - "example": false, "deprecated": true, - "x-deprecation-notice": "Rely on `type` instead." + "x-deprecation-notice": "Rely on `type` instead.", + "example": false, + "description": "True if the user is a virtual user (operator)." }, "service_account_user": { - "description": "True if the user is a service account.", "type": "boolean", - "example": false, "deprecated": true, - "x-deprecation-notice": "Rely on `type` instead." + "x-deprecation-notice": "Rely on `type` instead.", + "example": false, + "description": "True if the user is a service account." }, "disabled_at": { - "description": "Time when the user has been disabled. Applies only to virtual users (`virtual_user: true`).", "type": "string", - "format": "date-time" + "format": "date-time", + "description": "Time when the user has been disabled. Applies only to virtual users (`virtual_user: true`)." }, "nickname": { - "description": "User's nickname. Used for display purposes only.", "type": "string", - "example": "Test User" + "example": "Test User", + "description": "User's nickname. Used for display purposes only." }, "picture": { - "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.", "type": "string", "format": "uri", - "example": "https://usercontent.sumup.com/44ca0f5b-813b-46e1-aee7-e6242010662e.png" + "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" } - }, - "required": [ - "id", - "type", - "email", - "mfa_on_login_enabled", - "virtual_user", - "service_account_user" - ] + } }, "MembershipUserClassic": { - "description": "Classic identifiers of the user.", "type": "object", + "description": "Classic identifiers of the user.", + "deprecated": true, + "required": [ + "user_id" + ], "properties": { "user_id": { "type": "integer", - "maximum": 2147483647, - "minimum": 0 + "minimum": 0, + "maximum": 2147483647 } - }, - "deprecated": true, - "required": [ - "user_id" - ] + } }, "Role": { - "description": "A custom role that can be used to assign set of permissions to members.", + "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": { - "description": "Unique identifier of the role.", "type": "string", + "description": "Unique identifier of the role.", "example": "role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP" }, "name": { - "description": "User-defined name of the role.", "type": "string", - "example": "Senior Shop Manager II" + "example": "Senior Shop Manager II", + "description": "User-defined name of the role." }, "description": { - "description": "User-defined description of the role.", "type": "string", - "example": "Manges the shop and the employees." + "example": "Manges the shop and the employees.", + "description": "User-defined description of the role." }, "permissions": { - "description": "List of permission granted by this role.", "type": "array", + "description": "List of permission granted by this role.", + "maxItems": 100, "items": { "type": "string" }, - "example": [], - "maxItems": 100 + "example": [] }, "is_predefined": { - "description": "True if the role is provided by SumUp.", "type": "boolean", - "example": true + "example": true, + "description": "True if the role is provided by SumUp." }, "metadata": { "$ref": "#/components/schemas/Metadata" }, "created_at": { - "description": "The timestamp of when the role was created.", "type": "string", + "description": "The timestamp of when the role was created.", "format": "date-time", "example": "2023-01-20T15:16:17Z" }, "updated_at": { - "description": "The timestamp of when the role was last updated.", "type": "string", + "description": "The timestamp of when the role was last updated.", "format": "date-time", "example": "2023-01-20T15:16:17Z" } - }, - "required": [ - "id", - "name", - "permissions", - "is_predefined", - "created_at", - "updated_at" - ], - "title": "Role" + } }, "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, - "maxProperties": 64 + "additionalProperties": true }, "Attributes": { "description": "Object attributes that are modifiable only by SumUp applications.\n", @@ -8496,22 +8767,30 @@ "additionalProperties": true }, "UserType": { - "description": "Type of the user account.", "type": "string", - "example": "user", + "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": { "street_address": { "type": "array", + "maxItems": 2, "items": { "type": "string", "description": "The first line of the address.", @@ -8520,101 +8799,100 @@ "example": [ "Paul-Linke-Ufer 39-40", "2. Hinterhof" - ], - "maxItems": 2 + ] }, "post_code": { - "description": "The postal code (aka. zip code) of the address.\n", "type": "string", - "example": "10999", - "maxLength": 10 + "description": "The postal code (aka. zip code) of the address.\n", + "maxLength": 10, + "example": "10999" }, "country": { "$ref": "#/components/schemas/CountryCode" }, "city": { - "description": "The city of the address.\n", "type": "string", - "example": "Berlin", - "maxLength": 60 + "description": "The city of the address.\n", + "maxLength": 60, + "example": "Berlin" }, "province": { - "description": "The province where the address is located. This may not be relevant in some countries.\n", "type": "string", - "example": "Berlin", - "maxLength": 60 + "description": "The province where the address is located. This may not be relevant in some countries.\n", + "maxLength": 60, + "example": "Berlin" }, "region": { - "description": "The region where the address is located. This may not be relevant in some countries.\n", "type": "string", - "example": "Baden Wuerttemberg", - "maxLength": 60 + "description": "The region where the address is located. This may not be relevant in some countries.\n", + "maxLength": 60, + "example": "Baden Wuerttemberg" }, "county": { - "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", "type": "string", - "example": "Dublin County", - "maxLength": 60 + "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": { - "description": "In Spain, an autonomous community is the first sub-national level of political and administrative division.\n", "type": "string", - "example": "Catalonia", - "maxLength": 60 + "description": "In Spain, an autonomous community is the first sub-national level of political and administrative division.\n", + "maxLength": 60, + "example": "Catalonia" }, "post_town": { - "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", "type": "string", - "example": "London", - "maxLength": 60 + "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": { - "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", "type": "string", - "example": "California", - "maxLength": 60 + "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": { - "description": "Locality level of the address. Used in countries such as Brazil or Chile.\n", "type": "string", - "example": "Copacabana", - "maxLength": 60 + "description": "Locality level of the address. Used in countries such as Brazil or Chile.\n", + "maxLength": 60, + "example": "Copacabana" }, "commune": { - "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", "type": "string", - "example": "Providencia", - "maxLength": 60 + "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": { - "description": "A department (French: département, Spanish: departamento) is an administrative or political division in several countries. Used in countries such as Colombia.\n", "type": "string", - "example": "Antioquia", - "maxLength": 60 + "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" }, "municipality": { - "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", "type": "string", - "example": "Medellín", - "maxLength": 60 + "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" }, "district": { - "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", "type": "string", - "example": "Lisbon District", - "maxLength": 60 + "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" }, "zip_code": { - "description": "A US system of postal codes used by the United States Postal Service (USPS).\n", "type": "string", - "example": "94103", - "maxLength": 10 + "description": "A US system of postal codes used by the United States Postal Service (USPS).\n", + "maxLength": 10, + "example": "94103" }, "eircode": { - "description": "A postal address in Ireland.\n", "type": "string", - "example": "D02 X285", - "maxLength": 10 + "description": "A postal address in Ireland.\n", + "maxLength": 10, + "example": "D02 X285" } }, "example": { @@ -8625,49 +8903,46 @@ "post_code": "10999", "city": "Berlin", "country": "DE" - }, - "externalDocs": { - "description": "Address documentation", - "url": "https://developer.sumup.com/tools/glossary/address" - }, - "required": [ - "country" - ] + } }, "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", - "example": "BR", - "maxLength": 2, "minLength": 2, - "pattern": "^[A-Z]{2}$" + "maxLength": 2, + "pattern": "^[A-Z]{2}$", + "example": "BR" }, "PersonalIdentifiers": { - "description": "A list of country-specific personal identifiers.", "type": "array", + "description": "A list of country-specific personal identifiers.", "items": { "$ref": "#/components/schemas/PersonalIdentifier" }, + "maxItems": 32, "example": [ { "ref": "br.cpf", "value": "847.060.136-90" } - ], - "maxItems": 32 + ] }, "PersonalIdentifier": { "type": "object", + "required": [ + "ref", + "value" + ], "properties": { "ref": { - "description": "The unique reference for the personal identifier type.", "type": "string", + "description": "The unique reference for the personal identifier type.", "example": "br.cpf", "maxLength": 32 }, "value": { - "description": "The company identifier value.", "type": "string", + "description": "The company identifier value.", "example": "847.060.136-90", "maxLength": 128 } @@ -8675,14 +8950,13 @@ "example": { "ref": "br.cpf", "value": "847.060.136-90" - }, - "required": [ - "ref", - "value" - ] + } }, "ListPersonsResponseBody": { "type": "object", + "required": [ + "items" + ], "properties": { "items": { "type": "array", @@ -8690,12 +8964,14 @@ "$ref": "#/components/schemas/Person" } } - }, - "required": [ - "items" - ] + } }, "Merchant": { + "title": "Merchant", + "externalDocs": { + "description": "Merchant documentation", + "url": "https://developer.sumup.com/tools/glossary/merchant" + }, "allOf": [ { "type": "object", @@ -8707,19 +8983,19 @@ ], "properties": { "merchant_code": { - "description": "Short unique identifier for the merchant.", "type": "string", - "example": "MK01A8C2", - "readOnly": true + "readOnly": true, + "description": "Short unique identifier for the merchant.", + "example": "MK01A8C2" }, "organization_id": { - "description": "ID of the organization the merchant belongs to (if any).", "type": "string", + "description": "ID of the organization the merchant belongs to (if any).", "example": "G0UZPVAX" }, "business_type": { - "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", - "type": "string" + "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" @@ -8731,32 +9007,32 @@ "$ref": "#/components/schemas/BusinessProfile" }, "avatar": { - "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", "type": "string", - "format": "uri" + "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": { - "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", - "type": "string" + "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": { - "description": "Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217) representing the default currency for the account.\n", "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", - "maxLength": 3, "minLength": 3, - "readOnly": true + "maxLength": 3 }, "default_locale": { - "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.", "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", - "maxLength": 5, - "minLength": 2 + "minLength": 2, + "maxLength": 5 }, "sandbox": { - "description": "True if the merchant is a sandbox for testing.", "type": "boolean", + "description": "True if the merchant is a sandbox for testing.", "example": false }, "meta": { @@ -8776,52 +9052,47 @@ { "$ref": "#/components/schemas/Timestamps" } - ], - "externalDocs": { - "description": "Merchant documentation", - "url": "https://developer.sumup.com/tools/glossary/merchant" - }, - "title": "Merchant" + ] }, "Meta": { - "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.", "type": "object", - "example": {}, "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": { - "description": "Business information about the merchant. This information will be visible to the merchant's customers.\n", "type": "object", + "description": "Business information about the merchant. This information will be visible to the merchant's customers.\n", "properties": { "name": { - "description": "The customer-facing business name.", "type": "string", - "example": "Example Coffee", + "description": "The customer-facing business name.", + "minLength": 1, "maxLength": 150, - "minLength": 1 + "example": "Example Coffee" }, "dynamic_descriptor": { - "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", "type": "string", - "example": "Example Coffee", - "maxLength": 30, "minLength": 1, - "pattern": "^[a-zA-Z0-9 \\-+\\'_.]{0,30}$" + "maxLength": 30, + "pattern": "^[a-zA-Z0-9 \\-+\\'_.]{0,30}$", + "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": { - "description": "The business's publicly available website.", "type": "string", - "example": "https://example.com", - "maxLength": 255 + "description": "The business's publicly available website.", + "maxLength": 255, + "example": "https://example.com" }, "email": { - "description": "A publicly available email address.", "type": "string", - "example": "contact@example.com", - "maxLength": 255 + "description": "A publicly available email address.", + "maxLength": 255, + "example": "contact@example.com" }, "phone_number": { "$ref": "#/components/schemas/PhoneNumber" @@ -8842,42 +9113,42 @@ ] }, "PhoneNumber": { - "description": "A publicly available phone number in [E.164](https://en.wikipedia.org/wiki/E.164) format.\n", "type": "string", + "description": "A publicly available phone number in [E.164](https://en.wikipedia.org/wiki/E.164) format.\n", "example": "+420123456789", "maxLength": 16 }, "Branding": { - "description": "Settings used to apply the Merchant's branding to email receipts, invoices, checkouts, and other products.", "type": "object", + "description": "Settings used to apply the Merchant's branding to email receipts, invoices, checkouts, and other products.", "properties": { "footer_text": { - "description": "Footer text rendered on receipts and other customer-facing products.\n", "type": "string", + "description": "Footer text rendered on receipts and other customer-facing products.\n", + "minLength": 1, + "maxLength": 500, "examples": [ "Thanks for shopping with us." - ], - "maxLength": 500, - "minLength": 1 + ] }, "icon": { - "description": "An icon for the merchant. Must be square.\n", "type": "string", - "format": "uri" + "format": "uri", + "description": "An icon for the merchant. Must be square.\n" }, "logo": { - "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", "type": "string", - "format": "uri" + "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": "Data-URL encoded hero image for the merchant business.\n", "type": "string", - "format": "uri" + "format": "uri", + "description": "Data-URL encoded hero image for the merchant business.\n" }, "primary_color": { - "description": "A hex color value representing the primary branding color of this merchant (your brand color).\n", "type": "string", + "description": "A hex color value representing the primary branding color of this merchant (your brand color).\n", "examples": [ "#FF4B3A", "#0072C6", @@ -8885,8 +9156,8 @@ ] }, "primary_color_fg": { - "description": "A hex color value representing the color of the text displayed on branding color of this merchant.\n", "type": "string", + "description": "A hex color value representing the color of the text displayed on branding color of this merchant.\n", "examples": [ "#FF4B3A", "#0072C6", @@ -8894,8 +9165,8 @@ ] }, "secondary_color": { - "description": "A hex color value representing the secondary branding color of this merchant (accent color used for buttons).\n", "type": "string", + "description": "A hex color value representing the secondary branding color of this merchant (accent color used for buttons).\n", "examples": [ "#FF4B3A", "#0072C6", @@ -8903,8 +9174,8 @@ ] }, "secondary_color_fg": { - "description": "A hex color value representing the color of the text displayed on secondary branding color of this merchant.\n", "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", @@ -8912,8 +9183,8 @@ ] }, "background_color": { - "description": "A hex color value representing the preferred background color of this merchant.\n", "type": "string", + "description": "A hex color value representing the preferred background color of this merchant.\n", "examples": [ "#FF4B3A", "#0072C6", @@ -8923,45 +9194,53 @@ } }, "LegalType": { - "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", + "externalDocs": { + "description": "The country SDK documentation for legal types.", + "url": "https://developer.sumup.com/tools/glossary/merchant#legal-types" + }, "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, "examples": [ "de.freiberufler", "br.ltda", "gb.partnership", "bg.private_limited_company" - ], - "externalDocs": { - "description": "The country SDK documentation for legal types.", - "url": "https://developer.sumup.com/tools/glossary/merchant#legal-types" - }, - "maxLength": 64, - "minLength": 4 + ] }, "CompanyIdentifiers": { - "description": "A list of country-specific company identifiers.\n", "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": [ + "ref", + "value" + ], "properties": { "ref": { - "description": "The unique reference for the company identifier type as defined in the country SDK.\n", "type": "string", + "description": "The unique reference for the company identifier type as defined in the country SDK.\n", "examples": [ "de.gmbh" ] }, "value": { - "description": "The company identifier value.\n", "type": "string", + "maxLength": 100, + "description": "The company identifier value.\n", "examples": [ "HRB 123456" - ], - "maxLength": 100 + ] } }, "examples": [ @@ -8969,84 +9248,83 @@ "ref": "de.gmbh", "value": "HRB 123456" } - ], - "externalDocs": { - "description": "Company identifier documentation", - "url": "https://developer.sumup.com/tools/glossary/merchant#company-identifiers" - }, - "required": [ - "ref", - "value" ] }, "Ownership": { "type": "object", + "required": [ + "share" + ], "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", - "example": 50000, + "minimum": 25000, "maximum": 100000, - "minimum": 25000 + "example": 50000 } - }, - "required": [ - "share" - ] + } }, "Version": { - "description": "The version of the resource. The version reflects a specific change submitted to the API via one of the `PATCH` endpoints.\n", "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": { - "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", "type": "string", - "readOnly": true + "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": { - "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", + "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": { "id": { - "description": "The unique identifier for the Person. This is a [typeid](https://github.com/sumup/typeid).\n", "type": "string", + "readOnly": true, + "description": "The unique identifier for the Person. This is a [typeid](https://github.com/sumup/typeid).\n", "examples": [ "pers_2EGQ057R6C8J791RVCG5NWAEAB" - ], - "readOnly": true + ] }, "user_id": { - "description": "A corresponding identity user ID for the Person, if they have a user account.\n", "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": { - "description": "The date of birth of the individual, represented as an ISO 8601:2004 [ISO8601‑2004] YYYY-MM-DD format.\n", "type": "string", "format": "date", - "example": "1980-01-12" + "description": "The date of birth of the individual, represented as an ISO 8601:2004 [ISO8601‑2004] YYYY-MM-DD format.\n", + "example": "1980-01-12T00:00:00Z" }, "given_name": { - "description": "The first name(s) of the individual.", "type": "string", + "description": "The first name(s) of the individual.", "example": "James Herrald", "maxLength": 60 }, "family_name": { - "description": "The last name(s) of the individual.", "type": "string", + "description": "The last name(s) of the individual.", "example": "Bond", "maxLength": 60 }, "middle_name": { - "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", "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", "maxLength": 60 }, @@ -9054,8 +9332,10 @@ "$ref": "#/components/schemas/PhoneNumber" }, "relationships": { - "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", "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", @@ -9064,9 +9344,7 @@ "owner", "officer" ] - }, - "maxItems": 1, - "minItems": 1 + } }, "ownership": { "$ref": "#/components/schemas/Ownership" @@ -9081,15 +9359,15 @@ "$ref": "#/components/schemas/CountryCode" }, "nationality": { - "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", "type": "string", + "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", "nullable": true }, "country_of_residence": { - "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", "type": "string", - "maxLength": 2, + "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", "minLength": 2, + "maxLength": 2, "nullable": true }, "version": { @@ -9098,25 +9376,22 @@ "change_status": { "$ref": "#/components/schemas/ChangeStatus" } - }, - "externalDocs": { - "description": "Person documentation", - "url": "https://developer.sumup.com/tools/glossary/merchant#persons" - }, - "required": [ - "id" - ] + } }, "Company": { - "description": "Information about the company or business. This is legal information that is used for verification.\n", + "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": { - "description": "The company's legal name.", "type": "string", - "example": "Gin & Doughnuts Bar GmbH", + "description": "The company's legal name.", + "minLength": 1, "maxLength": 150, - "minLength": 1 + "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", @@ -9142,55 +9417,51 @@ "website": { "description": "HTTP(S) URL of the company's website.\n", "type": "string", + "maxLength": 255, "examples": [ "https://www.sumup.com" - ], - "maxLength": 255 + ] }, "attributes": { "$ref": "#/components/schemas/Attributes" } - }, - "externalDocs": { - "description": "Company documentation", - "url": "https://developer.sumup.com/tools/glossary/merchant#company" } }, "ClassicMerchantIdentifiers": { "type": "object", + "required": [ + "id" + ], "properties": { "id": { - "description": "Classic (serial) merchant ID.", "type": "integer", "format": "int64", + "description": "Classic (serial) merchant ID.", "example": 1234, "deprecated": true } - }, - "required": [ - "id" - ] + } }, "Timestamps": { "type": "object", "properties": { "created_at": { - "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", "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" - ], - "readOnly": true + ] }, "updated_at": { - "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", "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" - ], - "readOnly": true + ] } }, "required": [ @@ -9199,6 +9470,7 @@ ] }, "Reader": { + "title": "Reader", "description": "A physical card reader device that can accept in-person payments.", "type": "object", "properties": { @@ -9218,21 +9490,21 @@ "$ref": "#/components/schemas/Metadata" }, "service_account_id": { - "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.", "type": "string", "format": "uuid", - "x-beta": true + "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": { - "description": "The timestamp of when the reader was created.", "type": "string", "format": "date-time", + "description": "The timestamp of when the reader was created.", "example": "2023-01-18T15:16:17Z" }, "updated_at": { - "description": "The timestamp of when the reader was last updated.", "type": "string", "format": "date-time", + "description": "The timestamp of when the reader was last updated.", "example": "2023-01-20T15:16:17Z" } }, @@ -9243,24 +9515,15 @@ "device", "created_at", "updated_at" - ], - "title": "Reader" - }, - "ReaderID": { - "description": "Unique identifier of the object.\n\nNote that this identifies the instance of the physical devices pairing with your SumUp account. If you [delete](https://developer.sumup.com/api/readers/delete-reader) a reader, and pair the device again, the ID will be different. Do not use this ID to refer to a physical device.", - "type": "string", - "example": "rdr_3MSAFM23CK82VSTT4BN6RWSQ65", - "maxLength": 30, - "minLength": 30 + ] }, "ReaderName": { - "description": "Custom human-readable, user-defined name for easier identification of the reader.", "type": "string", - "example": "Frontdesk", - "maxLength": 500 + "description": "Custom human-readable, user-defined name for easier identification of the reader.", + "maxLength": 500, + "example": "Frontdesk" }, "ReaderStatus": { - "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.", "type": "string", "example": "paired", "enum": [ @@ -9268,25 +9531,26 @@ "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": { - "description": "Information about the underlying physical device.", "type": "object", + "description": "Information about the underlying physical device.", "properties": { "identifier": { - "description": "A unique identifier of the physical device (e.g. serial number).", "type": "string", + "description": "A unique identifier of the physical device (e.g. serial number).", "example": "U1DT3NA00-CN" }, "model": { - "description": "Identifier of the model of the device.", "type": "string", - "example": "solo", + "description": "Identifier of the model of the device.", "enum": [ "solo", "virtual-solo" - ] + ], + "example": "solo" } }, "required": [ @@ -9295,21 +9559,14 @@ ] }, "ReaderPairingCode": { - "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.", "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", - "maxLength": 9, - "minLength": 8 + "minLength": 8, + "maxLength": 9 }, "CreateReaderCheckoutUnprocessableEntity": { "description": "Unprocessable entity", - "type": "object", - "properties": { - "errors": { - "type": "object", - "additionalProperties": true - } - }, "example": { "DataValidation": { "description": "Validation errors for the informed fields.", @@ -9362,17 +9619,22 @@ } } }, + "properties": { + "errors": { + "additionalProperties": true, + "type": "object" + } + }, "required": [ "errors" ], - "title": "CreateReaderCheckoutUnprocessableEntity" + "title": "CreateReaderCheckoutUnprocessableEntity", + "type": "object" }, "CreateReaderCheckoutError": { "description": "Error description", - "type": "object", "properties": { "errors": { - "type": "object", "properties": { "detail": { "description": "Error message", @@ -9385,38 +9647,206 @@ }, "required": [ "type" - ] + ], + "type": "object" } }, "required": [ "errors" ], - "title": "CreateReaderCheckoutError" + "title": "CreateReaderCheckoutError", + "type": "object" + }, + "GetReaderCheckoutResponse": { + "example": { + "data": { + "card_type": "credit", + "checkout_id": "00e33a36-c99b-4cb2-b635-b90c1455c9c8", + "client_transaction_id": "00e33a36-c99b-4cb2-b635-b90c1455c9c8", + "created_at": "2026-07-07T20:41:16.315434Z", + "installments": 1, + "payment_status": "pending", + "payment_type": "card", + "reader_firmware_version": "3.3.3.21", + "reader_serial_number": "1234567890", + "status": "pending", + "total_amount": { + "currency": "EUR", + "minor_unit": 2, + "value": 10000 + }, + "updated_at": "2026-07-07T20:42:18.117244Z", + "valid_until": "2026-07-07T20:41:16.315434Z" + } + }, + "properties": { + "data": { + "properties": { + "card_type": { + "description": "Type of the card. Required for some countries", + "enum": [ + "credit", + "debit" + ], + "nullable": true, + "type": "string" + }, + "checkout_id": { + "description": "Unique identifier for the checkout", + "format": "uuid", + "type": "string" + }, + "client_transaction_id": { + "description": "Client transaction identifier associated with the checkout", + "type": "string" + }, + "created_at": { + "description": "Checkout creation timestamp", + "format": "date-time", + "type": "string" + }, + "installments": { + "description": "Number of installments for the transaction. Required for some countries.", + "nullable": true, + "type": "integer" + }, + "payment_failure_reason": { + "description": "Payment failure reason", + "nullable": true, + "type": "string" + }, + "payment_status": { + "description": "Payment status from payments v2 event", + "nullable": true, + "type": "string" + }, + "payment_type": { + "description": "Type of the payment. Required for some countries", + "enum": [ + "card", + "pix" + ], + "type": "string" + }, + "reader_firmware_version": { + "description": "Reader firmware version", + "type": "string" + }, + "reader_serial_number": { + "description": "Device serial number", + "type": "string" + }, + "status": { + "description": "Current status of the checkout", + "enum": [ + "pending", + "successful", + "failed", + "cancelled" + ], + "type": "string" + }, + "total_amount": { + "description": "Amount structure.\n\nThe amount is represented as an integer value altogether with the currency and the minor unit.\n\nFor example, EUR 1.00 is represented as value 100 with minor unit of 2.\n", + "example": { + "currency": "EUR", + "minor_unit": 2, + "value": 1000 + }, + "properties": { + "currency": { + "description": "Currency ISO 4217 code", + "example": "EUR", + "type": "string" + }, + "minor_unit": { + "description": "The minor units of the currency.\nIt represents the number of decimals of the currency. For the currencies CLP, COP and HUF, the minor unit is 0.\n", + "example": 2, + "minimum": 0, + "type": "integer" + }, + "value": { + "description": "Integer value of the amount.", + "example": 1000, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "currency", + "minor_unit", + "value" + ], + "title": "Money", + "type": "object" + }, + "updated_at": { + "description": "Checkout last update timestamp", + "format": "date-time", + "type": "string" + }, + "valid_until": { + "description": "Checkout expiration timestamp. After this time, the checkout will be automatically cancelled.", + "format": "date-time", + "nullable": true, + "type": "string" + } + }, + "required": [ + "checkout_id", + "client_transaction_id", + "reader_serial_number", + "payment_type", + "card_type", + "reader_firmware_version", + "installments", + "payment_status", + "valid_until", + "created_at", + "updated_at", + "status", + "total_amount" + ], + "type": "object" + } + }, + "required": [ + "data" + ], + "title": "GetReaderCheckoutResponse", + "type": "object" }, "StatusResponse": { "description": "Status of a device", - "type": "object", + "example": { + "data": { + "battery_level": 10, + "battery_temperature": 35, + "connection_type": "Wi-Fi", + "firmware_version": "3.3.3.21", + "last_activity": "2025-09-25T15:20:00Z", + "state": "IDLE", + "status": "ONLINE" + } + }, "properties": { "data": { - "type": "object", "properties": { "battery_level": { "description": "Battery level percentage", - "type": "number", - "format": "float", "example": 10.5, + "format": "float", "maximum": 100, - "minimum": 0 + "minimum": 0, + "type": "number" }, "battery_temperature": { "description": "Battery temperature in Celsius", - "type": "integer", - "example": 35 + "example": 35, + "type": "integer" }, "connection_type": { "description": "Type of connection used by the device", - "type": "string", - "example": "Wi-Fi", "enum": [ "btle", "edge", @@ -9425,23 +9855,23 @@ "umts", "usb", "Wi-Fi" - ] + ], + "example": "Wi-Fi", + "type": "string" }, "firmware_version": { "description": "Firmware version of the device", - "type": "string", - "example": "3.3.3.21" + "example": "3.3.3.21", + "type": "string" }, "last_activity": { "description": "Timestamp of the last activity from the device", - "type": "string", + "example": "2025-09-25T15:20:00Z", "format": "date-time", - "example": "2025-09-25T15:20:00Z" + "type": "string" }, "state": { "description": "Latest state of the device", - "type": "string", - "example": "IDLE", "enum": [ "IDLE", "SELECTING_TIP", @@ -9449,48 +9879,34 @@ "WAITING_FOR_PIN", "WAITING_FOR_SIGNATURE", "UPDATING_FIRMWARE" - ] + ], + "example": "IDLE", + "type": "string" }, "status": { "description": "Status of a device", - "type": "string", - "example": "ONLINE", "enum": [ "ONLINE", "OFFLINE" - ] + ], + "example": "ONLINE", + "type": "string" } }, "required": [ "status" - ] - } - }, - "example": { - "data": { - "battery_level": 10, - "battery_temperature": 35, - "connection_type": "Wi-Fi", - "firmware_version": "3.3.3.21", - "last_activity": "2025-09-25T15:20:00Z", - "state": "IDLE", - "status": "ONLINE" + ], + "type": "object" } }, "required": [ "data" ], - "title": "StatusResponse" + "title": "StatusResponse", + "type": "object" }, "CreateReaderTerminateUnprocessableEntity": { "description": "Unprocessable entity", - "type": "object", - "properties": { - "errors": { - "type": "object", - "additionalProperties": true - } - }, "example": { "ReaderOffline": { "description": "Error returned when the target device is not online.", @@ -9502,17 +9918,22 @@ } } }, - "required": [ - "errors" + "properties": { + "errors": { + "additionalProperties": true, + "type": "object" + } + }, + "required": [ + "errors" ], - "title": "CreateReaderTerminateUnprocessableEntity" + "title": "CreateReaderTerminateUnprocessableEntity", + "type": "object" }, "CreateReaderTerminateError": { "description": "Error description", - "type": "object", "properties": { "errors": { - "type": "object", "properties": { "detail": { "description": "Error message", @@ -9525,20 +9946,26 @@ }, "required": [ "type" - ] + ], + "type": "object" } }, "required": [ "errors" ], - "title": "CreateReaderTerminateError" + "title": "CreateReaderTerminateError", + "type": "object" }, "BadRequest": { "description": "400 Bad Request", - "type": "object", + "example": { + "errors": { + "detail": "Bad request", + "type": "INVALID_BEARER_TOKEN" + } + }, "properties": { "errors": { - "type": "object", "properties": { "detail": { "description": "Fuller message giving context to error", @@ -9546,64 +9973,69 @@ }, "type": { "description": "Key indicating type of error", - "type": "string", "enum": [ "INVALID_BEARER_TOKEN", "INVALID_USER_AGENT", "NOT_ENOUGH_UNPAID_PAYOUTS", "DUPLICATE_HEADERS" - ] + ], + "type": "string" } }, "required": [ "type" - ] - } - }, - "example": { - "errors": { - "detail": "Bad request", - "type": "INVALID_BEARER_TOKEN" + ], + "type": "object" } }, "required": [ "errors" ], - "title": "BadRequest" + "title": "BadRequest", + "type": "object" }, "CreateReaderCheckoutResponse": { - "type": "object", + "example": { + "data": { + "checkout_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "client_transaction_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + } + }, "properties": { "data": { - "type": "object", "properties": { + "checkout_id": { + "description": "The checkout ID is a unique identifier for the checkout.\n", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "type": "string" + }, "client_transaction_id": { "description": "The client transaction ID is a unique identifier for the transaction that is generated for the client.\n\nIt can be used later to fetch the transaction details via the [Transactions API](https://developer.sumup.com/api/transactions/get).\n", - "type": "string", - "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "type": "string" } }, "required": [ "client_transaction_id" - ] - } - }, - "example": { - "data": { - "client_transaction_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + ], + "type": "object" } }, "required": [ "data" ], - "title": "CreateReaderCheckoutResponse" + "title": "CreateReaderCheckoutResponse", + "type": "object" }, "Unauthorized": { "description": "401 Unauthorized", - "type": "object", + "example": { + "errors": { + "detail": "Unauthorized" + } + }, "properties": { "errors": { - "type": "object", "properties": { "detail": { "description": "Fuller message giving context to error", @@ -9611,86 +10043,109 @@ }, "type": { "description": "Key indicating type of error. Present only for typed 401 responses (e.g. invalid token, invalid password). Absent for generic unauthorized responses.", - "type": "string", "enum": [ "INVALID_ACCESS_TOKEN", "INVALID_PASSWORD" - ] + ], + "type": "string" } }, "required": [ "detail" - ] - } - }, - "example": { - "errors": { - "detail": "Unauthorized" + ], + "type": "object" } }, "required": [ "errors" ], - "title": "Unauthorized" + "title": "Unauthorized", + "type": "object" }, "CreateReaderCheckoutRequest": { "description": "Reader Checkout", - "type": "object", + "example": { + "aade": { + "provider_id": "123", + "signature": "QjcxRDdBNTU1MDcyRTNFRTREMkZEM0Y0NTdBMjkxMTU4MzBFNkNCQTs7MjAyNTExMTIyMTQ3MTM7Nzk2OzEwNDs5MDA7OTAwOzU0ODg5MDM5", + "signature_data": "B71D7A555072E3EE4D2FD3F457A29115830E6CBA;;20251112214713;796;104;900;900;54889039" + }, + "affiliate": { + "app_id": "com.example.app", + "foreign_transaction_id": "123456", + "key": "ef7b684a-d6f4-4e93-9b1b-6acdd6564a8e", + "tags": {} + }, + "card_type": "debit", + "description": "This is a description...", + "installments": 1, + "return_url": "https://webhook.site/e21ddbb0-42c4-4358-a981-f5a95cd86fb5", + "tip_rates": [ + 0.05, + 0.1, + 0.15 + ], + "tip_timeout": 60, + "total_amount": { + "currency": "EUR", + "minor_unit": 2, + "value": 5033 + } + }, "properties": { "aade": { "description": "Optional object containing data for transactions from ERP integrators in Greece that comply with the AADE 1155 protocol.\nWhen such regulatory/business requirements apply, this object must be provided and contains the data needed to validate the transaction with the AADE signature provider.\n", - "type": "object", "properties": { "provider_id": { "description": "The identifier of the AADE signature provider.", - "type": "string", - "example": "123" + "example": "123", + "type": "string" }, "signature": { "description": "The base64 encoded signature of the transaction data.", - "type": "string", - "example": "QjcxRDdBNTU1MDcyRTNFRTREMkZEM0Y0NTdBMjkxMTU4MzBFNkNCQTs7MjAyNTExMTIyMTQ3MTM7Nzk2OzEwNDs5MDA7OTAwOzU0ODg5MDM5" + "example": "QjcxRDdBNTU1MDcyRTNFRTREMkZEM0Y0NTdBMjkxMTU4MzBFNkNCQTs7MjAyNTExMTIyMTQ3MTM7Nzk2OzEwNDs5MDA7OTAwOzU0ODg5MDM5", + "type": "string" }, "signature_data": { "description": "The string containing the signed transaction data.", - "type": "string", - "example": "B71D7A555072E3EE4D2FD3F457A29115830E6CBA;;20251112214713;796;104;900;900;54889039" + "example": "B71D7A555072E3EE4D2FD3F457A29115830E6CBA;;20251112214713;796;104;900;900;54889039", + "type": "string" } }, "required": [ "provider_id", "signature", "signature_data" - ] + ], + "type": "object" }, "affiliate": { "description": "Affiliate metadata for the transaction.\nIt is a field that allow for integrators to track the source of the transaction.\n", - "type": "object", "nullable": true, "properties": { "app_id": { "description": "Application ID of the affiliate.\nIt is a unique identifier for the application and should be set by the integrator in the [Affiliate Keys](https://developer.sumup.com/affiliate-keys) page.\n", - "type": "string", - "example": "com.example.app" + "example": "com.example.app", + "type": "string" }, "foreign_transaction_id": { "description": "Foreign transaction ID of the affiliate.\nIt is a unique identifier for the transaction.\nIt can be used later to fetch the transaction details via the [Transactions API](https://developer.sumup.com/api/transactions/get).\n", - "type": "string", - "example": "19e12390-72cf-4f9f-80b5-b0c8a67fa43f" + "example": "19e12390-72cf-4f9f-80b5-b0c8a67fa43f", + "type": "string" }, "key": { "description": "Key of the affiliate.\nIt is a unique identifier for the key and should be generated by the integrator in the [Affiliate Keys](https://developer.sumup.com/affiliate-keys) page.\n", - "type": "string", - "example": "123e4567-e89b-12d3-a456-426614174000" + "example": "123e4567-e89b-12d3-a456-426614174000", + "type": "string" }, "tags": { + "additionalProperties": true, "description": "Additional metadata for the transaction.\nIt is key-value object that can be associated with the transaction.\n", - "type": "object", "example": { "custom_key_1": "custom_value_1", "custom_key_2": "custom_value_2" }, - "additionalProperties": true + "type": "object" } }, "required": [ @@ -9698,16 +10153,17 @@ "key", "foreign_transaction_id" ], - "title": "Affiliate" + "title": "Affiliate", + "type": "object" }, "card_type": { "description": "The card type of the card used for the transaction.\nIs is required only for some countries (e.g: Brazil).\n", - "type": "string", - "example": "credit", "enum": [ "credit", "debit" - ] + ], + "example": "credit", + "type": "string" }, "description": { "description": "Description of the checkout to be shown in the Merchant Sales", @@ -9715,37 +10171,36 @@ }, "installments": { "description": "Number of installments for the transaction.\nIt may vary according to the merchant country.\nFor example, in Brazil, the maximum number of installments is 12.\n\nOmit if the merchant country does support installments.\nOtherwise, the checkout will be rejected.\n", - "type": "integer", "example": 1, "minimum": 1, - "nullable": true + "nullable": true, + "type": "integer" }, "return_url": { "description": "Webhook URL to which the payment result will be sent.\nIt must be a HTTPS url.\n", - "type": "string", + "example": "https://www.example.com", "format": "uri", - "example": "https://www.example.com" + "type": "string" }, "tip_rates": { "description": "List of tipping rates to be displayed to the cardholder.\nThe rates are in percentage and should be between 0.01 and 0.99.\nThe list should be sorted in ascending order.\n", - "type": "array", "items": { "format": "float", "multipleOf": 0.01, "type": "number" - } + }, + "type": "array" }, "tip_timeout": { + "default": 30, "description": "Time in seconds the cardholder has to select a tip rate.\nIf not provided, the default value is 30 seconds.\n\nIt can only be set if `tip_rates` is provided.\n\n**Note**: If the target device is a Solo, it must be in version 3.3.38.0 or higher.\n", - "type": "integer", "example": 30, - "default": 30, "maximum": 120, - "minimum": 30 + "minimum": 30, + "type": "integer" }, "total_amount": { "description": "Amount structure.\n\nThe amount is represented as an integer value altogether with the currency and the minor unit.\n\nFor example, EUR 1.00 is represented as value 100 with minor unit of 2.\n", - "type": "object", "example": { "currency": "EUR", "minor_unit": 2, @@ -9754,20 +10209,20 @@ "properties": { "currency": { "description": "Currency ISO 4217 code", - "type": "string", - "example": "EUR" + "example": "EUR", + "type": "string" }, "minor_unit": { "description": "The minor units of the currency.\nIt represents the number of decimals of the currency. For the currencies CLP, COP and HUF, the minor unit is 0.\n", - "type": "integer", "example": 2, - "minimum": 0 + "minimum": 0, + "type": "integer" }, "value": { "description": "Integer value of the amount.", - "type": "integer", "example": 1000, - "minimum": 0 + "minimum": 0, + "type": "integer" } }, "required": [ @@ -9775,100 +10230,73 @@ "minor_unit", "value" ], - "title": "Money" - } - }, - "example": { - "aade": { - "provider_id": "123", - "signature": "QjcxRDdBNTU1MDcyRTNFRTREMkZEM0Y0NTdBMjkxMTU4MzBFNkNCQTs7MjAyNTExMTIyMTQ3MTM7Nzk2OzEwNDs5MDA7OTAwOzU0ODg5MDM5", - "signature_data": "B71D7A555072E3EE4D2FD3F457A29115830E6CBA;;20251112214713;796;104;900;900;54889039" - }, - "affiliate": { - "app_id": "com.example.app", - "foreign_transaction_id": "123456", - "key": "ef7b684a-d6f4-4e93-9b1b-6acdd6564a8e", - "tags": {} - }, - "card_type": "debit", - "description": "This is a description...", - "installments": 1, - "return_url": "https://webhook.site/e21ddbb0-42c4-4358-a981-f5a95cd86fb5", - "tip_rates": [ - 0.05, - 0.1, - 0.15 - ], - "tip_timeout": 60, - "total_amount": { - "currency": "EUR", - "minor_unit": 2, - "value": 5033 + "title": "Money", + "type": "object" } }, "required": [ "total_amount" ], - "title": "CreateReaderCheckoutRequest" + "title": "CreateReaderCheckoutRequest", + "type": "object" }, "ReaderCheckoutStatusChange": { "description": "The callback payload containing the status change of the Reader Checkout.", - "type": "object", "properties": { "event_type": { "description": "Type of event.", - "type": "string", - "example": "solo.transaction.updated" + "example": "solo.transaction.updated", + "type": "string" }, "id": { "description": "Unique identifier for the event.", - "type": "string", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "format": "uuid", - "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + "type": "string" }, "payload": { "description": "The event payload.", - "type": "object", "properties": { "client_transaction_id": { "description": "The unique client transaction id. It is the same returned by the Checkout.", - "type": "string", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "format": "uuid", - "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + "type": "string" }, "merchant_code": { "description": "The merchant code associated with the transaction.", - "type": "string", - "example": "M1234567" + "example": "M1234567", + "type": "string" }, "status": { "description": "The current status of the transaction.", - "type": "string", - "example": "successful", "enum": [ "successful", "failed" - ] + ], + "example": "successful", + "type": "string" }, "transaction_id": { + "deprecated": true, "description": "The transaction id. Deprecated: use `client_transaction_id` instead.", - "type": "string", - "format": "uuid", "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "deprecated": true + "format": "uuid", + "type": "string" } }, "required": [ "client_transaction_id", "merchant_code", "status" - ] + ], + "type": "object" }, "timestamp": { "description": "Timestamp of the event.", - "type": "string", + "example": "2023-10-05T14:48:00Z", "format": "date-time", - "example": "2023-10-05T14:48:00Z" + "type": "string" } }, "required": [ @@ -9877,14 +10305,18 @@ "payload", "timestamp" ], - "title": "ReaderCheckoutStatusChange" + "title": "ReaderCheckoutStatusChange", + "type": "object" }, "NotFound": { "description": "404 Not Found", - "type": "object", + "example": { + "errors": { + "detail": "Not Found" + } + }, "properties": { "errors": { - "type": "object", "properties": { "detail": { "description": "Fuller message giving context to error", @@ -9893,50 +10325,15 @@ }, "required": [ "detail" - ] - } - }, - "example": { - "errors": { - "detail": "Not Found" + ], + "type": "object" } }, "required": [ "errors" ], - "title": "NotFound" - } - }, - "examples": { - "CreatedReader": { - "summary": "A reader that waits for the physical device to acknowledge the pairing.", - "value": { - "id": "rdr_3MSAFM23CK82VSTT4BN6RWSQ65", - "name": "Frontdesk", - "status": "processing", - "device": { - "identifier": "U1DT3NA00-CN", - "model": "solo" - }, - "created_at": "2023-05-09T14:50:20.214Z", - "updated_at": "2023-05-09T14:52:58.714Z" - } - } - }, - "links": { - "UpdateReaderByID": { - "operationId": "UpdateReader", - "parameters": { - "reader_id": "$response.body#/id" - }, - "description": "Update the reader object. This can be used to set a name after using this endpoint to verify the pairing code." - }, - "DeleteReaderByID": { - "operationId": "DeleteReader", - "parameters": { - "reader_id": "$response.body#/id" - }, - "description": "Delete the reader." + "title": "NotFound", + "type": "object" } }, "requestBodies": { @@ -10146,13 +10543,13 @@ "amount": 5 }, "schema": { - "description": "Optional amount for partial refunds of transactions.", "type": "object", + "description": "Optional amount for partial refunds of transactions.", "properties": { "amount": { - "description": "Amount to be refunded. Eligible amount can't exceed the amount of the transaction and varies based on country and currency. If you do not specify a value, the system performs a full refund of the transaction.", "type": "number", "format": "float", + "description": "Amount to be refunded. Eligible amount can't exceed the amount of the transaction and varies based on country and currency. If you do not specify a value, the system performs a full refund of the transaction.", "example": 5 } } @@ -10506,7 +10903,7 @@ "rs": "ILnaUeQTKJ184fVrjGILrLjePX9E4rmz", "cs": "c8bc0ea231f8372431ca22d6f8319f8de0263d0b1705759ed27155f245f193c5" }, - "full": "https://r3.girogate.de/ti/simideal?tx=961473700&rs=ILnaUeQTKJ184fVrjGILrLjePX9E4rmz&cs=c8bc0ea231f8372431ca22d6f8319f8de0263d0b1705759ed27155f245f193c5", + "full": "https://r3.girogate.de/ti/simideal?tx=961473700\u0026rs=ILnaUeQTKJ184fVrjGILrLjePX9E4rmz\u0026cs=c8bc0ea231f8372431ca22d6f8319f8de0263d0b1705759ed27155f245f193c5", "mechanism": [ "browser" ] @@ -10524,7 +10921,7 @@ "rs": "5MioXoKt2Gwj9dLgqAX1bMRBuT5xTSdB", "cs": "697edacdd9175f3f99542500fa0ff08280b66aaff3c2641a2e212e4b039473cc" }, - "full": "https://r3.girogate.de/ti/simbcmc?tx=624788471&rs=5MioXoKt2Gwj9dLgqAX1bMRBuT5xTSdB&cs=697edacdd9175f3f99542500fa0ff08280b66aaff3c2641a2e212e4b039473cc", + "full": "https://r3.girogate.de/ti/simbcmc?tx=624788471\u0026rs=5MioXoKt2Gwj9dLgqAX1bMRBuT5xTSdB\u0026cs=697edacdd9175f3f99542500fa0ff08280b66aaff3c2641a2e212e4b039473cc", "mechanism": [ "browser" ] @@ -10676,28 +11073,92 @@ } } }, - "ListMemberships": { - "description": "Returns a list of Membership objects.", + "BadRequest": { + "description": "The request is invalid.", "content": { - "application/json": { + "application/problem+json": { "schema": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Membership" - } - }, - "total_count": { - "type": "integer", - "example": 3 - } - }, + "$ref": "#/components/schemas/Problem" + }, + "example": { + "type": "https://developer.sumup.com/problem/bad-request", + "title": "Bad Request", + "status": 400, + "detail": "Request validation failed." + } + } + } + }, + "Unauthorized": { + "description": "Authentication failed or missing required scope.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + }, + "example": { + "type": "https://developer.sumup.com/problem/unauthorized", + "title": "Unauthorized", + "status": 401, + "detail": "Authentication credentials are missing or invalid." + } + } + } + }, + "NotFound": { + "description": "The requested Reader resource does not exist.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + }, + "example": { + "type": "https://developer.sumup.com/problem/not-found", + "title": "Requested resource couldn't be found.", + "status": 404, + "detail": "The requested resource doesn't exist or does not belong to you." + } + } + } + }, + "InternalError": { + "description": "An unexpected error occurred while processing the request.", + "content": { + "application/problem+json": { + "schema": { + "$ref": "#/components/schemas/Problem" + }, + "example": { + "type": "https://developer.sumup.com/problem/internal-server-error", + "title": "Internal Server Error", + "status": 500, + "detail": "An unexpected error occurred while processing the request." + } + } + } + }, + "ListMemberships": { + "description": "Returns a list of Membership objects.", + "content": { + "application/json": { + "schema": { + "type": "object", "required": [ "total_count", "items" - ] + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Membership" + } + }, + "total_count": { + "type": "integer", + "example": 3 + } + } } } } @@ -10708,6 +11169,9 @@ "application/json": { "schema": { "type": "object", + "required": [ + "items" + ], "properties": { "items": { "type": "array", @@ -10719,10 +11183,7 @@ "type": "integer", "example": 3 } - }, - "required": [ - "items" - ] + } } } } @@ -10733,6 +11194,9 @@ "application/json": { "schema": { "type": "object", + "required": [ + "items" + ], "properties": { "items": { "type": "array", @@ -10740,15 +11204,197 @@ "$ref": "#/components/schemas/Role" } } - }, - "required": [ - "items" - ] + } } } } } }, + "parameters": { + "CheckoutReference": { + "name": "checkout_reference", + "in": "query", + "description": "Filters the list of checkout resources by the unique ID of the checkout.", + "required": false, + "schema": { + "type": "string" + } + }, + "CheckoutID": { + "name": "checkout_id", + "in": "path", + "required": true, + "description": "Unique ID of the checkout resource.", + "schema": { + "type": "string" + } + }, + "CustomerID": { + "name": "customer_id", + "in": "path", + "required": true, + "description": "Unique ID of the saved customer resource.", + "schema": { + "type": "string" + } + }, + "Token": { + "name": "token", + "in": "path", + "required": true, + "description": "Unique token identifying the card saved as a payment instrument resource.", + "schema": { + "type": "string" + } + }, + "TransactionCode": { + "name": "transaction_code", + "in": "query", + "description": "Retrieves the transaction resource with the specified transaction code.", + "required": false, + "schema": { + "type": "string" + } + }, + "OrderFilter": { + "name": "order", + "in": "query", + "description": "Specifies the order in which the returned results are displayed.", + "schema": { + "type": "string", + "enum": [ + "ascending", + "descending" + ], + "default": "ascending" + } + }, + "LimitFilter": { + "name": "limit", + "in": "query", + "description": "Specifies the maximum number of results per page. Value must be a positive integer and if not specified, will return 10 results.", + "schema": { + "type": "integer" + } + }, + "UsersFilter": { + "name": "users[]", + "in": "query", + "description": "Filters the returned results by user email.", + "required": false, + "example": [ + "merchant@example.com" + ], + "schema": { + "type": "array", + "example": [ + "merchant@example.com" + ], + "items": { + "type": "string", + "format": "email" + } + } + }, + "StatusesFilter": { + "name": "statuses[]", + "in": "query", + "description": "Filters the returned results by the specified list of final statuses of the transactions.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "SUCCESSFUL", + "CANCELLED", + "FAILED", + "REFUNDED", + "CHARGE_BACK" + ] + } + } + }, + "PaymentTypesFilter": { + "name": "payment_types[]", + "in": "query", + "description": "Filters the returned results by the specified list of payment types used for the transactions.", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentType" + } + } + }, + "EntryModesFilter": { + "name": "entry_modes[]", + "in": "query", + "description": "Filters the returned results by the specified list of entry modes.", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntryMode" + } + } + }, + "TypesFilter": { + "name": "types[]", + "in": "query", + "description": "Filters the returned results by the specified list of transaction types.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "PAYMENT", + "REFUND", + "CHARGE_BACK" + ] + } + } + }, + "ChangesSinceFilter": { + "name": "changes_since", + "in": "query", + "description": "Filters the results by the latest modification time of resources and returns only transactions that are modified *at or after* the specified timestamp (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format).", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + } + }, + "NewestTimeFilter": { + "name": "newest_time", + "in": "query", + "description": "Filters the results by the creation time of resources and returns only transactions that are created *before* the specified timestamp (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format).", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + } + }, + "NewestRefFilter": { + "name": "newest_ref", + "in": "query", + "description": "Filters the results by the reference ID of transaction events and returns only transactions with events whose IDs are *smaller* than the specified value. This parameters supersedes the `newest_time` parameter (if both are provided in the request).", + "required": false, + "schema": { + "type": "string" + } + }, + "TransactionID": { + "name": "id", + "in": "query", + "description": "Retrieves the transaction resource with the specified transaction ID (the `id` parameter in the transaction resource).", + "required": false, + "schema": { + "type": "string" + } + } + }, "securitySchemes": { "apiKey": { "description": "API keys allow you easily interact with SumUp APIs. API keys are static tokens. You can create API keys from the [Dashboard](https://me.sumup.com/settings/api-keys)", @@ -10805,96 +11451,38 @@ } } } - } - }, - "tags": [ - { - "name": "Checkouts", - "description": "Checkouts represent online payment sessions that you create before attempting to charge a payer. A checkout captures the payment intent, such as the amount, currency, merchant, and optional customer or redirect settings, and then moves through its lifecycle as you process it.\n\nUse this tag to:\n- create a checkout before collecting or confirming payment details\n- process the checkout with a card, saved card, wallet, or supported alternative payment method\n- retrieve or list checkouts to inspect their current state and associated payment attempts\n- deactivate a checkout that should no longer be used\n\nTypical workflow:\n- create a checkout with the order amount, currency, and merchant information\n- process the checkout through SumUp client tools such as the [Payment Widget and Swift Checkout SDK](https://developer.sumup.com/online-payments/checkouts)\n- retrieve the checkout or use the Transactions endpoints to inspect the resulting payment record\n\nCheckouts are used to initiate and orchestrate online payments. Transactions remain the authoritative record of the resulting payment outcome.", - "x-core-objects": [ - { - "$ref": "#/components/schemas/Checkout" - } - ] }, - { - "name": "Customers", - "description": "Allow your regular customers to save their information with the Customers model.\n\nThis will prevent re-entering payment instrument information for recurring payments on your platform.\n\nDepending on the needs you can allow, creating, listing or deactivating payment instruments & creating, retrieving and updating customers.", - "x-core-objects": [ - { - "$ref": "#/components/schemas/Customer" - } - ] - }, - { - "name": "Transactions", - "description": "Transactions represent completed or attempted payment operations processed for a merchant account. A transaction contains the core payment result, such as the amount, currency, payment method, creation time, and current high-level status.\n\nIn addition to the main payment outcome, a transaction can contain related events that describe what happened after the original payment attempt. These events provide visibility into the financial lifecycle of the transaction, for example:\n- `PAYOUT`: the payment being prepared for payout or included in a payout to the merchant\n- `REFUND`: money returned to the payer\n- `CHARGE_BACK`: money reversed after the original payment\n- `PAYOUT_DEDUCTION`: an amount deducted from a payout to cover a refund or chargeback\n\nFrom an integrator's perspective, transactions are the authoritative record of payment outcomes. Use this tag to:\n- list transactions for reporting, reconciliation, and customer support workflows\n- retrieve a single transaction when you need the latest payment details\n- inspect `simple_status` for the current merchant-facing outcome of the payment\n- inspect `events` or `transaction_events` when you need refund, payout, or chargeback history\n\nTypical workflow:\n- create and process payments through the Checkouts endpoints\n- use the Transactions endpoints to read the resulting payment records\n- use the returned statuses and events to update your own order, accounting, or support systems" - }, - { - "name": "Payouts", - "description": "The Payouts model will allow you to track funds you’ve received from SumUp.\n\nYou can receive a detailed payouts list with information like dates, fees, references and statuses, using the `List payouts` endpoint.", - "x-core-objects": [ - { - "$ref": "#/components/schemas/FinancialPayouts" - } - ] - }, - { - "name": "Receipts", - "description": "The Receipts model obtains receipt-like details for specific transactions.", - "x-core-objects": [ - { - "$ref": "#/components/schemas/Receipt" - } - ] - }, - { - "name": "Members", - "description": "Endpoints to manage account members. Members are users that have membership within merchant accounts.", - "x-core-objects": [ - { - "$ref": "#/components/schemas/Member" - } - ], - "x-beta": true - }, - { - "name": "Memberships", - "description": "Endpoints to manage user's memberships. Memberships are used to connect the user to merchant accounts and to grant them access to the merchant's resources via roles.", - "x-core-objects": [ - { - "$ref": "#/components/schemas/Membership" - } - ], - "x-beta": true - }, - { - "name": "Roles", - "description": "Endpoints to manage custom roles. Custom roles allow you to tailor roles from individual permissions to match your needs. Once created, you can assign your custom roles to your merchant account members using the memberships.", - "x-core-objects": [ - { - "$ref": "#/components/schemas/Role" - } - ], - "x-beta": true - }, - { - "name": "Merchants", - "description": "A Merchant represents a single business which can use SumUp products like payment processing.", - "x-core-objects": [ - { - "$ref": "#/components/schemas/Merchant" + "examples": { + "CreatedReader": { + "summary": "A reader that waits for the physical device to acknowledge the pairing.", + "value": { + "id": "rdr_3MSAFM23CK82VSTT4BN6RWSQ65", + "name": "Frontdesk", + "status": "processing", + "device": { + "identifier": "U1DT3NA00-CN", + "model": "solo" + }, + "created_at": "2023-05-09T14:50:20.214Z", + "updated_at": "2023-05-09T14:52:58.714Z" } - ] + } }, - { - "name": "Readers", - "description": "A reader represents a device that accepts payments. You can use the SumUp Solo to accept in-person payments.", - "x-core-objects": [ - { - "$ref": "#/components/schemas/Reader" - } - ] + "links": { + "UpdateReaderByID": { + "operationId": "UpdateReader", + "parameters": { + "reader_id": "$response.body#/id" + }, + "description": "Update the reader object. This can be used to set a name after using this endpoint to verify the pairing code." + }, + "DeleteReaderByID": { + "operationId": "DeleteReader", + "parameters": { + "reader_id": "$response.body#/id" + }, + "description": "Delete the reader." + } } - ] -} + } +} \ No newline at end of file From 258942605e38475baba1a789399965d47bdbc7eb Mon Sep 17 00:00:00 2001 From: "sumup-release-bot[bot]" <241716704+sumup-release-bot[bot]@users.noreply.github.com> Date: Tue, 4 Aug 2026 21:59:07 +0000 Subject: [PATCH 2/2] chore: generate code --- src/Readers/Readers.php | 66 ++++++++++- src/Types/Affiliate.php | 21 ++++ src/Types/Amount.php | 23 ++++ .../CreateReaderCheckoutResponseData.php | 7 ++ src/Types/GetReaderCheckoutResponse.php | 15 +++ src/Types/GetReaderCheckoutResponseData.php | 109 ++++++++++++++++++ .../GetReaderCheckoutResponseDataCardType.php | 14 +++ ...tReaderCheckoutResponseDataPaymentType.php | 14 +++ .../GetReaderCheckoutResponseDataStatus.php | 16 +++ ...tReaderCheckoutResponseDataTotalAmount.php | 39 +++++++ src/Types/Reader.php | 3 +- src/Types/ReaderPaymentRequestParams.php | 88 ++++++++++++++ src/Types/ReaderPaymentResponse.php | 15 +++ src/Types/ReaderPaymentResponseData.php | 23 ++++ 14 files changed, 449 insertions(+), 4 deletions(-) create mode 100644 src/Types/Affiliate.php create mode 100644 src/Types/Amount.php create mode 100644 src/Types/GetReaderCheckoutResponse.php create mode 100644 src/Types/GetReaderCheckoutResponseData.php create mode 100644 src/Types/GetReaderCheckoutResponseDataCardType.php create mode 100644 src/Types/GetReaderCheckoutResponseDataPaymentType.php create mode 100644 src/Types/GetReaderCheckoutResponseDataStatus.php create mode 100644 src/Types/GetReaderCheckoutResponseDataTotalAmount.php create mode 100644 src/Types/ReaderPaymentRequestParams.php create mode 100644 src/Types/ReaderPaymentResponse.php create mode 100644 src/Types/ReaderPaymentResponseData.php diff --git a/src/Readers/Readers.php b/src/Readers/Readers.php index 8f7f568..4838df9 100644 --- a/src/Readers/Readers.php +++ b/src/Readers/Readers.php @@ -165,8 +165,6 @@ class ReadersListResponse /** * Class Readers * - * A reader represents a device that accepts payments. You can use the SumUp Solo to accept in-person payments. - * * @package SumUp\Services */ class Readers implements SumUpService @@ -269,6 +267,42 @@ public function createCheckout(string $merchantCode, string $readerId, \SumUp\Ty ], 'POST', $path); } + /** + * Create a Go Reader Payment + * + * @param string $merchantCode Short unique identifier for the merchant. + * @param string $readerId The unique identifier of the reader. + * @param \SumUp\Types\ReaderPaymentRequestParams|array $body Required request payload + * @param RequestOptions|null $requestOptions Optional typed request options + * + * @return \SumUp\Types\ReaderPaymentResponse + * @throws \SumUp\Exception\ApiException + * @throws \SumUp\Exception\UnexpectedApiException + * @throws \SumUp\Exception\ConnectionException + * @throws \SumUp\Exception\SDKException + */ + public function createGoCheckout(string $merchantCode, string $readerId, \SumUp\Types\ReaderPaymentRequestParams|array $body, ?RequestOptions $requestOptions = null): \SumUp\Types\ReaderPaymentResponse + { + $path = sprintf('/v0/merchants/%s/readers/%s/go-checkout', rawurlencode((string) $merchantCode), rawurlencode((string) $readerId)); + $payload = []; + $requestBody = $body; + if (is_array($requestBody)) { + $requestBody = \SumUp\Types\ReaderPaymentRequestParams::fromArray($requestBody); + } + $payload = RequestEncoder::encode($requestBody); + $headers = RequestHeaders::build($this->accessToken, $requestOptions); + + $response = $this->client->send('POST', $path, $payload, $headers, $requestOptions); + + return ResponseDecoder::decodeOrThrow($response, \SumUp\Types\ReaderPaymentResponse::class, [ + '400' => ['type' => 'class', 'class' => \SumUp\Types\Problem::class], + '401' => ['type' => 'class', 'class' => \SumUp\Types\Problem::class], + '404' => ['type' => 'class', 'class' => \SumUp\Types\Problem::class], + '422' => ['type' => 'class', 'class' => \SumUp\Types\Problem::class], + '500' => ['type' => 'class', 'class' => \SumUp\Types\Problem::class], + ], 'POST', $path); + } + /** * Delete a reader * @@ -323,6 +357,34 @@ public function get(string $merchantCode, string $readerId, ?RequestOptions $req ], 'GET', $path); } + /** + * Get a Reader Checkout + * + * @param string $merchantCode Merchant Code + * @param string $readerId The unique identifier of the Reader + * @param string $checkoutId The unique identifier of the Checkout + * @param RequestOptions|null $requestOptions Optional typed request options + * + * @return \SumUp\Types\GetReaderCheckoutResponse + * @throws \SumUp\Exception\ApiException + * @throws \SumUp\Exception\UnexpectedApiException + * @throws \SumUp\Exception\ConnectionException + * @throws \SumUp\Exception\SDKException + */ + public function getCheckout(string $merchantCode, string $readerId, string $checkoutId, ?RequestOptions $requestOptions = null): \SumUp\Types\GetReaderCheckoutResponse + { + $path = sprintf('/v0.1/merchants/%s/readers/%s/checkout/%s', rawurlencode((string) $merchantCode), rawurlencode((string) $readerId), rawurlencode((string) $checkoutId)); + $payload = []; + $headers = RequestHeaders::build($this->accessToken, $requestOptions); + + $response = $this->client->send('GET', $path, $payload, $headers, $requestOptions); + + return ResponseDecoder::decodeOrThrow($response, \SumUp\Types\GetReaderCheckoutResponse::class, [ + '401' => ['type' => 'class', 'class' => \SumUp\Types\Problem::class], + '404' => ['type' => 'class', 'class' => \SumUp\Types\Problem::class], + ], 'GET', $path); + } + /** * Get a Reader Status * diff --git a/src/Types/Affiliate.php b/src/Types/Affiliate.php new file mode 100644 index 0000000..170fe46 --- /dev/null +++ b/src/Types/Affiliate.php @@ -0,0 +1,21 @@ + $clientTransactionId, + 'total_amount' => $totalAmount, + 'affiliate' => $affiliate, + 'tip_amount' => $tipAmount, + ], self::class, $this); + } + + /** + * Create request DTO from an associative array. + * + * @param array $data + */ + public static function fromArray(array $data): self + { + self::assertRequiredFields($data, [ + 'client_transaction_id' => 'clientTransactionId', + 'total_amount' => 'totalAmount', + ]); + + $request = (new \ReflectionClass(self::class))->newInstanceWithoutConstructor(); + \SumUp\Hydrator::hydrate($data, self::class, $request); + + return $request; + } + + /** + * @param array $data + * @param array $requiredFields + */ + private static function assertRequiredFields(array $data, array $requiredFields): void + { + foreach ($requiredFields as $serializedName => $propertyName) { + if (!array_key_exists($serializedName, $data) && !array_key_exists($propertyName, $data)) { + throw new \InvalidArgumentException(sprintf('Missing required field "%s".', $serializedName)); + } + } + } + +} diff --git a/src/Types/ReaderPaymentResponse.php b/src/Types/ReaderPaymentResponse.php new file mode 100644 index 0000000..7766315 --- /dev/null +++ b/src/Types/ReaderPaymentResponse.php @@ -0,0 +1,15 @@ +