From a80bd12a08bc956833759ad42e948801d125dd4b Mon Sep 17 00:00:00 2001 From: appscisumup Date: Mon, 13 Apr 2026 20:38:13 +0000 Subject: [PATCH 1/2] chore: synced local 'openapi.json' with remote 'specs/openapi.json' --- openapi.json | 1428 ++++++++++++++++++++++---------------------------- 1 file changed, 639 insertions(+), 789 deletions(-) diff --git a/openapi.json b/openapi.json index e2bd9d5..380c7b2 100755 --- a/openapi.json +++ b/openapi.json @@ -3,7 +3,7 @@ "info": { "title": "SumUp REST API", "version": "1.0.0", - "description": "SumUp’s REST API operates with [JSON](https://www.json.org/json-en.html) HTTP requests and responses. The request bodies are sent through resource-oriented URLs and use the standard [HTTP response codes](https://developer.mozilla.org/docs/Web/HTTP/Status).\n\nYou can experiment and work on your integration in a sandbox that doesn't affect your regular data and doesn't process real transactions. To create a sandbox merchant account visit the [dashboard](https://me.sumup.com/settings/developer). To use the sandbox when interacting with SumUp APIs [create an API](https://me.sumup.com/settings/api-keys) key and use it for [authentication](https://developer.sumup.com/api/authentication).\n", + "description": "SumUp’s REST API operates with [JSON](https://www.json.org/json-en.html) HTTP requests and responses. The request bodies are sent through resource-oriented URLs and use the standard [HTTP response codes](https://developer.mozilla.org/docs/Web/HTTP/Status).\n\nYou can experiment and work on your integration in a sandbox that doesn't affect your regular data and doesn't process real transactions. To create a sandbox merchant account visit the [dashboard](https://me.sumup.com/settings/developer). To use the sandbox when interacting with SumUp APIs [create an API](https://me.sumup.com/settings/api-keys) key and use it for [authentication](https://developer.sumup.com/api/authentication).", "license": { "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" @@ -75,7 +75,15 @@ "example": "qr_code_pix" } } - } + }, + "example": [ + { + "id": "apple_pay" + }, + { + "id": "blik" + } + ] } } }, @@ -144,7 +152,7 @@ "post": { "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.\n\nFollow by processing a checkout to charge the provided payment instrument.\n", + "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.\n\nFollow by processing a checkout to charge the provided payment instrument.", "requestBody": { "description": "Details for creating a checkout resource.", "required": true, @@ -443,7 +451,19 @@ "items": { "$ref": "#/components/schemas/CheckoutSuccess" } - } + }, + "example": [ + { + "checkout_reference": "f00a8f74-b05d-4605-bd73-2a901bae5802", + "amount": 10.1, + "currency": "EUR", + "merchant_code": "MH4H92C7", + "description": "Purchase", + "id": "4e425463-3e1b-431d-83fa-1e51c2925e99", + "status": "PENDING", + "date": "2020-02-29T10:56:56+00:00" + } + ] } } }, @@ -514,6 +534,18 @@ "application/json": { "schema": { "$ref": "#/components/schemas/CheckoutSuccess" + }, + "example": { + "checkout_reference": "f00a8f74-b05d-4605-bd73-2a901bae5802", + "amount": 10.1, + "currency": "EUR", + "merchant_code": "MH4H92C7", + "description": "Purchase", + "id": "4e425463-3e1b-431d-83fa-1e51c2925e99", + "status": "PENDING", + "date": "2020-02-29T10:56:56+00:00", + "transaction_code": "TEENSK4W2K", + "transaction_id": "410fc44a-5956-44e1-b5cc-19c6f8d727a4" } } } @@ -583,7 +615,7 @@ "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.\n", + "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, @@ -1089,6 +1121,136 @@ ] } }, + "/v0.2/checkouts/{id}/apple-pay-session": { + "put": { + "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", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Unique ID of the checkout resource.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "The data needed to create an apple pay session for a checkout.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "context": { + "description": "the context to create this apple pay session.", + "type": "string", + "format": "hostname", + "example": "example.com" + }, + "target": { + "description": "The target url to create this apple pay session.", + "type": "string", + "format": "uri", + "example": "https://apple-pay-gateway-cert.apple.com/paymentservices/startSession" + } + }, + "required": [ + "context", + "target" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Successful request. Returns the Apple Pay merchant session object\nthat should be forwarded to the Apple Pay JS SDK to complete merchant\nvalidation and continue the payment flow.\n", + "content": { + "application/json": { + "schema": { + "type": "object" + }, + "example": { + "displayName": "Test Account", + "domainName": "pay.sumup.com", + "epochTimestamp": 1775323532665, + "expiresAt": 1775327132665, + "merchantIdentifier": "7801D328E6637EFC1ADE6CE01C671D2CD318E32CA4ED1F9FC390D170D827D9AB", + "merchantSessionIdentifier": "SSH92CC412E5FCF4FAB88684914C953C0D4_916523AAED1343F5BC5815E12BEE9250AFFDC1A17C46B0DE5A943F0F94927C24", + "nonce": "a968a2bf", + "operationalAnalyticsIdentifier": "Test Account:7801D328E6637EFC1ADE6CE01C671D2CD318E32CA4ED1F9FC390D170D827D9AB", + "pspId": "7801D328E6637EFC1ADE6CE01C671D2CD318E32CA4ED1F9FC390D170D827D9AB", + "retries": 0, + "signature": "" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/Error" + }, + { + "type": "array", + "description": "List of error messages.", + "items": { + "$ref": "#/components/schemas/Error" + } + } + ] + }, + "example": { + "error_code": "INVALID", + "message": "Bad Request" + } + } + } + }, + "404": { + "description": "The requested resource does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + }, + "examples": { + "Not_Found": { + "description": "The identified resource is not found on the server.", + "value": { + "error_code": "NOT_FOUND", + "message": "Resource not found" + } + } + } + } + } + } + }, + "security": [ + { + "apiKey": [] + }, + { + "oauth2": [] + } + ], + "tags": [ + "Checkouts" + ], + "x-codegen": { + "method_name": "create_apple_pay_session" + }, + "x-scopes": [] + } + }, "/v0.1/customers": { "post": { "operationId": "CreateCustomer", @@ -1127,6 +1289,11 @@ }, { "type": "object", + "required": [ + "instance", + "error_code", + "error_message" + ], "properties": { "instance": { "type": "string" @@ -1145,9 +1312,9 @@ "Missing_Customer_ID": { "description": "The required customer identifier is missing.", "value": { - "instance": "32a44c6c-85d3-49e8-86bf-a5bba98c4621", "error_code": "INVALID", - "error_message": "customer_id" + "message": "Validation error", + "param": "customer_id" } } } @@ -1349,7 +1516,7 @@ "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.\n", + "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.", "requestBody": { "description": "Customer fields to update.", "required": true, @@ -1724,6 +1891,9 @@ "description": "Optional amount for partial refunds.", "content": { "application/json": { + "example": { + "amount": 5 + }, "schema": { "description": "Optional amount for partial refunds of transactions.", "type": "object", @@ -1731,7 +1901,8 @@ "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" + "format": "float", + "example": 5 } } } @@ -1813,11 +1984,12 @@ "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\n * `id`\n * `internal_id`\n * `transaction_code`\n * `foreign_transaction_id`\n * `client_transaction_id`\n", + "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- `internal_id`\n- `transaction_code`\n- `foreign_transaction_id`\n- `client_transaction_id`", "parameters": [ { "name": "merchant_code", "in": "path", + "description": "Merchant code of the account whose transaction should be retrieved.", "required": true, "schema": { "type": "string", @@ -1875,6 +2047,22 @@ "application/json": { "schema": { "$ref": "#/components/schemas/TransactionFull" + }, + "example": { + "id": "410fc44a-5956-44e1-b5cc-19c6f8d727a4", + "transaction_code": "TEENSK4W2K", + "amount": 10.1, + "currency": "EUR", + "timestamp": "2020-02-29T10:56:56.876Z", + "status": "SUCCESSFUL", + "payment_type": "ECOM", + "installments_count": 1, + "merchant_code": "MH4H92C7", + "vat_amount": 6, + "tip_amount": 3, + "entry_mode": "CUSTOMER_ENTRY", + "auth_code": "053201", + "internal_id": 1763892018 } } } @@ -1946,7 +2134,7 @@ "get": { "operationId": "GetTransaction", "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\n * `id`\n * `internal_id`\n * `transaction_code`\n * `foreign_transaction_id`\n * `client_transaction_id`\n", + "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- `internal_id`\n- `transaction_code`\n- `foreign_transaction_id`\n- `client_transaction_id`", "parameters": [ { "name": "id", @@ -1983,6 +2171,22 @@ "application/json": { "schema": { "$ref": "#/components/schemas/TransactionFull" + }, + "example": { + "id": "410fc44a-5956-44e1-b5cc-19c6f8d727a4", + "transaction_code": "TEENSK4W2K", + "amount": 10.1, + "currency": "EUR", + "timestamp": "2020-02-29T10:56:56.876Z", + "status": "SUCCESSFUL", + "payment_type": "ECOM", + "installments_count": 1, + "merchant_code": "MH4H92C7", + "vat_amount": 6, + "tip_amount": 3, + "entry_mode": "CUSTOMER_ENTRY", + "auth_code": "053201", + "internal_id": 1763892018 } } } @@ -2060,6 +2264,7 @@ { "name": "merchant_code", "in": "path", + "description": "Merchant code of the account whose transaction history should be listed.", "required": true, "schema": { "type": "string", @@ -2106,8 +2311,14 @@ "items": { "type": "string", "format": "email" - } - } + }, + "example": [ + "merchant@example.com" + ] + }, + "example": [ + "merchant@example.com" + ] }, { "name": "statuses[]", @@ -2230,15 +2441,55 @@ "type": "array", "items": { "$ref": "#/components/schemas/TransactionHistory" - } + }, + "example": [ + { + "transaction_code": "TEENSK4W2K", + "amount": 10.1, + "currency": "EUR", + "timestamp": "2020-02-29T10:56:56.876Z", + "status": "SUCCESSFUL", + "payment_type": "ECOM", + "installments_count": 1, + "merchant_code": "MH4H92C7", + "transaction_id": "410fc44a-5956-44e1-b5cc-19c6f8d727a4", + "user": "merchant@example.com", + "type": "PAYMENT", + "payout_date": "2019-08-28", + "payout_type": "BANK_ACCOUNT", + "refunded_amount": 0 + } + ] }, "links": { "type": "array", "items": { "$ref": "#/components/schemas/TransactionsHistoryLink" - } + }, + "example": [] } } + }, + "example": { + "items": [ + { + "transaction_code": "TEENSK4W2K", + "amount": 10.1, + "currency": "EUR", + "timestamp": "2020-02-29T10:56:56.876Z", + "status": "SUCCESSFUL", + "payment_type": "ECOM", + "installments_count": 1, + "merchant_code": "MH4H92C7", + "transaction_id": "410fc44a-5956-44e1-b5cc-19c6f8d727a4", + "user": "merchant@example.com", + "type": "PAYMENT", + "payout_date": "2019-08-28", + "payout_type": "BANK_ACCOUNT", + "refunded_amount": 0 + } + ], + "links": [] } } } @@ -2352,8 +2603,14 @@ "items": { "type": "string", "format": "email" - } - } + }, + "example": [ + "merchant@example.com" + ] + }, + "example": [ + "merchant@example.com" + ] }, { "name": "statuses[]", @@ -2464,15 +2721,55 @@ "type": "array", "items": { "$ref": "#/components/schemas/TransactionHistory" - } + }, + "example": [ + { + "transaction_code": "TEENSK4W2K", + "amount": 10.1, + "currency": "EUR", + "timestamp": "2020-02-29T10:56:56.876Z", + "status": "SUCCESSFUL", + "payment_type": "ECOM", + "installments_count": 1, + "merchant_code": "MH4H92C7", + "transaction_id": "410fc44a-5956-44e1-b5cc-19c6f8d727a4", + "user": "merchant@example.com", + "type": "PAYMENT", + "payout_date": "2019-08-28", + "payout_type": "BANK_ACCOUNT", + "refunded_amount": 0 + } + ] }, "links": { "type": "array", "items": { "$ref": "#/components/schemas/TransactionsHistoryLink" - } + }, + "example": [] } } + }, + "example": { + "items": [ + { + "transaction_code": "TEENSK4W2K", + "amount": 10.1, + "currency": "EUR", + "timestamp": "2020-02-29T10:56:56.876Z", + "status": "SUCCESSFUL", + "payment_type": "ECOM", + "installments_count": 1, + "merchant_code": "MH4H92C7", + "transaction_id": "410fc44a-5956-44e1-b5cc-19c6f8d727a4", + "user": "merchant@example.com", + "type": "PAYMENT", + "payout_date": "2019-08-28", + "payout_type": "BANK_ACCOUNT", + "refunded_amount": 0 + } + ], + "links": [] } } } @@ -2545,11 +2842,12 @@ "get": { "operationId": "ListPayoutsV1", "summary": "List payouts", - "description": "Lists ordered payouts for the merchant profile.", + "description": "Lists ordered payouts for the merchant account.", "parameters": [ { "name": "merchant_code", "in": "path", + "description": "Merchant code of the account whose payouts should be listed.", "required": true, "schema": { "type": "string", @@ -2579,9 +2877,11 @@ { "name": "format", "in": "query", + "description": "Response format for the payout list.", "required": false, "schema": { "type": "string", + "example": "json", "enum": [ "json", "csv" @@ -2591,17 +2891,21 @@ { "name": "limit", "in": "query", + "description": "Maximum number of payout records to return.", "required": false, "schema": { - "type": "integer" + "type": "integer", + "example": 10 } }, { "name": "order", "in": "query", + "description": "Sort direction for the returned payouts.", "required": false, "schema": { "type": "string", + "example": "desc", "enum": [ "desc", "asc" @@ -2616,7 +2920,20 @@ "application/json": { "schema": { "$ref": "#/components/schemas/FinancialPayouts" - } + }, + "example": [ + { + "amount": 132.45, + "currency": "EUR", + "date": "2024-02-29", + "fee": 3.12, + "id": 123456789, + "reference": "payout-2024-02-29", + "status": "SUCCESSFUL", + "transaction_code": "TEENSK4W2K", + "type": "PAYOUT" + } + ] } } }, @@ -2700,7 +3017,7 @@ "get": { "operationId": "ListPayouts", "summary": "List payouts", - "description": "Lists ordered payouts for the merchant profile.", + "description": "Lists ordered payouts for the merchant account.", "parameters": [ { "name": "start_date", @@ -2725,9 +3042,11 @@ { "name": "format", "in": "query", + "description": "Response format for the payout list.", "required": false, "schema": { "type": "string", + "example": "json", "enum": [ "json", "csv" @@ -2737,17 +3056,21 @@ { "name": "limit", "in": "query", + "description": "Maximum number of payout records to return.", "required": false, "schema": { - "type": "integer" + "type": "integer", + "example": 10 } }, { "name": "order", "in": "query", + "description": "Sort direction for the returned payouts.", "required": false, "schema": { "type": "string", + "example": "desc", "enum": [ "desc", "asc" @@ -2762,7 +3085,20 @@ "application/json": { "schema": { "$ref": "#/components/schemas/FinancialPayouts" - } + }, + "example": [ + { + "amount": 132.45, + "currency": "EUR", + "date": "2024-02-29", + "fee": 3.12, + "id": 123456789, + "reference": "payout-2024-02-29", + "status": "SUCCESSFUL", + "transaction_code": "TEENSK4W2K", + "type": "PAYOUT" + } + ] } } }, @@ -2884,6 +3220,31 @@ "application/json": { "schema": { "$ref": "#/components/schemas/Receipt" + }, + "example": { + "transaction_data": { + "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" + }, + "merchant_data": { + "merchant_profile": { + "merchant_code": "MH4H92C7" + } + }, + "acquirer_data": { + "authorization_code": "053201" + } } } } @@ -4771,16 +5132,6 @@ } } } - }, - "500": { - "description": "An internal server error occurred.\n", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - } - } } }, "externalDocs": { @@ -4875,16 +5226,6 @@ } } } - }, - "500": { - "description": "An internal server error occurred.\n", - "content": { - "application/problem+json": { - "schema": { - "$ref": "#/components/schemas/Problem" - } - } - } } }, "externalDocs": { @@ -5963,17 +6304,8 @@ } } }, - "GeoCoordinatesFilter": { - "name": "geo_coordinates", - "in": "query", - "description": "Filters the results by the geographical coordinates of the location where the transaction is made (as retrieved from the terminal device) and returns only results that fall within the specified rectangular area. The accepted format is a comma-separated list of coordinate points that form a rectangle defined by the following parameters:\n\n * `southwest_lng` (for the longitude value of the southwestern edge of the rectangle)\n * `southwest_lat` (for the latitude value of the southwestern edge of the rectangle)\n * `northeast_lng` (for the longitude value of the northeastern edge of the rectangle)\n * `northeast_lat` (for the latitude value of the northeastern edge of the rectangle)\n", - "required": false, - "schema": { - "type": "string" - } - }, - "LimitFilter": { - "name": "limit", + "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": { @@ -6024,18 +6356,6 @@ } } }, - "ReadersFilter": { - "name": "readers", - "in": "query", - "description": "Filters the returned results by the specified list of serial numbers of the terminal readers used for the transactions.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, "StatusesFilter": { "name": "statuses[]", "in": "query", @@ -6113,12 +6433,18 @@ "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" + ] } } }, @@ -6311,16 +6637,17 @@ "title": "ELV Card Account" }, "Checkout": { - "description": "Details of the payment 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", "properties": { "checkout_reference": { - "description": "Unique ID of the payment checkout specified by the client application when creating the checkout resource.", + "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 }, "amount": { - "description": "Amount of the payment.", + "description": "Amount to be charged to the payer, expressed in major units.", "type": "number", "format": "float", "example": 10.1 @@ -6329,28 +6656,31 @@ "$ref": "#/components/schemas/Currency" }, "merchant_code": { - "description": "Unique identifying code of the merchant profile.", + "description": "Merchant account that receives the payment.", "type": "string", "example": "MH4H92C7" }, "description": { - "description": "Short description of the checkout visible in the SumUp dashboard. The description can contribute to reporting, allowing easier identification of a checkout.", - "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.", + "type": "string", + "example": "Purchase" }, "return_url": { - "description": "URL to which the SumUp platform sends the processing status of the payment checkout.", + "description": "Optional backend callback URL used by SumUp to notify your platform about processing updates for the checkout.", "type": "string", - "format": "uri" + "format": "uri", + "example": "http://example.com" }, "id": { - "description": "Unique ID of the checkout resource.", + "description": "Unique SumUp identifier of the checkout resource.", "type": "string", "example": "4e425463-3e1b-431d-83fa-1e51c2925e99", "readOnly": true }, "status": { - "description": "Current status of the checkout.", + "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", "enum": [ "PENDING", "FAILED", @@ -6365,14 +6695,14 @@ "example": "2020-02-29T10:56:56+00:00" }, "valid_until": { - "description": "Date and time of the checkout expiration before which the client application needs to send a processing request. If no value is present, the checkout does not have an expiration 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.", "type": "string", "format": "date-time", "example": "2020-02-29T10:56:56+00:00", "nullable": true }, "customer_id": { - "description": "Unique identification of a customer. If specified, the checkout session and payment instrument are associated with the referenced customer.", + "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", "example": "831ff8d4cd5958ab5670" }, @@ -6380,7 +6710,7 @@ "$ref": "#/components/schemas/MandateResponse" }, "transactions": { - "description": "List of transactions related to the payment.", + "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": [ @@ -6392,48 +6722,71 @@ } ] }, + "example": [ + { + "id": "410fc44a-5956-44e1-b5cc-19c6f8d727a4", + "transaction_code": "TEENSK4W2K", + "amount": 10.1, + "currency": "EUR", + "timestamp": "2020-02-29T10:56:56.876Z", + "status": "SUCCESSFUL", + "payment_type": "ECOM", + "installments_count": 1, + "merchant_code": "MH4H92C7", + "vat_amount": 6, + "tip_amount": 3, + "entry_mode": "CUSTOMER_ENTRY", + "auth_code": "012345", + "internal_id": 0 + } + ], "uniqueItems": true } }, "title": "Checkout" }, "CheckoutCreateRequest": { - "description": "Details of the payment checkout.", + "description": "Request body for creating a checkout before processing payment. Define the payment amount, currency, merchant, and optional customer or redirect behavior here.", "type": "object", "properties": { "checkout_reference": { - "description": "Unique ID of the payment checkout specified by the client application when creating the checkout resource.", + "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 }, "amount": { - "description": "Amount of the payment.", + "description": "Amount to be charged to the payer, expressed in major units.", "type": "number", - "format": "float" + "format": "float", + "example": 10.1 }, "currency": { "$ref": "#/components/schemas/Currency" }, "merchant_code": { - "description": "Unique identifying code of the merchant profile.", + "description": "Merchant account that should receive the payment.", "type": "string", "example": "MH4H92C7" }, "description": { - "description": "Short description of the checkout visible in the SumUp dashboard. The description can contribute to reporting, allowing easier identification of a checkout.", - "type": "string" + "description": "Short merchant-defined description shown in SumUp tools and reporting for easier identification of the checkout.", + "type": "string", + "example": "Purchase" }, "return_url": { - "description": "URL to which the SumUp platform sends the processing status of the payment checkout.", + "description": "Optional backend callback URL used by SumUp to notify your platform about processing updates for the checkout.", "type": "string", - "format": "uri" + "format": "uri", + "example": "http://example.com/" }, "customer_id": { - "description": "Unique identification of a customer. If specified, the checkout session and payment instrument are associated with the referenced customer.", - "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.", + "type": "string", + "example": "831ff8d4cd5958ab5670" }, "purpose": { - "description": "Purpose of the checkout.", + "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", "default": "CHECKOUT", "enum": [ @@ -6442,14 +6795,14 @@ ] }, "valid_until": { - "description": "Date and time of the checkout expiration before which the client application needs to send a processing request. If no value is present, the checkout does not have an expiration 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.", "type": "string", "format": "date-time", "example": "2020-02-29T10:56:56+00:00", "nullable": true }, "redirect_url": { - "description": "__Required__ for [APMs](https://developer.sumup.com/online-payments/apm/introduction) and __recommended__ for card payments. Refers to a url where the end user is redirected once the payment processing completes. If not specified, the [Payment Widget](https://developer.sumup.com/online-payments/tools/card-widget) renders [3DS challenge](https://developer.sumup.com/online-payments/features/3ds) within an iframe instead of performing a full-page redirect.", + "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" } @@ -6463,12 +6816,13 @@ "title": "Checkout Create Request" }, "ProcessCheckout": { - "description": "Details of the payment instrument for processing the checkout.", + "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.", "type": "object", "properties": { "payment_type": { - "description": "Describes the payment method used to attempt processing", + "description": "Payment method used for this processing attempt. It determines which additional request fields are required.", "type": "string", + "example": "card", "enum": [ "card", "boleto", @@ -6482,6 +6836,7 @@ "installments": { "description": "Number of installments for deferred payments. Available only to merchant users in Brazil.", "type": "integer", + "example": 1, "maximum": 12, "minimum": 1 }, @@ -6536,12 +6891,14 @@ } }, "token": { - "description": "__Required when using a tokenized card to process a checkout.__ Unique token identifying the saved payment card for a customer.", - "type": "string" + "description": "Saved-card token to use instead of raw card details when processing with a previously stored payment instrument.", + "type": "string", + "example": "ba85dfee-c3cf-48a6-84f5-d7d761fbba50" }, "customer_id": { - "description": "__Required when `token` is provided.__ Unique ID of the customer.", - "type": "string" + "description": "Customer identifier associated with the saved payment instrument. Required when `token` is provided.", + "type": "string", + "example": "MEDKHDTI" }, "personal_details": { "$ref": "#/components/schemas/PersonalDetails" @@ -6553,7 +6910,7 @@ "title": "Process Checkout" }, "CheckoutSuccess": { - "description": "Checkout response returned after a successful processing attempt.", + "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": [ { "$ref": "#/components/schemas/Checkout" @@ -6579,12 +6936,12 @@ "example": "Sample Merchant" }, "redirect_url": { - "description": "Refers to a url where the end user is redirected once the payment processing completes.", + "description": "URL where the payer is redirected after a redirect-based payment or SCA flow completes.", "type": "string", "example": "https://mysite.com/completed_purchase" }, "payment_instrument": { - "description": "Object containing token information for the specified payment instrument", + "description": "Details of the saved payment instrument created or reused during checkout processing.", "type": "object", "properties": { "token": { @@ -6600,30 +6957,30 @@ "title": "Checkout Success" }, "CheckoutAccepted": { - "description": "3DS Response", + "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.", "type": "object", "properties": { "next_step": { - "description": "Required action processing 3D Secure payments.", + "description": "Instructions for the next action the payer or client must take.", "type": "object", "properties": { "url": { - "description": "Where the end user is redirected.", + "description": "URL to open or submit in order to continue processing.", "type": "string", "example": "https://dummy-3ds-gateway.com/cap?RID=1233&VAA=A" }, "method": { - "description": "Method used to complete the redirect.", + "description": "HTTP method to use when following the next step.", "type": "string", "example": "POST" }, "redirect_url": { - "description": "Refers to a url where the end user is redirected once the payment processing completes.", + "description": "Merchant URL where the payer returns after the external flow finishes.", "type": "string", "example": "https://mysite.com/completed_purchase" }, "mechanism": { - "description": "Indicates allowed mechanisms for redirecting an end user. If both values are provided to ensure a redirect takes place in either.", + "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", @@ -6634,18 +6991,15 @@ } }, "payload": { - "description": "Contains parameters essential for form redirection. Number of object keys and their content can vary.", + "description": "Parameters required to complete the next step. The exact keys depend on the payment provider and flow type.", "type": "object", - "properties": { - "PaReq": { - "example": "eJxVUttu2zAM/RXDr4MjyY5dO6BVuE27FZuDZHGG9VGRmMSFb/Wljff1k9KkF0APPCR1eHQouD6WhfWCbZfXVWyzCbUtrGSt8mof25vs3gltq+tFpURRVxjbI3b2NYfs0CLO1yiHFjmk2HVij1auYrsRW1+F0U4qZxfKwJlur4QTYcQcJoIdc+XO2/poc1gmv/GZw3k216MnLpAL1JytPIiq5yDk883Dgk+DwPV9IGcIJbYPc84o1Ye6lHqu5wVA3tJQiRL5eiiHxlqKscSq76xfeZn3qICciiDroerbkYeuvnYBMLQFP/R9MyOkM9cnCoGYJJAPScvBRJ0mOeaKr/6l08XT6jXN7tx0vvHSbOMtsj1dzB9jIKYDlOiRu1omYyy0WDCj0YxFQE55EKWZzj2f6ee9xdCYEcmnwucEaN9bvaeRR1ehFn9BgMdGr0l3aCvfYyAfem9/GENlrz36ufpTBPTv07r8lm3qpPiOo1y/7u+SJImNzacmw5hrX1wt/kRpABBDQ84bJOf16+jLt/gPhUvGGw==" - }, - "MD": { - "example": "b1a536c0-29b9-11eb-adc1-0242ac120002" - }, - "TermUrl": { - "example": "https://api.sumup.com/v0.1/checkouts/e552de3b-1777-4c91-bdb8-756967678572/complete_payment" - } + "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" } } } @@ -6677,17 +7031,19 @@ "properties": { "message": { "description": "Short description of the error.", - "type": "string" + "type": "string", + "example": "Resource not found" }, "error_code": { "description": "Platform code for the error.", - "type": "string" + "type": "string", + "example": "NOT_FOUND" } }, "title": "Error" }, "Problem": { - "description": "A RFC 9457 problem details object.\n\nAdditional properties specific to the problem type may be present.\n", + "description": "A RFC 9457 problem details object.\n\nAdditional properties specific to the problem type may be present.", "type": "object", "properties": { "type": { @@ -6747,15 +7103,18 @@ "properties": { "error_message": { "description": "Short description of the error.", - "type": "string" + "type": "string", + "example": "request_not_allowed" }, "error_code": { "description": "Platform code for the error.", - "type": "string" + "type": "string", + "example": "FORBIDDEN" }, "status_code": { "description": "HTTP status code for the error.", - "type": "string" + "type": "string", + "example": "403" } }, "title": "Error Forbidden" @@ -6766,15 +7125,18 @@ "properties": { "title": { "description": "Short title of the error.", - "type": "string" + "type": "string", + "example": "Bad Request" }, "details": { "description": "Details of the error.", - "type": "string" + "type": "string", + "example": "One or more of the parameters are invalid." }, "status": { "description": "The status code.", - "type": "number" + "type": "number", + "example": 400 }, "failed_constraints": { "description": "List of violated validation constraints.", @@ -6789,13 +7151,19 @@ "type": "string" } } - } + }, + "example": [ + { + "message": "Currency must also be specified when filtering by amount", + "reference": "currency" + } + ] } }, "title": "Details Error" }, "Event": { - "description": "Transaction event details.", + "description": "High-level transaction event details.", "type": "object", "properties": { "id": { @@ -6945,23 +7313,26 @@ "title": "Transactions History Link" }, "MandatePayload": { - "description": "Mandate is passed when a card is to be tokenized", + "description": "Mandate details used when a checkout should create a reusable card token for future recurring or merchant-initiated payments.", "type": "object", "properties": { "type": { - "description": "Indicates the mandate type", + "description": "Type of mandate to create for the saved payment instrument.", "type": "string", + "example": "recurrent", "enum": [ "recurrent" ] }, "user_agent": { - "description": "Operating system and web client used by the end-user", - "type": "string" + "description": "Browser or client user agent observed when consent was collected.", + "type": "string", + "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 end user. Supports IPv4 and IPv6", - "type": "string" + "description": "IP address of the payer when the mandate was accepted.", + "type": "string", + "example": "172.217.169.174" } }, "example": { @@ -6976,19 +7347,24 @@ "title": "Mandate Payload" }, "MandateResponse": { - "description": "Created mandate", + "description": "Details of the mandate linked to the saved payment instrument.", "type": "object", "properties": { "type": { - "description": "Indicates the mandate type", + "description": "Type of mandate stored for the checkout or payment instrument.", "type": "string" }, "status": { - "description": "Mandate status", - "type": "string" + "description": "Current lifecycle status of the mandate.", + "type": "string", + "example": "active", + "enum": [ + "active", + "inactive" + ] }, "merchant_code": { - "description": "Merchant code which has the mandate", + "description": "Merchant account for which the mandate is valid.", "type": "string", "example": "MH4H92C7" } @@ -7177,11 +7553,16 @@ }, "emv_data": { "description": "EMV-specific metadata returned for card-present payments.", - "type": "object" + "type": "object", + "example": {} }, "acquirer_data": { "description": "Acquirer-specific metadata related to the card authorization.", "type": "object", + "example": { + "authorization_code": "053201", + "return_code": "00" + }, "properties": { "tid": { "type": "string" @@ -7512,10 +7893,25 @@ "type": "string" } }, + "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": "Details of a transaction event.", + "description": "Detailed information about a transaction event.", "type": "object", "properties": { "id": { @@ -7981,14 +8377,14 @@ } }, "transaction_events": { - "description": "List of transaction events related to the transaction.", + "description": "Detailed list of events related to the transaction.", "type": "array", "items": { "$ref": "#/components/schemas/TransactionEvent" } }, "simple_status": { - "description": "Status generated from the processing status and the latest transaction state.", + "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", "enum": [ "SUCCESSFUL", @@ -8011,7 +8407,7 @@ } }, "events": { - "description": "List of events related to the transaction.", + "description": "Compact list of events related to the transaction.", "type": "array", "items": { "$ref": "#/components/schemas/Event" @@ -8077,15 +8473,16 @@ "title": "Event Type" }, "EventStatus": { - "description": "Status of the transaction event.", + "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.", "type": "string", "enum": [ - "PENDING", - "SCHEDULED", "FAILED", + "PAID_OUT", + "PENDING", + "RECONCILED", "REFUNDED", - "SUCCESSFUL", - "PAID_OUT" + "SCHEDULED", + "SUCCESSFUL" ], "title": "Event Status" }, @@ -8882,7 +9279,7 @@ ], "externalDocs": { "description": "Merchant documentation", - "url": "https://developer.sumup.com/tools/models/merchant" + "url": "https://developer.sumup.com/tools/glossary/merchant" }, "title": "Merchant" }, @@ -8934,7 +9331,7 @@ }, "externalDocs": { "description": "Company documentation", - "url": "https://developer.sumup.com/tools/models/merchant#company" + "url": "https://developer.sumup.com/tools/glossary/merchant#company" } }, "Meta": { @@ -9079,7 +9476,7 @@ ], "externalDocs": { "description": "The country SDK documentation for legal types.", - "url": "https://developer.sumup.com/tools/models/merchant#legal-types" + "url": "https://developer.sumup.com/tools/glossary/merchant#legal-types" }, "maxLength": 64, "minLength": 4 @@ -9118,7 +9515,7 @@ ], "externalDocs": { "description": "Company identifier documentation", - "url": "https://developer.sumup.com/tools/models/merchant#company-identifiers" + "url": "https://developer.sumup.com/tools/glossary/merchant#company-identifiers" }, "required": [ "ref", @@ -9252,7 +9649,7 @@ }, "externalDocs": { "description": "Person documentation", - "url": "https://developer.sumup.com/tools/models/merchant#persons" + "url": "https://developer.sumup.com/tools/glossary/merchant#persons" }, "required": [ "id" @@ -9739,6 +10136,32 @@ "description": "Reader Checkout", "type": "object", "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" + }, + "signature": { + "description": "The base64 encoded signature of the transaction data.", + "type": "string", + "example": "QjcxRDdBNTU1MDcyRTNFRTREMkZEM0Y0NTdBMjkxMTU4MzBFNkNCQTs7MjAyNTExMTIyMTQ3MTM7Nzk2OzEwNDs5MDA7OTAwOzU0ODg5MDM5" + }, + "signature_data": { + "description": "The string containing the signed transaction data.", + "type": "string", + "example": "B71D7A555072E3EE4D2FD3F457A29115830E6CBA;;20251112214713;796;104;900;900;54889039" + } + }, + "required": [ + "provider_id", + "signature", + "signature_data" + ] + }, "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", @@ -9855,6 +10278,11 @@ } }, "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", @@ -9976,568 +10404,6 @@ "errors" ], "title": "NotFound" - }, - "CountryDetails": { - "description": "Country Details", - "type": "object", - "properties": { - "currency": { - "description": "Currency ISO 4217 code", - "type": "string" - }, - "iso_code": { - "description": "Country ISO code", - "type": "string" - }, - "en_name": { - "description": "Country EN name", - "type": "string" - }, - "native_name": { - "description": "Country native name", - "type": "string" - } - }, - "title": "Country Details" - }, - "TimeoffsetDetails": { - "description": "TimeOffset Details", - "type": "object", - "properties": { - "post_code": { - "description": "Postal code", - "type": "string" - }, - "offset": { - "description": "UTC offset", - "type": "number" - }, - "dst": { - "description": "Daylight Saving Time", - "type": "boolean" - } - }, - "title": "Time Offset Details" - }, - "AddressPayloadLegacy": { - "description": "Personal address", - "type": "object", - "properties": { - "address_line1": { - "description": "Address line 1", - "type": "string" - }, - "address_line2": { - "description": "Address line 2", - "type": "string" - }, - "city": { - "description": "City", - "type": "string" - }, - "country": { - "description": "Country ISO 3166-1 code", - "type": "string" - }, - "region_name": { - "description": "Country region name", - "type": "string" - }, - "post_code": { - "description": "Postal code", - "type": "string" - }, - "landline": { - "description": "Landline number", - "type": "string" - }, - "first_name": { - "description": "First name", - "type": "string" - }, - "last_name": { - "description": "Last name", - "type": "string" - }, - "company": { - "description": "Company name", - "type": "string" - } - }, - "required": [ - "address_line1", - "city", - "country", - "post_code" - ], - "title": "Address Payload Legacy" - }, - "BusinessOwners": { - "description": "Business owners information.", - "type": "array", - "items": { - "type": "object", - "properties": { - "first_name": { - "description": "BO's first name", - "type": "string" - }, - "last_name": { - "description": "BO's last name of the user", - "type": "string" - }, - "date_of_birth": { - "description": "Date of birth", - "type": "string" - }, - "mobile_phone": { - "description": "Mobile phone number", - "type": "string" - }, - "landline": { - "description": "BO's Landline", - "type": "string" - }, - "ownership": { - "description": "Ownership percentage", - "type": "number" - } - } - }, - "title": "Business Owners" - }, - "AddressWithDetails": { - "description": "Details of the registered address.", - "type": "object", - "properties": { - "address_line1": { - "description": "Address line 1", - "type": "string" - }, - "address_line2": { - "description": "Address line 2", - "type": "string" - }, - "city": { - "description": "City", - "type": "string" - }, - "country": { - "description": "Country ISO 3166-1 code", - "type": "string" - }, - "region_name": { - "description": "Region name", - "type": "string" - }, - "region_code": { - "description": "Region code", - "type": "string" - }, - "post_code": { - "description": "Postal code", - "type": "string" - }, - "landline": { - "description": "Landline number", - "type": "string" - }, - "first_name": { - "description": "undefined", - "type": "string" - }, - "last_name": { - "description": "undefined", - "type": "string" - }, - "company": { - "description": "undefined", - "type": "string" - }, - "country_details": { - "$ref": "#/components/schemas/CountryDetails" - }, - "timeoffset_details": { - "$ref": "#/components/schemas/TimeoffsetDetails" - }, - "state_id": { - "description": "undefined", - "type": "string" - } - }, - "title": "Address With Details" - }, - "BankAccountPayload": { - "description": "Bank account details used when creating or updating a payout account.", - "type": "object", - "properties": { - "bank_code": { - "description": "Bank code", - "type": "string" - }, - "branch_code": { - "description": "Branch code", - "type": "string" - }, - "account_number": { - "description": "Account number", - "type": "string" - }, - "iban": { - "description": "IBAN", - "type": "string" - }, - "swift": { - "description": "SWIFT code", - "type": "string" - }, - "account_type": { - "description": "Type of the account.", - "type": "string", - "enum": [ - "CURRENT", - "SAVINGS" - ] - }, - "account_holder_name": { - "description": "Account holder name", - "type": "string" - }, - "check_digit": { - "description": "Check digit", - "type": "string" - }, - "primary": { - "description": "Determines if this bank account will be primary. Default is false", - "type": "boolean" - }, - "status": { - "description": "Determines the bank account status.", - "type": "string", - "enum": [ - "OPEN" - ] - }, - "account_category": { - "description": "Determines if this bank account is business or personal.", - "type": "string", - "enum": [ - "PERSONAL", - "BUSINESS" - ] - } - }, - "required": [ - "account_holder_name", - "iban", - "swift" - ], - "title": "Bank Account Payload" - }, - "DoingBusinessAsPayloadLegacy": { - "description": "Doing Business As information", - "type": "object", - "properties": { - "business_name": { - "description": "Doing business as name", - "type": "string" - }, - "tax_id": { - "description": "Doing business as Tax ID", - "type": "string" - }, - "vat_id": { - "description": "Doing business as VAT ID", - "type": "string" - }, - "website": { - "description": "Doing business as website", - "type": "string" - }, - "email": { - "description": "Doing business as email", - "type": "string" - }, - "address": { - "$ref": "#/components/schemas/AddressPayloadLegacy" - } - }, - "title": "Doing Business As Payload Legacy" - }, - "MerchantProfilePayload": { - "description": "Account's merchant profile", - "type": "object", - "properties": { - "legal_type_id": { - "description": "Id of the legal type of the merchant", - "type": "number" - }, - "merchant_category_code": { - "description": "Merchant category code", - "type": "string" - }, - "company_name": { - "description": "Company name", - "type": "string" - }, - "company_registration_number": { - "description": "Company registration number", - "type": "string" - }, - "vat_id": { - "description": "Vat ID", - "type": "string" - }, - "permanent_certificate_access_code": { - "description": "Payment certificate access code", - "type": "string" - }, - "website": { - "description": "Company website", - "type": "string" - }, - "nature_and_purpose": { - "description": "Nature and purpose of the business. Required for the following merchant category codes: 5999, 7392, 8999, 5694, 5969, 7299, 7399", - "type": "string" - }, - "mobile_phone": { - "description": "Mobile number", - "type": "string" - }, - "address": { - "$ref": "#/components/schemas/AddressPayloadLegacy" - }, - "doing_business_as": { - "description": "Doing-business-as details associated with the merchant profile.", - "type": "object", - "properties": { - "business_name": { - "description": "Doing business as name", - "type": "string" - }, - "tax_id": { - "description": "Doing business as Tax ID", - "type": "string" - }, - "vat_id": { - "description": "Doing business as Vat ID", - "type": "string" - }, - "website": { - "description": "Doing business as website", - "type": "string" - }, - "email": { - "description": "Doing business as email", - "type": "string" - }, - "address": { - "$ref": "#/components/schemas/AddressPayloadLegacy" - } - } - }, - "business_owners": { - "$ref": "#/components/schemas/BusinessOwners" - }, - "is_test_account": { - "description": "Defines if the profile nature is for testing", - "type": "boolean" - } - }, - "required": [ - "legal_type_id", - "company_registration_number", - "merchant_category_code", - "company_name", - "address" - ], - "title": "Merchant Profile Payload" - }, - "MerchantSettingsPayload": { - "description": "Merchant payout and settlement configuration.", - "type": "object", - "properties": { - "payout_period": { - "description": "Payout period.", - "type": "string", - "enum": [ - "daily", - "weekly", - "monthly" - ] - }, - "payout_type": { - "description": "Payout type.", - "type": "string", - "enum": [ - "SINGLE_PAYMENT" - ] - }, - "payout_on_demand": { - "description": "If true, the merchant will not receive automatic payouts.", - "type": "boolean" - }, - "payout_on_demand_available": { - "description": "If true, the merchant will be able to manage payout_on_demand settings", - "type": "string" - }, - "expected_max_transaction_amount": { - "description": "Expected maximum amount of a single purchase", - "type": "number" - }, - "printers_enabled": { - "description": "Printers enabled.", - "type": "boolean" - }, - "gross_settlement": { - "description": "Gross settlement", - "type": "boolean" - } - }, - "title": "Merchant Settings Payload" - }, - "PaymentInstrumentCard": { - "description": "Details of the payment card that is saved as a payment instrument.", - "type": "object", - "properties": { - "type": { - "description": "Type of the payment instrument.", - "type": "string", - "enum": [ - "card" - ] - }, - "card": { - "$ref": "#/components/schemas/Card" - } - }, - "required": [ - "type", - "card" - ], - "title": "Payment Instrument Card" - }, - "PersonalProfilePayloadLegacy": { - "description": "Account's personal profile.", - "type": "object", - "properties": { - "first_name": { - "description": "First name of the user", - "type": "string" - }, - "last_name": { - "description": "Last name of the user", - "type": "string" - }, - "date_of_birth": { - "description": "Date of birth", - "type": "string", - "format": "date" - }, - "mobile_phone": { - "description": "Mobile phone number", - "type": "string" - }, - "national_id": { - "description": "National identification id. Country specific. Ex CPF (Brazil), DNI (Spain), PESEL (Poland)", - "type": "string" - }, - "address": { - "$ref": "#/components/schemas/AddressPayloadLegacy" - } - }, - "required": [ - "first_name", - "last_name", - "date_of_birth", - "address" - ], - "title": "Personal Profile Payload Legacy" - }, - "BankAccount": { - "description": "Bank account details used for merchant payouts.", - "type": "object", - "properties": { - "bank_code": { - "description": "Bank code", - "type": "string" - }, - "branch_code": { - "description": "Branch code", - "type": "string" - }, - "swift": { - "description": "SWIFT code", - "type": "string" - }, - "account_number": { - "description": "Account number", - "type": "string" - }, - "iban": { - "description": "IBAN", - "type": "string" - }, - "account_type": { - "description": "Type of the account", - "type": "string" - }, - "account_category": { - "description": "Account category - business or personal", - "type": "string" - }, - "account_holder_name": { - "description": "Name of the bank account holder.", - "type": "string" - }, - "status": { - "description": "Status in the verification process", - "type": "string" - }, - "primary": { - "description": "The primary bank account is the one used for payouts", - "type": "boolean" - }, - "created_at": { - "description": "Creation date of the bank account", - "type": "string" - }, - "bank_name": { - "description": "Bank name", - "type": "string" - } - }, - "title": "Bank Account" - }, - "PersonalProfileLegacy": { - "description": "Account's personal profile.", - "type": "object", - "properties": { - "first_name": { - "description": "First name of the user", - "type": "string" - }, - "last_name": { - "description": "Last name of the user", - "type": "string" - }, - "date_of_birth": { - "description": "Date of birth", - "type": "string" - }, - "mobile_phone": { - "description": "Mobile phone number", - "type": "string" - }, - "address": { - "$ref": "#/components/schemas/AddressWithDetails" - }, - "complete": { - "description": "Indicates whether the profile data is complete.", - "type": "boolean" - } - }, - "title": "Personal Profile Legacy" } }, "examples": { @@ -10573,16 +10439,6 @@ } }, "requestBodies": { - "BankAccounts": { - "description": "Bank account details to be created or updated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BankAccountPayload" - } - } - } - }, "CheckoutCreate": { "required": true, "description": "Details for creating a checkout resource.", @@ -10748,60 +10604,13 @@ } } }, - "DoingBusinessAsLegacy": { - "description": "Doing-business-as details for merchant profile updates.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DoingBusinessAsPayloadLegacy" - } - } - } - }, - "MerchantProfile": { - "description": "Merchant profile fields to create or update.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MerchantProfilePayload" - } - } - } - }, - "MerchantSettings": { - "description": "Merchant settings fields to create or update.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MerchantSettingsPayload" - } - } - } - }, - "PaymentInstrument": { - "description": "Payment instrument details.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentInstrumentCard" - } - } - } - }, - "PersonalProfile": { - "description": "Personal profile details to create or update.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PersonalProfilePayloadLegacy" - } - } - } - }, "Refund": { "description": "Optional amount for partial refunds.", "content": { "application/json": { + "example": { + "amount": 5 + }, "schema": { "description": "Optional amount for partial refunds of transactions.", "type": "object", @@ -10809,7 +10618,8 @@ "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" + "format": "float", + "example": 5 } } } @@ -10949,7 +10759,19 @@ "items": { "$ref": "#/components/schemas/CheckoutSuccess" } - } + }, + "example": [ + { + "checkout_reference": "f00a8f74-b05d-4605-bd73-2a901bae5802", + "amount": 10.1, + "currency": "EUR", + "merchant_code": "MH4H92C7", + "description": "Purchase", + "id": "4e425463-3e1b-431d-83fa-1e51c2925e99", + "status": "PENDING", + "date": "2020-02-29T10:56:56+00:00" + } + ] } } }, @@ -10959,6 +10781,18 @@ "application/json": { "schema": { "$ref": "#/components/schemas/CheckoutSuccess" + }, + "example": { + "checkout_reference": "f00a8f74-b05d-4605-bd73-2a901bae5802", + "amount": 10.1, + "currency": "EUR", + "merchant_code": "MH4H92C7", + "description": "Purchase", + "id": "4e425463-3e1b-431d-83fa-1e51c2925e99", + "status": "PENDING", + "date": "2020-02-29T10:56:56+00:00", + "transaction_code": "TEENSK4W2K", + "transaction_id": "410fc44a-5956-44e1-b5cc-19c6f8d727a4" } } } @@ -11167,6 +11001,22 @@ "application/json": { "schema": { "$ref": "#/components/schemas/TransactionFull" + }, + "example": { + "id": "410fc44a-5956-44e1-b5cc-19c6f8d727a4", + "transaction_code": "TEENSK4W2K", + "amount": 10.1, + "currency": "EUR", + "timestamp": "2020-02-29T10:56:56.876Z", + "status": "SUCCESSFUL", + "payment_type": "ECOM", + "installments_count": 1, + "merchant_code": "MH4H92C7", + "vat_amount": 6, + "tip_amount": 3, + "entry_mode": "CUSTOMER_ENTRY", + "auth_code": "053201", + "internal_id": 1763892018 } } } @@ -11329,13 +11179,13 @@ }, "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)\n", + "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)", "type": "http", "scheme": "Bearer" }, "oauth2": { "type": "oauth2", - "description": "SumUp supports [OAuth 2.0](https://tools.ietf.org/html/rfc6749) authentication for platforms that want to offer their services to SumUp users.\n\nTo integrate via OAuth 2.0 you will need a client credentials that you can create in the [SumUp Dashboard](https://me.sumup.com/settings/oauth2-applications).\n\nTo maintain security of our users, we highly recommend that you use one of the [recommended OAuth 2.0 libraries](https://oauth.net/code/) for authentication.\n", + "description": "SumUp supports [OAuth 2.0](https://tools.ietf.org/html/rfc6749) authentication for platforms that want to offer their services to SumUp users.\n\nTo integrate via OAuth 2.0 you will need a client credentials that you can create in the [SumUp Dashboard](https://me.sumup.com/settings/oauth2-applications).\n\nTo maintain security of our users, we highly recommend that you use one of the [recommended OAuth 2.0 libraries](https://oauth.net/code/) for authentication.", "flows": { "authorizationCode": { "authorizationUrl": "https://api.sumup.com/authorize", @@ -11372,7 +11222,7 @@ "tags": [ { "name": "Checkouts", - "description": "Accept payments from your end users by adding the Checkouts model to your platform.\nSumUp supports standard and single payment 3DS checkout flows.\n\nThe Checkout model allows creating, listing, retrieving, processing and deactivating checkouts.\nA payment is completed by creating a checkout and then processing the checkout.\n", + "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" @@ -11381,7 +11231,7 @@ }, { "name": "Customers", - "description": "Allow your regular customers to save their information with the Customers model.\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.\n", + "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" @@ -11390,11 +11240,11 @@ }, { "name": "Transactions", - "description": "Retrieve details for a specific transaction by it’s `id`\nor any other required query parameter, or list all transactions related to the merchant account.\n" + "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.\nYou can receive a detailed payouts list with information like dates, fees, references and statuses, using the `List payouts` endpoint.\n", + "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" From 62662bc5612a61b5ac3b9087aefb998f70fe1b57 Mon Sep 17 00:00:00 2001 From: "sumup-bot[bot]" <241716704+sumup-bot[bot]@users.noreply.github.com> Date: Mon, 13 Apr 2026 20:40:04 +0000 Subject: [PATCH 2/2] chore: generate code --- .../sdk/clients/CheckoutsAsyncClient.java | 77 +++++- .../sumup/sdk/clients/CheckoutsClient.java | 77 +++++- .../sumup/sdk/clients/PayoutsAsyncClient.java | 30 +-- .../com/sumup/sdk/clients/PayoutsClient.java | 30 +-- .../sdk/clients/TransactionsAsyncClient.java | 54 ++-- .../sumup/sdk/clients/TransactionsClient.java | 54 ++-- .../sdk/models/AddressPayloadLegacy.java | 190 ------------- .../sumup/sdk/models/AddressWithDetails.java | 252 ------------------ .../com/sumup/sdk/models/BankAccount.java | 220 --------------- .../sumup/sdk/models/BankAccountPayload.java | 207 -------------- .../BankAccountPayloadAccountCategory.java | 40 --- .../models/BankAccountPayloadAccountType.java | 40 --- .../com/sumup/sdk/models/BusinessOwners.java | 5 - .../sumup/sdk/models/BusinessOwnersItem.java | 118 -------- .../java/com/sumup/sdk/models/Checkout.java | 86 +++--- .../sumup/sdk/models/CheckoutAccepted.java | 9 +- .../sdk/models/CheckoutAcceptedNextStep.java | 37 ++- .../CheckoutAcceptedNextStepPayload.java | 71 ----- .../sdk/models/CheckoutCreateRequest.java | 92 ++++--- .../models/CheckoutCreateRequestPurpose.java | 6 +- .../com/sumup/sdk/models/CheckoutStatus.java | 6 +- .../com/sumup/sdk/models/CheckoutSuccess.java | 6 +- .../com/sumup/sdk/models/CountryDetails.java | 88 ------ .../models/CreateApplePaySessionRequest.java | 60 +++++ .../models/CreateReaderCheckoutRequest.java | 24 ++ .../CreateReaderCheckoutRequestAade.java | 83 ++++++ .../models/DoingBusinessAsPayloadLegacy.java | 118 -------- src/main/java/com/sumup/sdk/models/Event.java | 35 ++- .../com/sumup/sdk/models/EventStatus.java | 25 +- .../com/sumup/sdk/models/MandatePayload.java | 17 +- .../sumup/sdk/models/MandatePayloadType.java | 2 +- .../com/sumup/sdk/models/MandateResponse.java | 20 +- ...Status.java => MandateResponseStatus.java} | 15 +- .../sdk/models/MerchantProfilePayload.java | 243 ----------------- ...MerchantProfilePayloadDoingBusinessAs.java | 119 --------- .../sdk/models/MerchantSettingsPayload.java | 142 ---------- .../MerchantSettingsPayloadPayoutPeriod.java | 42 --- .../MerchantSettingsPayloadPayoutType.java | 39 --- .../sdk/models/PaymentInstrumentCard.java | 61 ----- .../sdk/models/PaymentInstrumentCardType.java | 39 --- .../sdk/models/PaymentInstrumentResponse.java | 4 +- .../sdk/models/PersonalProfileLegacy.java | 119 --------- .../models/PersonalProfilePayloadLegacy.java | 130 --------- .../com/sumup/sdk/models/ProcessCheckout.java | 38 ++- .../models/ProcessCheckoutPaymentType.java | 5 +- .../com/sumup/sdk/models/ReceiptEvent.java | 33 ++- .../sumup/sdk/models/TimeoffsetDetails.java | 73 ----- .../sumup/sdk/models/TransactionEvent.java | 35 ++- 48 files changed, 733 insertions(+), 2583 deletions(-) delete mode 100644 src/main/java/com/sumup/sdk/models/AddressPayloadLegacy.java delete mode 100644 src/main/java/com/sumup/sdk/models/AddressWithDetails.java delete mode 100644 src/main/java/com/sumup/sdk/models/BankAccount.java delete mode 100644 src/main/java/com/sumup/sdk/models/BankAccountPayload.java delete mode 100644 src/main/java/com/sumup/sdk/models/BankAccountPayloadAccountCategory.java delete mode 100644 src/main/java/com/sumup/sdk/models/BankAccountPayloadAccountType.java delete mode 100644 src/main/java/com/sumup/sdk/models/BusinessOwners.java delete mode 100644 src/main/java/com/sumup/sdk/models/BusinessOwnersItem.java delete mode 100644 src/main/java/com/sumup/sdk/models/CheckoutAcceptedNextStepPayload.java delete mode 100644 src/main/java/com/sumup/sdk/models/CountryDetails.java create mode 100644 src/main/java/com/sumup/sdk/models/CreateApplePaySessionRequest.java create mode 100644 src/main/java/com/sumup/sdk/models/CreateReaderCheckoutRequestAade.java delete mode 100644 src/main/java/com/sumup/sdk/models/DoingBusinessAsPayloadLegacy.java rename src/main/java/com/sumup/sdk/models/{BankAccountPayloadStatus.java => MandateResponseStatus.java} (58%) delete mode 100644 src/main/java/com/sumup/sdk/models/MerchantProfilePayload.java delete mode 100644 src/main/java/com/sumup/sdk/models/MerchantProfilePayloadDoingBusinessAs.java delete mode 100644 src/main/java/com/sumup/sdk/models/MerchantSettingsPayload.java delete mode 100644 src/main/java/com/sumup/sdk/models/MerchantSettingsPayloadPayoutPeriod.java delete mode 100644 src/main/java/com/sumup/sdk/models/MerchantSettingsPayloadPayoutType.java delete mode 100644 src/main/java/com/sumup/sdk/models/PaymentInstrumentCard.java delete mode 100644 src/main/java/com/sumup/sdk/models/PaymentInstrumentCardType.java delete mode 100644 src/main/java/com/sumup/sdk/models/PersonalProfileLegacy.java delete mode 100644 src/main/java/com/sumup/sdk/models/PersonalProfilePayloadLegacy.java delete mode 100644 src/main/java/com/sumup/sdk/models/TimeoffsetDetails.java diff --git a/src/main/java/com/sumup/sdk/clients/CheckoutsAsyncClient.java b/src/main/java/com/sumup/sdk/clients/CheckoutsAsyncClient.java index 88c457a..899fe32 100644 --- a/src/main/java/com/sumup/sdk/clients/CheckoutsAsyncClient.java +++ b/src/main/java/com/sumup/sdk/clients/CheckoutsAsyncClient.java @@ -14,10 +14,19 @@ /** * Client for the "Checkouts" API group. * - *

Accept payments from your end users by adding the Checkouts model to your platform. SumUp - * supports standard and single payment 3DS checkout flows. The Checkout model allows creating, - * listing, retrieving, processing and deactivating checkouts. A payment is completed by creating a - * checkout and then processing the checkout. + *

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. + * Use this tag to: - create a checkout before collecting or confirming payment details - process + * the checkout with a card, saved card, wallet, or supported alternative payment method - retrieve + * or list checkouts to inspect their current state and associated payment attempts - deactivate a + * checkout that should no longer be used Typical workflow: - create a checkout with the order + * amount, currency, and merchant information - process the checkout through SumUp client tools such + * as the [Payment Widget and Swift Checkout + * SDK](https://developer.sumup.com/online-payments/checkouts) - retrieve the checkout or use the + * Transactions endpoints to inspect the resulting payment record Checkouts are used to initiate and + * orchestrate online payments. Transactions remain the authoritative record of the resulting + * payment outcome. */ public final class CheckoutsAsyncClient { private final ApiClient apiClient; @@ -31,6 +40,66 @@ public CheckoutsAsyncClient(ApiClient apiClient) { this.apiClient = Objects.requireNonNull(apiClient, "apiClient"); } + /** + * Create an Apple Pay session + * + *

Creates an Apple Pay merchant session for the specified checkout. Use this endpoint after + * the customer selects Apple Pay and before calling + * `ApplePaySession.completeMerchantValidation(...)` in the browser. SumUp validates the merchant + * session request and returns the Apple Pay session object that your frontend should pass to + * Apple's JavaScript API. + * + *

Operation ID: CreateApplePaySession + * + * @param id Unique ID of the checkout resource. + * @param request The data needed to create an apple pay session for a checkout. + *

Call the overload that accepts RequestOptions to customize headers, authorization, or + * request timeout. + * @return CompletableFuture resolved with {@code java.util.Map} parsed response. + * @throws ApiException if the SumUp API returns an error. + */ + public CompletableFuture> createApplePaySession( + String id, com.sumup.sdk.models.CreateApplePaySessionRequest request) throws ApiException { + return createApplePaySession(id, request, null); + } + + /** + * Create an Apple Pay session + * + *

Creates an Apple Pay merchant session for the specified checkout. Use this endpoint after + * the customer selects Apple Pay and before calling + * `ApplePaySession.completeMerchantValidation(...)` in the browser. SumUp validates the merchant + * session request and returns the Apple Pay session object that your frontend should pass to + * Apple's JavaScript API. + * + *

Operation ID: CreateApplePaySession + * + * @param id Unique ID of the checkout resource. + * @param request The data needed to create an apple pay session for a checkout. + * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass + * {@code null} to use client defaults. + * @return CompletableFuture resolved with {@code java.util.Map} parsed response. + * @throws ApiException if the SumUp API returns an error. + */ + public CompletableFuture> createApplePaySession( + String id, + com.sumup.sdk.models.CreateApplePaySessionRequest request, + RequestOptions requestOptions) + throws ApiException { + Objects.requireNonNull(id, "id"); + String path = "/v0.2/checkouts/{id}/apple-pay-session"; + path = path.replace("{id}", ApiClient.urlEncode(String.valueOf(id))); + + return this.apiClient.sendAsync( + HttpMethod.PUT, + path, + null, + null, + request, + new TypeReference>() {}, + requestOptions); + } + /** * Create a checkout * diff --git a/src/main/java/com/sumup/sdk/clients/CheckoutsClient.java b/src/main/java/com/sumup/sdk/clients/CheckoutsClient.java index caf5170..8710e82 100644 --- a/src/main/java/com/sumup/sdk/clients/CheckoutsClient.java +++ b/src/main/java/com/sumup/sdk/clients/CheckoutsClient.java @@ -13,10 +13,19 @@ /** * Client for the "Checkouts" API group. * - *

Accept payments from your end users by adding the Checkouts model to your platform. SumUp - * supports standard and single payment 3DS checkout flows. The Checkout model allows creating, - * listing, retrieving, processing and deactivating checkouts. A payment is completed by creating a - * checkout and then processing the checkout. + *

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. + * Use this tag to: - create a checkout before collecting or confirming payment details - process + * the checkout with a card, saved card, wallet, or supported alternative payment method - retrieve + * or list checkouts to inspect their current state and associated payment attempts - deactivate a + * checkout that should no longer be used Typical workflow: - create a checkout with the order + * amount, currency, and merchant information - process the checkout through SumUp client tools such + * as the [Payment Widget and Swift Checkout + * SDK](https://developer.sumup.com/online-payments/checkouts) - retrieve the checkout or use the + * Transactions endpoints to inspect the resulting payment record Checkouts are used to initiate and + * orchestrate online payments. Transactions remain the authoritative record of the resulting + * payment outcome. */ public final class CheckoutsClient { private final ApiClient apiClient; @@ -30,6 +39,66 @@ public CheckoutsClient(ApiClient apiClient) { this.apiClient = Objects.requireNonNull(apiClient, "apiClient"); } + /** + * Create an Apple Pay session + * + *

Creates an Apple Pay merchant session for the specified checkout. Use this endpoint after + * the customer selects Apple Pay and before calling + * `ApplePaySession.completeMerchantValidation(...)` in the browser. SumUp validates the merchant + * session request and returns the Apple Pay session object that your frontend should pass to + * Apple's JavaScript API. + * + *

Operation ID: CreateApplePaySession + * + * @param id Unique ID of the checkout resource. + * @param request The data needed to create an apple pay session for a checkout. + *

Call the overload that accepts RequestOptions to customize headers, authorization, or + * request timeout. + * @return {@code java.util.Map} parsed response. + * @throws ApiException if the SumUp API returns an error. + */ + public java.util.Map createApplePaySession( + String id, com.sumup.sdk.models.CreateApplePaySessionRequest request) throws ApiException { + return createApplePaySession(id, request, null); + } + + /** + * Create an Apple Pay session + * + *

Creates an Apple Pay merchant session for the specified checkout. Use this endpoint after + * the customer selects Apple Pay and before calling + * `ApplePaySession.completeMerchantValidation(...)` in the browser. SumUp validates the merchant + * session request and returns the Apple Pay session object that your frontend should pass to + * Apple's JavaScript API. + * + *

Operation ID: CreateApplePaySession + * + * @param id Unique ID of the checkout resource. + * @param request The data needed to create an apple pay session for a checkout. + * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass + * {@code null} to use client defaults. + * @return {@code java.util.Map} parsed response. + * @throws ApiException if the SumUp API returns an error. + */ + public java.util.Map createApplePaySession( + String id, + com.sumup.sdk.models.CreateApplePaySessionRequest request, + RequestOptions requestOptions) + throws ApiException { + Objects.requireNonNull(id, "id"); + String path = "/v0.2/checkouts/{id}/apple-pay-session"; + path = path.replace("{id}", ApiClient.urlEncode(String.valueOf(id))); + + return this.apiClient.send( + HttpMethod.PUT, + path, + null, + null, + request, + new TypeReference>() {}, + requestOptions); + } + /** * Create a checkout * diff --git a/src/main/java/com/sumup/sdk/clients/PayoutsAsyncClient.java b/src/main/java/com/sumup/sdk/clients/PayoutsAsyncClient.java index a81b77e..b9922a7 100644 --- a/src/main/java/com/sumup/sdk/clients/PayoutsAsyncClient.java +++ b/src/main/java/com/sumup/sdk/clients/PayoutsAsyncClient.java @@ -33,7 +33,7 @@ public PayoutsAsyncClient(ApiClient apiClient) { /** * List payouts * - *

Lists ordered payouts for the merchant profile. + *

Lists ordered payouts for the merchant account. * *

Operation ID: ListPayouts * @@ -52,7 +52,7 @@ public CompletableFuture listPayouts( /** * List payouts * - *

Lists ordered payouts for the merchant profile. + *

Lists ordered payouts for the merchant account. * *

Operation ID: ListPayouts * @@ -75,7 +75,7 @@ public CompletableFuture listPayouts( /** * List payouts * - *

Lists ordered payouts for the merchant profile. + *

Lists ordered payouts for the merchant account. * *

Operation ID: ListPayouts * @@ -116,11 +116,11 @@ public CompletableFuture listPayouts( /** * List payouts * - *

Lists ordered payouts for the merchant profile. + *

Lists ordered payouts for the merchant account. * *

Operation ID: ListPayoutsV1 * - * @param merchantCode Path parameter. + * @param merchantCode Merchant code of the account whose payouts should be listed. * @param endDate End date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). * @param startDate Start date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). *

Call the overload that accepts optional parameter objects or RequestOptions to customize @@ -137,11 +137,11 @@ public CompletableFuture listPayoutsV1( /** * List payouts * - *

Lists ordered payouts for the merchant profile. + *

Lists ordered payouts for the merchant account. * *

Operation ID: ListPayoutsV1 * - * @param merchantCode Path parameter. + * @param merchantCode Merchant code of the account whose payouts should be listed. * @param endDate End date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). * @param startDate Start date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). * @param listPayoutsV1 Optional query parameters for this request. @@ -162,11 +162,11 @@ public CompletableFuture listPayoutsV1( /** * List payouts * - *

Lists ordered payouts for the merchant profile. + *

Lists ordered payouts for the merchant account. * *

Operation ID: ListPayoutsV1 * - * @param merchantCode Path parameter. + * @param merchantCode Merchant code of the account whose payouts should be listed. * @param endDate End date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). * @param startDate Start date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). * @param listPayoutsV1 Optional query parameters for this request. @@ -211,7 +211,7 @@ public static final class ListPayoutsQueryParams { /** * Sets the format query parameter. * - * @param value Query parameter value. + * @param value Response format for the payout list. * @return This ListPayoutsQueryParams instance. */ public ListPayoutsQueryParams format(com.sumup.sdk.models.Format2 value) { @@ -222,7 +222,7 @@ public ListPayoutsQueryParams format(com.sumup.sdk.models.Format2 value) { /** * Sets the limit query parameter. * - * @param value Query parameter value. + * @param value Maximum number of payout records to return. * @return This ListPayoutsQueryParams instance. */ public ListPayoutsQueryParams limit(Long value) { @@ -233,7 +233,7 @@ public ListPayoutsQueryParams limit(Long value) { /** * Sets the order query parameter. * - * @param value Query parameter value. + * @param value Sort direction for the returned payouts. * @return This ListPayoutsQueryParams instance. */ public ListPayoutsQueryParams order(com.sumup.sdk.models.Order2 value) { @@ -258,7 +258,7 @@ public static final class ListPayoutsV1QueryParams { /** * Sets the format query parameter. * - * @param value Query parameter value. + * @param value Response format for the payout list. * @return This ListPayoutsV1QueryParams instance. */ public ListPayoutsV1QueryParams format(com.sumup.sdk.models.Format value) { @@ -269,7 +269,7 @@ public ListPayoutsV1QueryParams format(com.sumup.sdk.models.Format value) { /** * Sets the limit query parameter. * - * @param value Query parameter value. + * @param value Maximum number of payout records to return. * @return This ListPayoutsV1QueryParams instance. */ public ListPayoutsV1QueryParams limit(Long value) { @@ -280,7 +280,7 @@ public ListPayoutsV1QueryParams limit(Long value) { /** * Sets the order query parameter. * - * @param value Query parameter value. + * @param value Sort direction for the returned payouts. * @return This ListPayoutsV1QueryParams instance. */ public ListPayoutsV1QueryParams order(com.sumup.sdk.models.Order2 value) { diff --git a/src/main/java/com/sumup/sdk/clients/PayoutsClient.java b/src/main/java/com/sumup/sdk/clients/PayoutsClient.java index e3b2e65..ad523cc 100644 --- a/src/main/java/com/sumup/sdk/clients/PayoutsClient.java +++ b/src/main/java/com/sumup/sdk/clients/PayoutsClient.java @@ -32,7 +32,7 @@ public PayoutsClient(ApiClient apiClient) { /** * List payouts * - *

Lists ordered payouts for the merchant profile. + *

Lists ordered payouts for the merchant account. * *

Operation ID: ListPayouts * @@ -51,7 +51,7 @@ public com.sumup.sdk.models.FinancialPayouts listPayouts( /** * List payouts * - *

Lists ordered payouts for the merchant profile. + *

Lists ordered payouts for the merchant account. * *

Operation ID: ListPayouts * @@ -74,7 +74,7 @@ public com.sumup.sdk.models.FinancialPayouts listPayouts( /** * List payouts * - *

Lists ordered payouts for the merchant profile. + *

Lists ordered payouts for the merchant account. * *

Operation ID: ListPayouts * @@ -115,11 +115,11 @@ public com.sumup.sdk.models.FinancialPayouts listPayouts( /** * List payouts * - *

Lists ordered payouts for the merchant profile. + *

Lists ordered payouts for the merchant account. * *

Operation ID: ListPayoutsV1 * - * @param merchantCode Path parameter. + * @param merchantCode Merchant code of the account whose payouts should be listed. * @param endDate End date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). * @param startDate Start date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). *

Call the overload that accepts optional parameter objects or RequestOptions to customize @@ -136,11 +136,11 @@ public com.sumup.sdk.models.FinancialPayouts listPayoutsV1( /** * List payouts * - *

Lists ordered payouts for the merchant profile. + *

Lists ordered payouts for the merchant account. * *

Operation ID: ListPayoutsV1 * - * @param merchantCode Path parameter. + * @param merchantCode Merchant code of the account whose payouts should be listed. * @param endDate End date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). * @param startDate Start date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). * @param listPayoutsV1 Optional query parameters for this request. @@ -161,11 +161,11 @@ public com.sumup.sdk.models.FinancialPayouts listPayoutsV1( /** * List payouts * - *

Lists ordered payouts for the merchant profile. + *

Lists ordered payouts for the merchant account. * *

Operation ID: ListPayoutsV1 * - * @param merchantCode Path parameter. + * @param merchantCode Merchant code of the account whose payouts should be listed. * @param endDate End date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). * @param startDate Start date (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format). * @param listPayoutsV1 Optional query parameters for this request. @@ -210,7 +210,7 @@ public static final class ListPayoutsQueryParams { /** * Sets the format query parameter. * - * @param value Query parameter value. + * @param value Response format for the payout list. * @return This ListPayoutsQueryParams instance. */ public ListPayoutsQueryParams format(com.sumup.sdk.models.Format2 value) { @@ -221,7 +221,7 @@ public ListPayoutsQueryParams format(com.sumup.sdk.models.Format2 value) { /** * Sets the limit query parameter. * - * @param value Query parameter value. + * @param value Maximum number of payout records to return. * @return This ListPayoutsQueryParams instance. */ public ListPayoutsQueryParams limit(Long value) { @@ -232,7 +232,7 @@ public ListPayoutsQueryParams limit(Long value) { /** * Sets the order query parameter. * - * @param value Query parameter value. + * @param value Sort direction for the returned payouts. * @return This ListPayoutsQueryParams instance. */ public ListPayoutsQueryParams order(com.sumup.sdk.models.Order2 value) { @@ -257,7 +257,7 @@ public static final class ListPayoutsV1QueryParams { /** * Sets the format query parameter. * - * @param value Query parameter value. + * @param value Response format for the payout list. * @return This ListPayoutsV1QueryParams instance. */ public ListPayoutsV1QueryParams format(com.sumup.sdk.models.Format value) { @@ -268,7 +268,7 @@ public ListPayoutsV1QueryParams format(com.sumup.sdk.models.Format value) { /** * Sets the limit query parameter. * - * @param value Query parameter value. + * @param value Maximum number of payout records to return. * @return This ListPayoutsV1QueryParams instance. */ public ListPayoutsV1QueryParams limit(Long value) { @@ -279,7 +279,7 @@ public ListPayoutsV1QueryParams limit(Long value) { /** * Sets the order query parameter. * - * @param value Query parameter value. + * @param value Sort direction for the returned payouts. * @return This ListPayoutsV1QueryParams instance. */ public ListPayoutsV1QueryParams order(com.sumup.sdk.models.Order2 value) { diff --git a/src/main/java/com/sumup/sdk/clients/TransactionsAsyncClient.java b/src/main/java/com/sumup/sdk/clients/TransactionsAsyncClient.java index 91c245b..cda2e41 100644 --- a/src/main/java/com/sumup/sdk/clients/TransactionsAsyncClient.java +++ b/src/main/java/com/sumup/sdk/clients/TransactionsAsyncClient.java @@ -14,8 +14,22 @@ /** * Client for the "Transactions" API group. * - *

Retrieve details for a specific transaction by it’s `id` or any other required query - * parameter, or list all transactions related to the merchant account. + *

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. In 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: - `PAYOUT`: the payment being prepared for payout or included in a payout to the + * merchant - `REFUND`: money returned to the payer - `CHARGE_BACK`: money reversed after the + * original payment - `PAYOUT_DEDUCTION`: an amount deducted from a payout to cover a refund or + * chargeback From an integrator's perspective, transactions are the authoritative record of payment + * outcomes. Use this tag to: - list transactions for reporting, reconciliation, and customer + * support workflows - retrieve a single transaction when you need the latest payment details - + * inspect `simple_status` for the current merchant-facing outcome of the payment - inspect `events` + * or `transaction_events` when you need refund, payout, or chargeback history Typical workflow: - + * create and process payments through the Checkouts endpoints - use the Transactions endpoints to + * read the resulting payment records - use the returned statuses and events to update your own + * order, accounting, or support systems */ public final class TransactionsAsyncClient { private final ApiClient apiClient; @@ -33,8 +47,8 @@ public TransactionsAsyncClient(ApiClient apiClient) { * Retrieve a transaction * *

Retrieves the full details of an identified transaction. The transaction resource is - * identified by a query parameter and *one* of following parameters is required: * `id` * - * `internal_id` * `transaction_code` * `foreign_transaction_id` * `client_transaction_id` + * identified by a query parameter and *one* of following parameters is required: - `id` - + * `internal_id` - `transaction_code` - `foreign_transaction_id` - `client_transaction_id` * *

Operation ID: GetTransaction * @@ -53,8 +67,8 @@ public CompletableFuture getTransaction() * Retrieve a transaction * *

Retrieves the full details of an identified transaction. The transaction resource is - * identified by a query parameter and *one* of following parameters is required: * `id` * - * `internal_id` * `transaction_code` * `foreign_transaction_id` * `client_transaction_id` + * identified by a query parameter and *one* of following parameters is required: - `id` - + * `internal_id` - `transaction_code` - `foreign_transaction_id` - `client_transaction_id` * *

Operation ID: GetTransaction * @@ -73,8 +87,8 @@ public CompletableFuture getTransaction( * Retrieve a transaction * *

Retrieves the full details of an identified transaction. The transaction resource is - * identified by a query parameter and *one* of following parameters is required: * `id` * - * `internal_id` * `transaction_code` * `foreign_transaction_id` * `client_transaction_id` + * identified by a query parameter and *one* of following parameters is required: - `id` - + * `internal_id` - `transaction_code` - `foreign_transaction_id` - `client_transaction_id` * *

Operation ID: GetTransaction * @@ -106,12 +120,12 @@ public CompletableFuture getTransaction( * Retrieve a transaction * *

Retrieves the full details of an identified transaction. The transaction resource is - * identified by a query parameter and *one* of following parameters is required: * `id` * - * `internal_id` * `transaction_code` * `foreign_transaction_id` * `client_transaction_id` + * identified by a query parameter and *one* of following parameters is required: - `id` - + * `internal_id` - `transaction_code` - `foreign_transaction_id` - `client_transaction_id` * *

Operation ID: GetTransactionV2.1 * - * @param merchantCode Path parameter. + * @param merchantCode Merchant code of the account whose transaction should be retrieved. *

Call the overload that accepts optional parameter objects or RequestOptions to customize * headers, authorization, query values, or timeouts. * @return CompletableFuture resolved with com.sumup.sdk.models.TransactionFull parsed response. @@ -126,12 +140,12 @@ public CompletableFuture getTransactionV21 * Retrieve a transaction * *

Retrieves the full details of an identified transaction. The transaction resource is - * identified by a query parameter and *one* of following parameters is required: * `id` * - * `internal_id` * `transaction_code` * `foreign_transaction_id` * `client_transaction_id` + * identified by a query parameter and *one* of following parameters is required: - `id` - + * `internal_id` - `transaction_code` - `foreign_transaction_id` - `client_transaction_id` * *

Operation ID: GetTransactionV2.1 * - * @param merchantCode Path parameter. + * @param merchantCode Merchant code of the account whose transaction should be retrieved. * @param getTransactionV21 Optional query parameters for this request. *

Call the overload that accepts RequestOptions to customize headers, authorization, or * request timeout. @@ -147,12 +161,12 @@ public CompletableFuture getTransactionV21 * Retrieve a transaction * *

Retrieves the full details of an identified transaction. The transaction resource is - * identified by a query parameter and *one* of following parameters is required: * `id` * - * `internal_id` * `transaction_code` * `foreign_transaction_id` * `client_transaction_id` + * identified by a query parameter and *one* of following parameters is required: - `id` - + * `internal_id` - `transaction_code` - `foreign_transaction_id` - `client_transaction_id` * *

Operation ID: GetTransactionV2.1 * - * @param merchantCode Path parameter. + * @param merchantCode Merchant code of the account whose transaction should be retrieved. * @param getTransactionV21 Optional query parameters for this request. * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass * {@code null} to use client defaults. @@ -260,7 +274,7 @@ public CompletableFuture listTran * *

Operation ID: ListTransactionsV2.1 * - * @param merchantCode Path parameter. + * @param merchantCode Merchant code of the account whose transaction history should be listed. *

Call the overload that accepts optional parameter objects or RequestOptions to customize * headers, authorization, query values, or timeouts. * @return CompletableFuture resolved with com.sumup.sdk.models.ListTransactionsV21Response parsed @@ -279,7 +293,7 @@ public CompletableFuture listT * *

Operation ID: ListTransactionsV2.1 * - * @param merchantCode Path parameter. + * @param merchantCode Merchant code of the account whose transaction history should be listed. * @param listTransactionsV21 Optional query parameters for this request. *

Call the overload that accepts RequestOptions to customize headers, authorization, or * request timeout. @@ -299,7 +313,7 @@ public CompletableFuture listT * *

Operation ID: ListTransactionsV2.1 * - * @param merchantCode Path parameter. + * @param merchantCode Merchant code of the account whose transaction history should be listed. * @param listTransactionsV21 Optional query parameters for this request. * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass * {@code null} to use client defaults. diff --git a/src/main/java/com/sumup/sdk/clients/TransactionsClient.java b/src/main/java/com/sumup/sdk/clients/TransactionsClient.java index 52c5d48..97d0e17 100644 --- a/src/main/java/com/sumup/sdk/clients/TransactionsClient.java +++ b/src/main/java/com/sumup/sdk/clients/TransactionsClient.java @@ -13,8 +13,22 @@ /** * Client for the "Transactions" API group. * - *

Retrieve details for a specific transaction by it’s `id` or any other required query - * parameter, or list all transactions related to the merchant account. + *

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. In 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: - `PAYOUT`: the payment being prepared for payout or included in a payout to the + * merchant - `REFUND`: money returned to the payer - `CHARGE_BACK`: money reversed after the + * original payment - `PAYOUT_DEDUCTION`: an amount deducted from a payout to cover a refund or + * chargeback From an integrator's perspective, transactions are the authoritative record of payment + * outcomes. Use this tag to: - list transactions for reporting, reconciliation, and customer + * support workflows - retrieve a single transaction when you need the latest payment details - + * inspect `simple_status` for the current merchant-facing outcome of the payment - inspect `events` + * or `transaction_events` when you need refund, payout, or chargeback history Typical workflow: - + * create and process payments through the Checkouts endpoints - use the Transactions endpoints to + * read the resulting payment records - use the returned statuses and events to update your own + * order, accounting, or support systems */ public final class TransactionsClient { private final ApiClient apiClient; @@ -32,8 +46,8 @@ public TransactionsClient(ApiClient apiClient) { * Retrieve a transaction * *

Retrieves the full details of an identified transaction. The transaction resource is - * identified by a query parameter and *one* of following parameters is required: * `id` * - * `internal_id` * `transaction_code` * `foreign_transaction_id` * `client_transaction_id` + * identified by a query parameter and *one* of following parameters is required: - `id` - + * `internal_id` - `transaction_code` - `foreign_transaction_id` - `client_transaction_id` * *

Operation ID: GetTransaction * @@ -51,8 +65,8 @@ public com.sumup.sdk.models.TransactionFull getTransaction() throws ApiException * Retrieve a transaction * *

Retrieves the full details of an identified transaction. The transaction resource is - * identified by a query parameter and *one* of following parameters is required: * `id` * - * `internal_id` * `transaction_code` * `foreign_transaction_id` * `client_transaction_id` + * identified by a query parameter and *one* of following parameters is required: - `id` - + * `internal_id` - `transaction_code` - `foreign_transaction_id` - `client_transaction_id` * *

Operation ID: GetTransaction * @@ -71,8 +85,8 @@ public com.sumup.sdk.models.TransactionFull getTransaction( * Retrieve a transaction * *

Retrieves the full details of an identified transaction. The transaction resource is - * identified by a query parameter and *one* of following parameters is required: * `id` * - * `internal_id` * `transaction_code` * `foreign_transaction_id` * `client_transaction_id` + * identified by a query parameter and *one* of following parameters is required: - `id` - + * `internal_id` - `transaction_code` - `foreign_transaction_id` - `client_transaction_id` * *

Operation ID: GetTransaction * @@ -104,12 +118,12 @@ public com.sumup.sdk.models.TransactionFull getTransaction( * Retrieve a transaction * *

Retrieves the full details of an identified transaction. The transaction resource is - * identified by a query parameter and *one* of following parameters is required: * `id` * - * `internal_id` * `transaction_code` * `foreign_transaction_id` * `client_transaction_id` + * identified by a query parameter and *one* of following parameters is required: - `id` - + * `internal_id` - `transaction_code` - `foreign_transaction_id` - `client_transaction_id` * *

Operation ID: GetTransactionV2.1 * - * @param merchantCode Path parameter. + * @param merchantCode Merchant code of the account whose transaction should be retrieved. *

Call the overload that accepts optional parameter objects or RequestOptions to customize * headers, authorization, query values, or timeouts. * @return com.sumup.sdk.models.TransactionFull parsed response. @@ -124,12 +138,12 @@ public com.sumup.sdk.models.TransactionFull getTransactionV21(String merchantCod * Retrieve a transaction * *

Retrieves the full details of an identified transaction. The transaction resource is - * identified by a query parameter and *one* of following parameters is required: * `id` * - * `internal_id` * `transaction_code` * `foreign_transaction_id` * `client_transaction_id` + * identified by a query parameter and *one* of following parameters is required: - `id` - + * `internal_id` - `transaction_code` - `foreign_transaction_id` - `client_transaction_id` * *

Operation ID: GetTransactionV2.1 * - * @param merchantCode Path parameter. + * @param merchantCode Merchant code of the account whose transaction should be retrieved. * @param getTransactionV21 Optional query parameters for this request. *

Call the overload that accepts RequestOptions to customize headers, authorization, or * request timeout. @@ -145,12 +159,12 @@ public com.sumup.sdk.models.TransactionFull getTransactionV21( * Retrieve a transaction * *

Retrieves the full details of an identified transaction. The transaction resource is - * identified by a query parameter and *one* of following parameters is required: * `id` * - * `internal_id` * `transaction_code` * `foreign_transaction_id` * `client_transaction_id` + * identified by a query parameter and *one* of following parameters is required: - `id` - + * `internal_id` - `transaction_code` - `foreign_transaction_id` - `client_transaction_id` * *

Operation ID: GetTransactionV2.1 * - * @param merchantCode Path parameter. + * @param merchantCode Merchant code of the account whose transaction should be retrieved. * @param getTransactionV21 Optional query parameters for this request. * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass * {@code null} to use client defaults. @@ -254,7 +268,7 @@ public com.sumup.sdk.models.ListTransactionsResponse listTransactions( * *

Operation ID: ListTransactionsV2.1 * - * @param merchantCode Path parameter. + * @param merchantCode Merchant code of the account whose transaction history should be listed. *

Call the overload that accepts optional parameter objects or RequestOptions to customize * headers, authorization, query values, or timeouts. * @return com.sumup.sdk.models.ListTransactionsV21Response parsed response. @@ -272,7 +286,7 @@ public com.sumup.sdk.models.ListTransactionsV21Response listTransactionsV21(Stri * *

Operation ID: ListTransactionsV2.1 * - * @param merchantCode Path parameter. + * @param merchantCode Merchant code of the account whose transaction history should be listed. * @param listTransactionsV21 Optional query parameters for this request. *

Call the overload that accepts RequestOptions to customize headers, authorization, or * request timeout. @@ -291,7 +305,7 @@ public com.sumup.sdk.models.ListTransactionsV21Response listTransactionsV21( * *

Operation ID: ListTransactionsV2.1 * - * @param merchantCode Path parameter. + * @param merchantCode Merchant code of the account whose transaction history should be listed. * @param listTransactionsV21 Optional query parameters for this request. * @param requestOptions Request-specific overrides (headers, authorization, or timeout). Pass * {@code null} to use client defaults. diff --git a/src/main/java/com/sumup/sdk/models/AddressPayloadLegacy.java b/src/main/java/com/sumup/sdk/models/AddressPayloadLegacy.java deleted file mode 100644 index 10b8412..0000000 --- a/src/main/java/com/sumup/sdk/models/AddressPayloadLegacy.java +++ /dev/null @@ -1,190 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -import java.util.Objects; - -/** Personal address */ -public record AddressPayloadLegacy( - /** Address line 1 */ - String addressLine1, - - /** Address line 2 */ - String addressLine2, - - /** City */ - String city, - - /** Company name */ - String company, - - /** Country ISO 3166-1 code */ - String country, - - /** First name */ - String firstName, - - /** Landline number */ - String landline, - - /** Last name */ - String lastName, - - /** Postal code */ - String postCode, - - /** Country region name */ - String regionName) { - /** - * Creates a builder for AddressPayloadLegacy. - * - * @return Builder that constructs immutable AddressPayloadLegacy instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for AddressPayloadLegacy instances. */ - public static final class Builder { - private String addressLine1; - private String addressLine2; - private String city; - private String company; - private String country; - private String firstName; - private String landline; - private String lastName; - private String postCode; - private String regionName; - - private Builder() {} - - /** - * Sets the value for {@code addressLine1}. - * - * @param addressLine1 Address line 1 - * @return This builder instance. - */ - public Builder addressLine1(String addressLine1) { - this.addressLine1 = addressLine1; - return this; - } - - /** - * Sets the value for {@code addressLine2}. - * - * @param addressLine2 Address line 2 - * @return This builder instance. - */ - public Builder addressLine2(String addressLine2) { - this.addressLine2 = addressLine2; - return this; - } - - /** - * Sets the value for {@code city}. - * - * @param city City - * @return This builder instance. - */ - public Builder city(String city) { - this.city = city; - return this; - } - - /** - * Sets the value for {@code company}. - * - * @param company Company name - * @return This builder instance. - */ - public Builder company(String company) { - this.company = company; - return this; - } - - /** - * Sets the value for {@code country}. - * - * @param country Country ISO 3166-1 code - * @return This builder instance. - */ - public Builder country(String country) { - this.country = country; - return this; - } - - /** - * Sets the value for {@code firstName}. - * - * @param firstName First name - * @return This builder instance. - */ - public Builder firstName(String firstName) { - this.firstName = firstName; - return this; - } - - /** - * Sets the value for {@code landline}. - * - * @param landline Landline number - * @return This builder instance. - */ - public Builder landline(String landline) { - this.landline = landline; - return this; - } - - /** - * Sets the value for {@code lastName}. - * - * @param lastName Last name - * @return This builder instance. - */ - public Builder lastName(String lastName) { - this.lastName = lastName; - return this; - } - - /** - * Sets the value for {@code postCode}. - * - * @param postCode Postal code - * @return This builder instance. - */ - public Builder postCode(String postCode) { - this.postCode = postCode; - return this; - } - - /** - * Sets the value for {@code regionName}. - * - * @param regionName Country region name - * @return This builder instance. - */ - public Builder regionName(String regionName) { - this.regionName = regionName; - return this; - } - - /** - * Builds an immutable AddressPayloadLegacy instance. - * - * @return Immutable AddressPayloadLegacy. - */ - public AddressPayloadLegacy build() { - return new AddressPayloadLegacy( - Objects.requireNonNull(addressLine1, "addressLine1"), - addressLine2, - Objects.requireNonNull(city, "city"), - company, - Objects.requireNonNull(country, "country"), - firstName, - landline, - lastName, - Objects.requireNonNull(postCode, "postCode"), - regionName); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/AddressWithDetails.java b/src/main/java/com/sumup/sdk/models/AddressWithDetails.java deleted file mode 100644 index b43fdcc..0000000 --- a/src/main/java/com/sumup/sdk/models/AddressWithDetails.java +++ /dev/null @@ -1,252 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -/** Details of the registered address. */ -public record AddressWithDetails( - /** Address line 1 */ - String addressLine1, - - /** Address line 2 */ - String addressLine2, - - /** City */ - String city, - - /** undefined */ - String company, - - /** Country ISO 3166-1 code */ - String country, - - /** Country Details */ - com.sumup.sdk.models.CountryDetails countryDetails, - - /** undefined */ - String firstName, - - /** Landline number */ - String landline, - - /** undefined */ - String lastName, - - /** Postal code */ - String postCode, - - /** Region code */ - String regionCode, - - /** Region name */ - String regionName, - - /** undefined */ - String stateId, - - /** TimeOffset Details */ - com.sumup.sdk.models.TimeoffsetDetails timeoffsetDetails) { - /** - * Creates a builder for AddressWithDetails. - * - * @return Builder that constructs immutable AddressWithDetails instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for AddressWithDetails instances. */ - public static final class Builder { - private String addressLine1; - private String addressLine2; - private String city; - private String company; - private String country; - private com.sumup.sdk.models.CountryDetails countryDetails; - private String firstName; - private String landline; - private String lastName; - private String postCode; - private String regionCode; - private String regionName; - private String stateId; - private com.sumup.sdk.models.TimeoffsetDetails timeoffsetDetails; - - private Builder() {} - - /** - * Sets the value for {@code addressLine1}. - * - * @param addressLine1 Address line 1 - * @return This builder instance. - */ - public Builder addressLine1(String addressLine1) { - this.addressLine1 = addressLine1; - return this; - } - - /** - * Sets the value for {@code addressLine2}. - * - * @param addressLine2 Address line 2 - * @return This builder instance. - */ - public Builder addressLine2(String addressLine2) { - this.addressLine2 = addressLine2; - return this; - } - - /** - * Sets the value for {@code city}. - * - * @param city City - * @return This builder instance. - */ - public Builder city(String city) { - this.city = city; - return this; - } - - /** - * Sets the value for {@code company}. - * - * @param company undefined - * @return This builder instance. - */ - public Builder company(String company) { - this.company = company; - return this; - } - - /** - * Sets the value for {@code country}. - * - * @param country Country ISO 3166-1 code - * @return This builder instance. - */ - public Builder country(String country) { - this.country = country; - return this; - } - - /** - * Sets the value for {@code countryDetails}. - * - * @param countryDetails Country Details - * @return This builder instance. - */ - public Builder countryDetails(com.sumup.sdk.models.CountryDetails countryDetails) { - this.countryDetails = countryDetails; - return this; - } - - /** - * Sets the value for {@code firstName}. - * - * @param firstName undefined - * @return This builder instance. - */ - public Builder firstName(String firstName) { - this.firstName = firstName; - return this; - } - - /** - * Sets the value for {@code landline}. - * - * @param landline Landline number - * @return This builder instance. - */ - public Builder landline(String landline) { - this.landline = landline; - return this; - } - - /** - * Sets the value for {@code lastName}. - * - * @param lastName undefined - * @return This builder instance. - */ - public Builder lastName(String lastName) { - this.lastName = lastName; - return this; - } - - /** - * Sets the value for {@code postCode}. - * - * @param postCode Postal code - * @return This builder instance. - */ - public Builder postCode(String postCode) { - this.postCode = postCode; - return this; - } - - /** - * Sets the value for {@code regionCode}. - * - * @param regionCode Region code - * @return This builder instance. - */ - public Builder regionCode(String regionCode) { - this.regionCode = regionCode; - return this; - } - - /** - * Sets the value for {@code regionName}. - * - * @param regionName Region name - * @return This builder instance. - */ - public Builder regionName(String regionName) { - this.regionName = regionName; - return this; - } - - /** - * Sets the value for {@code stateId}. - * - * @param stateId undefined - * @return This builder instance. - */ - public Builder stateId(String stateId) { - this.stateId = stateId; - return this; - } - - /** - * Sets the value for {@code timeoffsetDetails}. - * - * @param timeoffsetDetails TimeOffset Details - * @return This builder instance. - */ - public Builder timeoffsetDetails(com.sumup.sdk.models.TimeoffsetDetails timeoffsetDetails) { - this.timeoffsetDetails = timeoffsetDetails; - return this; - } - - /** - * Builds an immutable AddressWithDetails instance. - * - * @return Immutable AddressWithDetails. - */ - public AddressWithDetails build() { - return new AddressWithDetails( - addressLine1, - addressLine2, - city, - company, - country, - countryDetails, - firstName, - landline, - lastName, - postCode, - regionCode, - regionName, - stateId, - timeoffsetDetails); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/BankAccount.java b/src/main/java/com/sumup/sdk/models/BankAccount.java deleted file mode 100644 index 4b13683..0000000 --- a/src/main/java/com/sumup/sdk/models/BankAccount.java +++ /dev/null @@ -1,220 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -/** Bank account details used for merchant payouts. */ -public record BankAccount( - /** Account category - business or personal */ - String accountCategory, - - /** Name of the bank account holder. */ - String accountHolderName, - - /** Account number */ - String accountNumber, - - /** Type of the account */ - String accountType, - - /** Bank code */ - String bankCode, - - /** Bank name */ - String bankName, - - /** Branch code */ - String branchCode, - - /** Creation date of the bank account */ - String createdAt, - - /** IBAN */ - String iban, - - /** The primary bank account is the one used for payouts */ - Boolean primary, - - /** Status in the verification process */ - String status, - - /** SWIFT code */ - String swift) { - /** - * Creates a builder for BankAccount. - * - * @return Builder that constructs immutable BankAccount instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for BankAccount instances. */ - public static final class Builder { - private String accountCategory; - private String accountHolderName; - private String accountNumber; - private String accountType; - private String bankCode; - private String bankName; - private String branchCode; - private String createdAt; - private String iban; - private Boolean primary; - private String status; - private String swift; - - private Builder() {} - - /** - * Sets the value for {@code accountCategory}. - * - * @param accountCategory Account category - business or personal - * @return This builder instance. - */ - public Builder accountCategory(String accountCategory) { - this.accountCategory = accountCategory; - return this; - } - - /** - * Sets the value for {@code accountHolderName}. - * - * @param accountHolderName Name of the bank account holder. - * @return This builder instance. - */ - public Builder accountHolderName(String accountHolderName) { - this.accountHolderName = accountHolderName; - return this; - } - - /** - * Sets the value for {@code accountNumber}. - * - * @param accountNumber Account number - * @return This builder instance. - */ - public Builder accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Sets the value for {@code accountType}. - * - * @param accountType Type of the account - * @return This builder instance. - */ - public Builder accountType(String accountType) { - this.accountType = accountType; - return this; - } - - /** - * Sets the value for {@code bankCode}. - * - * @param bankCode Bank code - * @return This builder instance. - */ - public Builder bankCode(String bankCode) { - this.bankCode = bankCode; - return this; - } - - /** - * Sets the value for {@code bankName}. - * - * @param bankName Bank name - * @return This builder instance. - */ - public Builder bankName(String bankName) { - this.bankName = bankName; - return this; - } - - /** - * Sets the value for {@code branchCode}. - * - * @param branchCode Branch code - * @return This builder instance. - */ - public Builder branchCode(String branchCode) { - this.branchCode = branchCode; - return this; - } - - /** - * Sets the value for {@code createdAt}. - * - * @param createdAt Creation date of the bank account - * @return This builder instance. - */ - public Builder createdAt(String createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * Sets the value for {@code iban}. - * - * @param iban IBAN - * @return This builder instance. - */ - public Builder iban(String iban) { - this.iban = iban; - return this; - } - - /** - * Sets the value for {@code primary}. - * - * @param primary The primary bank account is the one used for payouts - * @return This builder instance. - */ - public Builder primary(Boolean primary) { - this.primary = primary; - return this; - } - - /** - * Sets the value for {@code status}. - * - * @param status Status in the verification process - * @return This builder instance. - */ - public Builder status(String status) { - this.status = status; - return this; - } - - /** - * Sets the value for {@code swift}. - * - * @param swift SWIFT code - * @return This builder instance. - */ - public Builder swift(String swift) { - this.swift = swift; - return this; - } - - /** - * Builds an immutable BankAccount instance. - * - * @return Immutable BankAccount. - */ - public BankAccount build() { - return new BankAccount( - accountCategory, - accountHolderName, - accountNumber, - accountType, - bankCode, - bankName, - branchCode, - createdAt, - iban, - primary, - status, - swift); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/BankAccountPayload.java b/src/main/java/com/sumup/sdk/models/BankAccountPayload.java deleted file mode 100644 index e4e649a..0000000 --- a/src/main/java/com/sumup/sdk/models/BankAccountPayload.java +++ /dev/null @@ -1,207 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -import java.util.Objects; - -/** Bank account details used when creating or updating a payout account. */ -public record BankAccountPayload( - /** Determines if this bank account is business or personal. */ - com.sumup.sdk.models.BankAccountPayloadAccountCategory accountCategory, - - /** Account holder name */ - String accountHolderName, - - /** Account number */ - String accountNumber, - - /** Type of the account. */ - com.sumup.sdk.models.BankAccountPayloadAccountType accountType, - - /** Bank code */ - String bankCode, - - /** Branch code */ - String branchCode, - - /** Check digit */ - String checkDigit, - - /** IBAN */ - String iban, - - /** Determines if this bank account will be primary. Default is false */ - Boolean primary, - - /** Determines the bank account status. */ - com.sumup.sdk.models.BankAccountPayloadStatus status, - - /** SWIFT code */ - String swift) { - /** - * Creates a builder for BankAccountPayload. - * - * @return Builder that constructs immutable BankAccountPayload instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for BankAccountPayload instances. */ - public static final class Builder { - private com.sumup.sdk.models.BankAccountPayloadAccountCategory accountCategory; - private String accountHolderName; - private String accountNumber; - private com.sumup.sdk.models.BankAccountPayloadAccountType accountType; - private String bankCode; - private String branchCode; - private String checkDigit; - private String iban; - private Boolean primary; - private com.sumup.sdk.models.BankAccountPayloadStatus status; - private String swift; - - private Builder() {} - - /** - * Sets the value for {@code accountCategory}. - * - * @param accountCategory Determines if this bank account is business or personal. - * @return This builder instance. - */ - public Builder accountCategory( - com.sumup.sdk.models.BankAccountPayloadAccountCategory accountCategory) { - this.accountCategory = accountCategory; - return this; - } - - /** - * Sets the value for {@code accountHolderName}. - * - * @param accountHolderName Account holder name - * @return This builder instance. - */ - public Builder accountHolderName(String accountHolderName) { - this.accountHolderName = accountHolderName; - return this; - } - - /** - * Sets the value for {@code accountNumber}. - * - * @param accountNumber Account number - * @return This builder instance. - */ - public Builder accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Sets the value for {@code accountType}. - * - * @param accountType Type of the account. - * @return This builder instance. - */ - public Builder accountType(com.sumup.sdk.models.BankAccountPayloadAccountType accountType) { - this.accountType = accountType; - return this; - } - - /** - * Sets the value for {@code bankCode}. - * - * @param bankCode Bank code - * @return This builder instance. - */ - public Builder bankCode(String bankCode) { - this.bankCode = bankCode; - return this; - } - - /** - * Sets the value for {@code branchCode}. - * - * @param branchCode Branch code - * @return This builder instance. - */ - public Builder branchCode(String branchCode) { - this.branchCode = branchCode; - return this; - } - - /** - * Sets the value for {@code checkDigit}. - * - * @param checkDigit Check digit - * @return This builder instance. - */ - public Builder checkDigit(String checkDigit) { - this.checkDigit = checkDigit; - return this; - } - - /** - * Sets the value for {@code iban}. - * - * @param iban IBAN - * @return This builder instance. - */ - public Builder iban(String iban) { - this.iban = iban; - return this; - } - - /** - * Sets the value for {@code primary}. - * - * @param primary Determines if this bank account will be primary. Default is false - * @return This builder instance. - */ - public Builder primary(Boolean primary) { - this.primary = primary; - return this; - } - - /** - * Sets the value for {@code status}. - * - * @param status Determines the bank account status. - * @return This builder instance. - */ - public Builder status(com.sumup.sdk.models.BankAccountPayloadStatus status) { - this.status = status; - return this; - } - - /** - * Sets the value for {@code swift}. - * - * @param swift SWIFT code - * @return This builder instance. - */ - public Builder swift(String swift) { - this.swift = swift; - return this; - } - - /** - * Builds an immutable BankAccountPayload instance. - * - * @return Immutable BankAccountPayload. - */ - public BankAccountPayload build() { - return new BankAccountPayload( - accountCategory, - Objects.requireNonNull(accountHolderName, "accountHolderName"), - accountNumber, - accountType, - bankCode, - branchCode, - checkDigit, - Objects.requireNonNull(iban, "iban"), - primary, - status, - Objects.requireNonNull(swift, "swift")); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/BankAccountPayloadAccountCategory.java b/src/main/java/com/sumup/sdk/models/BankAccountPayloadAccountCategory.java deleted file mode 100644 index f582d5f..0000000 --- a/src/main/java/com/sumup/sdk/models/BankAccountPayloadAccountCategory.java +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Determines if this bank account is business or personal. */ -public enum BankAccountPayloadAccountCategory { - PERSONAL("PERSONAL"), - BUSINESS("BUSINESS"); - - private final String value; - - BankAccountPayloadAccountCategory(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return value; - } - - @JsonCreator - public static BankAccountPayloadAccountCategory fromValue(String value) { - if (value == null) { - return null; - } - for (BankAccountPayloadAccountCategory entry : values()) { - if (entry.value.equals(value)) { - return entry; - } - } - throw new IllegalArgumentException("Unknown BankAccountPayloadAccountCategory value: " + value); - } -} diff --git a/src/main/java/com/sumup/sdk/models/BankAccountPayloadAccountType.java b/src/main/java/com/sumup/sdk/models/BankAccountPayloadAccountType.java deleted file mode 100644 index 0689d23..0000000 --- a/src/main/java/com/sumup/sdk/models/BankAccountPayloadAccountType.java +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Type of the account. */ -public enum BankAccountPayloadAccountType { - CURRENT("CURRENT"), - SAVINGS("SAVINGS"); - - private final String value; - - BankAccountPayloadAccountType(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return value; - } - - @JsonCreator - public static BankAccountPayloadAccountType fromValue(String value) { - if (value == null) { - return null; - } - for (BankAccountPayloadAccountType entry : values()) { - if (entry.value.equals(value)) { - return entry; - } - } - throw new IllegalArgumentException("Unknown BankAccountPayloadAccountType value: " + value); - } -} diff --git a/src/main/java/com/sumup/sdk/models/BusinessOwners.java b/src/main/java/com/sumup/sdk/models/BusinessOwners.java deleted file mode 100644 index a6cd15b..0000000 --- a/src/main/java/com/sumup/sdk/models/BusinessOwners.java +++ /dev/null @@ -1,5 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -/** Business owners information. */ -public record BusinessOwners(java.util.List value) {} diff --git a/src/main/java/com/sumup/sdk/models/BusinessOwnersItem.java b/src/main/java/com/sumup/sdk/models/BusinessOwnersItem.java deleted file mode 100644 index 0a6c9b2..0000000 --- a/src/main/java/com/sumup/sdk/models/BusinessOwnersItem.java +++ /dev/null @@ -1,118 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -public record BusinessOwnersItem( - /** Date of birth */ - String dateOfBirth, - - /** BO's first name */ - String firstName, - - /** BO's Landline */ - String landline, - - /** BO's last name of the user */ - String lastName, - - /** Mobile phone number */ - String mobilePhone, - - /** Ownership percentage */ - Double ownership) { - /** - * Creates a builder for BusinessOwnersItem. - * - * @return Builder that constructs immutable BusinessOwnersItem instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for BusinessOwnersItem instances. */ - public static final class Builder { - private String dateOfBirth; - private String firstName; - private String landline; - private String lastName; - private String mobilePhone; - private Double ownership; - - private Builder() {} - - /** - * Sets the value for {@code dateOfBirth}. - * - * @param dateOfBirth Date of birth - * @return This builder instance. - */ - public Builder dateOfBirth(String dateOfBirth) { - this.dateOfBirth = dateOfBirth; - return this; - } - - /** - * Sets the value for {@code firstName}. - * - * @param firstName BO's first name - * @return This builder instance. - */ - public Builder firstName(String firstName) { - this.firstName = firstName; - return this; - } - - /** - * Sets the value for {@code landline}. - * - * @param landline BO's Landline - * @return This builder instance. - */ - public Builder landline(String landline) { - this.landline = landline; - return this; - } - - /** - * Sets the value for {@code lastName}. - * - * @param lastName BO's last name of the user - * @return This builder instance. - */ - public Builder lastName(String lastName) { - this.lastName = lastName; - return this; - } - - /** - * Sets the value for {@code mobilePhone}. - * - * @param mobilePhone Mobile phone number - * @return This builder instance. - */ - public Builder mobilePhone(String mobilePhone) { - this.mobilePhone = mobilePhone; - return this; - } - - /** - * Sets the value for {@code ownership}. - * - * @param ownership Ownership percentage - * @return This builder instance. - */ - public Builder ownership(Double ownership) { - this.ownership = ownership; - return this; - } - - /** - * Builds an immutable BusinessOwnersItem instance. - * - * @return Immutable BusinessOwnersItem. - */ - public BusinessOwnersItem build() { - return new BusinessOwnersItem( - dateOfBirth, firstName, landline, lastName, mobilePhone, ownership); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/Checkout.java b/src/main/java/com/sumup/sdk/models/Checkout.java index 9d39c66..38807b5 100644 --- a/src/main/java/com/sumup/sdk/models/Checkout.java +++ b/src/main/java/com/sumup/sdk/models/Checkout.java @@ -1,14 +1,18 @@ // Code generated by sumup-java/codegen. DO NOT EDIT. package com.sumup.sdk.models; -/** Details of the payment checkout. */ +/** + * 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. + */ public record Checkout( - /** Amount of the payment. */ + /** Amount to be charged to the payer, expressed in major units. */ Float amount, /** - * Unique ID of the payment checkout specified by the client application when creating the - * checkout resource. + * 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. */ String checkoutReference, @@ -19,8 +23,9 @@ public record Checkout( com.sumup.sdk.models.Currency currency, /** - * Unique identification of a customer. If specified, the checkout session and payment - * instrument are associated with the referenced customer. + * 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. */ String customerId, @@ -31,32 +36,42 @@ public record Checkout( java.time.OffsetDateTime date, /** - * Short description of the checkout visible in the SumUp dashboard. The description can - * contribute to reporting, allowing easier identification of a checkout. + * 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. */ String description, - /** Unique ID of the checkout resource. */ + /** Unique SumUp identifier of the checkout resource. */ String id, - /** Created mandate */ + /** Details of the mandate linked to the saved payment instrument. */ com.sumup.sdk.models.MandateResponse mandate, - /** Unique identifying code of the merchant profile. */ + /** Merchant account that receives the payment. */ String merchantCode, - /** URL to which the SumUp platform sends the processing status of the payment checkout. */ + /** + * Optional backend callback URL used by SumUp to notify your platform about processing updates + * for the checkout. + */ String returnUrl, - /** Current status of the checkout. */ + /** + * 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. + */ com.sumup.sdk.models.CheckoutStatus status, - /** List of transactions related to the payment. */ + /** + * Payment attempts and resulting transaction records linked to this checkout. Use the + * Transactions endpoints when you need the authoritative payment result and event history. + */ java.util.List transactions, /** - * Date and time of the checkout expiration before which the client application needs to send a - * processing request. If no value is present, the checkout does not have an expiration time. + * 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. */ java.time.OffsetDateTime validUntil) { /** @@ -88,7 +103,7 @@ private Builder() {} /** * Sets the value for {@code amount}. * - * @param amount Amount of the payment. + * @param amount Amount to be charged to the payer, expressed in major units. * @return This builder instance. */ public Builder amount(Float amount) { @@ -99,8 +114,9 @@ public Builder amount(Float amount) { /** * Sets the value for {@code checkoutReference}. * - * @param checkoutReference Unique ID of the payment checkout specified by the client - * application when creating the checkout resource. + * @param checkoutReference 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. * @return This builder instance. */ public Builder checkoutReference(String checkoutReference) { @@ -123,8 +139,9 @@ public Builder currency(com.sumup.sdk.models.Currency currency) { /** * Sets the value for {@code customerId}. * - * @param customerId Unique identification of a customer. If specified, the checkout session and - * payment instrument are associated with the referenced customer. + * @param customerId 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. * @return This builder instance. */ public Builder customerId(String customerId) { @@ -147,8 +164,9 @@ public Builder date(java.time.OffsetDateTime date) { /** * Sets the value for {@code description}. * - * @param description Short description of the checkout visible in the SumUp dashboard. The - * description can contribute to reporting, allowing easier identification of a checkout. + * @param 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. * @return This builder instance. */ public Builder description(String description) { @@ -159,7 +177,7 @@ public Builder description(String description) { /** * Sets the value for {@code mandate}. * - * @param mandate Created mandate + * @param mandate Details of the mandate linked to the saved payment instrument. * @return This builder instance. */ public Builder mandate(com.sumup.sdk.models.MandateResponse mandate) { @@ -170,7 +188,7 @@ public Builder mandate(com.sumup.sdk.models.MandateResponse mandate) { /** * Sets the value for {@code merchantCode}. * - * @param merchantCode Unique identifying code of the merchant profile. + * @param merchantCode Merchant account that receives the payment. * @return This builder instance. */ public Builder merchantCode(String merchantCode) { @@ -181,8 +199,8 @@ public Builder merchantCode(String merchantCode) { /** * Sets the value for {@code returnUrl}. * - * @param returnUrl URL to which the SumUp platform sends the processing status of the payment - * checkout. + * @param returnUrl Optional backend callback URL used by SumUp to notify your platform about + * processing updates for the checkout. * @return This builder instance. */ public Builder returnUrl(String returnUrl) { @@ -193,7 +211,9 @@ public Builder returnUrl(String returnUrl) { /** * Sets the value for {@code status}. * - * @param status Current status of the checkout. + * @param status 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. * @return This builder instance. */ public Builder status(com.sumup.sdk.models.CheckoutStatus status) { @@ -204,7 +224,9 @@ public Builder status(com.sumup.sdk.models.CheckoutStatus status) { /** * Sets the value for {@code transactions}. * - * @param transactions List of transactions related to the payment. + * @param transactions Payment attempts and resulting transaction records linked to this + * checkout. Use the Transactions endpoints when you need the authoritative payment result + * and event history. * @return This builder instance. */ public Builder transactions(java.util.List transactions) { @@ -215,9 +237,9 @@ public Builder transactions(java.util.List /** * Sets the value for {@code validUntil}. * - * @param validUntil Date and time of the checkout expiration before which the client - * application needs to send a processing request. If no value is present, the checkout does - * not have an expiration time. + * @param validUntil 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. * @return This builder instance. */ public Builder validUntil(java.time.OffsetDateTime validUntil) { diff --git a/src/main/java/com/sumup/sdk/models/CheckoutAccepted.java b/src/main/java/com/sumup/sdk/models/CheckoutAccepted.java index 29880f1..8e639f6 100644 --- a/src/main/java/com/sumup/sdk/models/CheckoutAccepted.java +++ b/src/main/java/com/sumup/sdk/models/CheckoutAccepted.java @@ -1,9 +1,12 @@ // Code generated by sumup-java/codegen. DO NOT EDIT. package com.sumup.sdk.models; -/** 3DS Response */ +/** + * Response returned when checkout processing requires an additional payer action, such as a 3DS + * challenge or a redirect to an external payment method page. + */ public record CheckoutAccepted( - /** Required action processing 3D Secure payments. */ + /** Instructions for the next action the payer or client must take. */ com.sumup.sdk.models.CheckoutAcceptedNextStep nextStep) { /** * Creates a builder for CheckoutAccepted. @@ -23,7 +26,7 @@ private Builder() {} /** * Sets the value for {@code nextStep}. * - * @param nextStep Required action processing 3D Secure payments. + * @param nextStep Instructions for the next action the payer or client must take. * @return This builder instance. */ public Builder nextStep(com.sumup.sdk.models.CheckoutAcceptedNextStep nextStep) { diff --git a/src/main/java/com/sumup/sdk/models/CheckoutAcceptedNextStep.java b/src/main/java/com/sumup/sdk/models/CheckoutAcceptedNextStep.java index 824e616..433c362 100644 --- a/src/main/java/com/sumup/sdk/models/CheckoutAcceptedNextStep.java +++ b/src/main/java/com/sumup/sdk/models/CheckoutAcceptedNextStep.java @@ -1,27 +1,27 @@ // Code generated by sumup-java/codegen. DO NOT EDIT. package com.sumup.sdk.models; -/** Required action processing 3D Secure payments. */ +/** Instructions for the next action the payer or client must take. */ public record CheckoutAcceptedNextStep( /** - * Indicates allowed mechanisms for redirecting an end user. If both values are provided to - * ensure a redirect takes place in either. + * 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. */ java.util.List mechanism, - /** Method used to complete the redirect. */ + /** HTTP method to use when following the next step. */ String method, /** - * Contains parameters essential for form redirection. Number of object keys and their content - * can vary. + * Parameters required to complete the next step. The exact keys depend on the payment provider + * and flow type. */ - com.sumup.sdk.models.CheckoutAcceptedNextStepPayload payload, + java.util.Map payload, - /** Refers to a url where the end user is redirected once the payment processing completes. */ + /** Merchant URL where the payer returns after the external flow finishes. */ String redirectUrl, - /** Where the end user is redirected. */ + /** URL to open or submit in order to continue processing. */ String url) { /** * Creates a builder for CheckoutAcceptedNextStep. @@ -36,7 +36,7 @@ public static Builder builder() { public static final class Builder { private java.util.List mechanism; private String method; - private com.sumup.sdk.models.CheckoutAcceptedNextStepPayload payload; + private java.util.Map payload; private String redirectUrl; private String url; @@ -45,8 +45,8 @@ private Builder() {} /** * Sets the value for {@code mechanism}. * - * @param mechanism Indicates allowed mechanisms for redirecting an end user. If both values are - * provided to ensure a redirect takes place in either. + * @param mechanism 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. * @return This builder instance. */ public Builder mechanism( @@ -58,7 +58,7 @@ public Builder mechanism( /** * Sets the value for {@code method}. * - * @param method Method used to complete the redirect. + * @param method HTTP method to use when following the next step. * @return This builder instance. */ public Builder method(String method) { @@ -69,11 +69,11 @@ public Builder method(String method) { /** * Sets the value for {@code payload}. * - * @param payload Contains parameters essential for form redirection. Number of object keys and - * their content can vary. + * @param payload Parameters required to complete the next step. The exact keys depend on the + * payment provider and flow type. * @return This builder instance. */ - public Builder payload(com.sumup.sdk.models.CheckoutAcceptedNextStepPayload payload) { + public Builder payload(java.util.Map payload) { this.payload = payload; return this; } @@ -81,8 +81,7 @@ public Builder payload(com.sumup.sdk.models.CheckoutAcceptedNextStepPayload payl /** * Sets the value for {@code redirectUrl}. * - * @param redirectUrl Refers to a url where the end user is redirected once the payment - * processing completes. + * @param redirectUrl Merchant URL where the payer returns after the external flow finishes. * @return This builder instance. */ public Builder redirectUrl(String redirectUrl) { @@ -93,7 +92,7 @@ public Builder redirectUrl(String redirectUrl) { /** * Sets the value for {@code url}. * - * @param url Where the end user is redirected. + * @param url URL to open or submit in order to continue processing. * @return This builder instance. */ public Builder url(String url) { diff --git a/src/main/java/com/sumup/sdk/models/CheckoutAcceptedNextStepPayload.java b/src/main/java/com/sumup/sdk/models/CheckoutAcceptedNextStepPayload.java deleted file mode 100644 index 88e36e5..0000000 --- a/src/main/java/com/sumup/sdk/models/CheckoutAcceptedNextStepPayload.java +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -/** - * Contains parameters essential for form redirection. Number of object keys and their content can - * vary. - */ -public record CheckoutAcceptedNextStepPayload( - java.util.Map md, - java.util.Map paReq, - java.util.Map termUrl) { - /** - * Creates a builder for CheckoutAcceptedNextStepPayload. - * - * @return Builder that constructs immutable CheckoutAcceptedNextStepPayload instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for CheckoutAcceptedNextStepPayload instances. */ - public static final class Builder { - private java.util.Map md; - private java.util.Map paReq; - private java.util.Map termUrl; - - private Builder() {} - - /** - * Sets the value for {@code md}. - * - * @param md Value for the md field. - * @return This builder instance. - */ - public Builder md(java.util.Map md) { - this.md = md; - return this; - } - - /** - * Sets the value for {@code paReq}. - * - * @param paReq Value for the paReq field. - * @return This builder instance. - */ - public Builder paReq(java.util.Map paReq) { - this.paReq = paReq; - return this; - } - - /** - * Sets the value for {@code termUrl}. - * - * @param termUrl Value for the termUrl field. - * @return This builder instance. - */ - public Builder termUrl(java.util.Map termUrl) { - this.termUrl = termUrl; - return this; - } - - /** - * Builds an immutable CheckoutAcceptedNextStepPayload instance. - * - * @return Immutable CheckoutAcceptedNextStepPayload. - */ - public CheckoutAcceptedNextStepPayload build() { - return new CheckoutAcceptedNextStepPayload(md, paReq, termUrl); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/CheckoutCreateRequest.java b/src/main/java/com/sumup/sdk/models/CheckoutCreateRequest.java index 9d5fbc3..bb2b269 100644 --- a/src/main/java/com/sumup/sdk/models/CheckoutCreateRequest.java +++ b/src/main/java/com/sumup/sdk/models/CheckoutCreateRequest.java @@ -3,14 +3,17 @@ import java.util.Objects; -/** Details of the payment checkout. */ +/** + * Request body for creating a checkout before processing payment. Define the payment amount, + * currency, merchant, and optional customer or redirect behavior here. + */ public record CheckoutCreateRequest( - /** Amount of the payment. */ + /** Amount to be charged to the payer, expressed in major units. */ Float amount, /** - * Unique ID of the payment checkout specified by the client application when creating the - * checkout resource. + * Merchant-defined reference for the new checkout. It should be unique enough for you to + * identify the payment attempt in your own systems. */ String checkoutReference, @@ -21,39 +24,46 @@ public record CheckoutCreateRequest( com.sumup.sdk.models.Currency currency, /** - * Unique identification of a customer. If specified, the checkout session and payment - * instrument are associated with the referenced customer. + * Merchant-scoped customer identifier. Required when setting up recurring payments and useful + * when the checkout should be linked to a returning payer. */ String customerId, /** - * Short description of the checkout visible in the SumUp dashboard. The description can - * contribute to reporting, allowing easier identification of a checkout. + * Short merchant-defined description shown in SumUp tools and reporting for easier + * identification of the checkout. */ String description, - /** Unique identifying code of the merchant profile. */ + /** Merchant account that should receive the payment. */ String merchantCode, - /** Purpose of the checkout. */ + /** + * 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. + */ com.sumup.sdk.models.CheckoutCreateRequestPurpose purpose, /** - * __Required__ for [APMs](https://developer.sumup.com/online-payments/apm/introduction) and - * __recommended__ for card payments. Refers to a url where the end user is redirected once the - * payment processing completes. If not specified, the [Payment - * Widget](https://developer.sumup.com/online-payments/tools/card-widget) renders [3DS - * challenge](https://developer.sumup.com/online-payments/features/3ds) within an iframe instead - * of performing a full-page redirect. + * 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. */ String redirectUrl, - /** URL to which the SumUp platform sends the processing status of the payment checkout. */ + /** + * Optional backend callback URL used by SumUp to notify your platform about processing updates + * for the checkout. + */ String returnUrl, /** - * Date and time of the checkout expiration before which the client application needs to send a - * processing request. If no value is present, the checkout does not have an expiration time. + * 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. */ java.time.OffsetDateTime validUntil) { /** @@ -83,7 +93,7 @@ private Builder() {} /** * Sets the value for {@code amount}. * - * @param amount Amount of the payment. + * @param amount Amount to be charged to the payer, expressed in major units. * @return This builder instance. */ public Builder amount(Float amount) { @@ -94,8 +104,8 @@ public Builder amount(Float amount) { /** * Sets the value for {@code checkoutReference}. * - * @param checkoutReference Unique ID of the payment checkout specified by the client - * application when creating the checkout resource. + * @param checkoutReference Merchant-defined reference for the new checkout. It should be unique + * enough for you to identify the payment attempt in your own systems. * @return This builder instance. */ public Builder checkoutReference(String checkoutReference) { @@ -118,8 +128,8 @@ public Builder currency(com.sumup.sdk.models.Currency currency) { /** * Sets the value for {@code customerId}. * - * @param customerId Unique identification of a customer. If specified, the checkout session and - * payment instrument are associated with the referenced customer. + * @param customerId Merchant-scoped customer identifier. Required when setting up recurring + * payments and useful when the checkout should be linked to a returning payer. * @return This builder instance. */ public Builder customerId(String customerId) { @@ -130,8 +140,8 @@ public Builder customerId(String customerId) { /** * Sets the value for {@code description}. * - * @param description Short description of the checkout visible in the SumUp dashboard. The - * description can contribute to reporting, allowing easier identification of a checkout. + * @param description Short merchant-defined description shown in SumUp tools and reporting for + * easier identification of the checkout. * @return This builder instance. */ public Builder description(String description) { @@ -142,7 +152,7 @@ public Builder description(String description) { /** * Sets the value for {@code merchantCode}. * - * @param merchantCode Unique identifying code of the merchant profile. + * @param merchantCode Merchant account that should receive the payment. * @return This builder instance. */ public Builder merchantCode(String merchantCode) { @@ -153,7 +163,9 @@ public Builder merchantCode(String merchantCode) { /** * Sets the value for {@code purpose}. * - * @param purpose Purpose of the checkout. + * @param purpose 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. * @return This builder instance. */ public Builder purpose(com.sumup.sdk.models.CheckoutCreateRequestPurpose purpose) { @@ -164,13 +176,13 @@ public Builder purpose(com.sumup.sdk.models.CheckoutCreateRequestPurpose purpose /** * Sets the value for {@code redirectUrl}. * - * @param redirectUrl __Required__ for - * [APMs](https://developer.sumup.com/online-payments/apm/introduction) and __recommended__ - * for card payments. Refers to a url where the end user is redirected once the payment - * processing completes. If not specified, the [Payment - * Widget](https://developer.sumup.com/online-payments/tools/card-widget) renders [3DS - * challenge](https://developer.sumup.com/online-payments/features/3ds) within an iframe - * instead of performing a full-page redirect. + * @param redirectUrl 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. * @return This builder instance. */ public Builder redirectUrl(String redirectUrl) { @@ -181,8 +193,8 @@ public Builder redirectUrl(String redirectUrl) { /** * Sets the value for {@code returnUrl}. * - * @param returnUrl URL to which the SumUp platform sends the processing status of the payment - * checkout. + * @param returnUrl Optional backend callback URL used by SumUp to notify your platform about + * processing updates for the checkout. * @return This builder instance. */ public Builder returnUrl(String returnUrl) { @@ -193,9 +205,9 @@ public Builder returnUrl(String returnUrl) { /** * Sets the value for {@code validUntil}. * - * @param validUntil Date and time of the checkout expiration before which the client - * application needs to send a processing request. If no value is present, the checkout does - * not have an expiration time. + * @param validUntil 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. * @return This builder instance. */ public Builder validUntil(java.time.OffsetDateTime validUntil) { diff --git a/src/main/java/com/sumup/sdk/models/CheckoutCreateRequestPurpose.java b/src/main/java/com/sumup/sdk/models/CheckoutCreateRequestPurpose.java index 9a3d302..70848ee 100644 --- a/src/main/java/com/sumup/sdk/models/CheckoutCreateRequestPurpose.java +++ b/src/main/java/com/sumup/sdk/models/CheckoutCreateRequestPurpose.java @@ -4,7 +4,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Purpose of the checkout. */ +/** + * 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. + */ public enum CheckoutCreateRequestPurpose { CHECKOUT("CHECKOUT"), SETUP_RECURRING_PAYMENT("SETUP_RECURRING_PAYMENT"); diff --git a/src/main/java/com/sumup/sdk/models/CheckoutStatus.java b/src/main/java/com/sumup/sdk/models/CheckoutStatus.java index c8a1995..ebf000a 100644 --- a/src/main/java/com/sumup/sdk/models/CheckoutStatus.java +++ b/src/main/java/com/sumup/sdk/models/CheckoutStatus.java @@ -4,7 +4,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Current status of the checkout. */ +/** + * 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. + */ public enum CheckoutStatus { PENDING("PENDING"), FAILED("FAILED"), diff --git a/src/main/java/com/sumup/sdk/models/CheckoutSuccess.java b/src/main/java/com/sumup/sdk/models/CheckoutSuccess.java index 448f481..2003297 100644 --- a/src/main/java/com/sumup/sdk/models/CheckoutSuccess.java +++ b/src/main/java/com/sumup/sdk/models/CheckoutSuccess.java @@ -1,5 +1,9 @@ // Code generated by sumup-java/codegen. DO NOT EDIT. package com.sumup.sdk.models; -/** Checkout response returned after a successful processing attempt. */ +/** + * 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. + */ public record CheckoutSuccess(com.sumup.sdk.models.Checkout value) {} diff --git a/src/main/java/com/sumup/sdk/models/CountryDetails.java b/src/main/java/com/sumup/sdk/models/CountryDetails.java deleted file mode 100644 index c8e2b61..0000000 --- a/src/main/java/com/sumup/sdk/models/CountryDetails.java +++ /dev/null @@ -1,88 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -/** Country Details */ -public record CountryDetails( - /** Currency ISO 4217 code */ - String currency, - - /** Country EN name */ - String enName, - - /** Country ISO code */ - String isoCode, - - /** Country native name */ - String nativeName) { - /** - * Creates a builder for CountryDetails. - * - * @return Builder that constructs immutable CountryDetails instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for CountryDetails instances. */ - public static final class Builder { - private String currency; - private String enName; - private String isoCode; - private String nativeName; - - private Builder() {} - - /** - * Sets the value for {@code currency}. - * - * @param currency Currency ISO 4217 code - * @return This builder instance. - */ - public Builder currency(String currency) { - this.currency = currency; - return this; - } - - /** - * Sets the value for {@code enName}. - * - * @param enName Country EN name - * @return This builder instance. - */ - public Builder enName(String enName) { - this.enName = enName; - return this; - } - - /** - * Sets the value for {@code isoCode}. - * - * @param isoCode Country ISO code - * @return This builder instance. - */ - public Builder isoCode(String isoCode) { - this.isoCode = isoCode; - return this; - } - - /** - * Sets the value for {@code nativeName}. - * - * @param nativeName Country native name - * @return This builder instance. - */ - public Builder nativeName(String nativeName) { - this.nativeName = nativeName; - return this; - } - - /** - * Builds an immutable CountryDetails instance. - * - * @return Immutable CountryDetails. - */ - public CountryDetails build() { - return new CountryDetails(currency, enName, isoCode, nativeName); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/CreateApplePaySessionRequest.java b/src/main/java/com/sumup/sdk/models/CreateApplePaySessionRequest.java new file mode 100644 index 0000000..1814a39 --- /dev/null +++ b/src/main/java/com/sumup/sdk/models/CreateApplePaySessionRequest.java @@ -0,0 +1,60 @@ +// Code generated by sumup-java/codegen. DO NOT EDIT. +package com.sumup.sdk.models; + +import java.util.Objects; + +public record CreateApplePaySessionRequest( + /** the context to create this apple pay session. */ + String context, + + /** The target url to create this apple pay session. */ + String target) { + /** + * Creates a builder for CreateApplePaySessionRequest. + * + * @return Builder that constructs immutable CreateApplePaySessionRequest instances. + */ + public static Builder builder() { + return new Builder(); + } + + /** Builder for CreateApplePaySessionRequest instances. */ + public static final class Builder { + private String context; + private String target; + + private Builder() {} + + /** + * Sets the value for {@code context}. + * + * @param context the context to create this apple pay session. + * @return This builder instance. + */ + public Builder context(String context) { + this.context = context; + return this; + } + + /** + * Sets the value for {@code target}. + * + * @param target The target url to create this apple pay session. + * @return This builder instance. + */ + public Builder target(String target) { + this.target = target; + return this; + } + + /** + * Builds an immutable CreateApplePaySessionRequest instance. + * + * @return Immutable CreateApplePaySessionRequest. + */ + public CreateApplePaySessionRequest build() { + return new CreateApplePaySessionRequest( + Objects.requireNonNull(context, "context"), Objects.requireNonNull(target, "target")); + } + } +} diff --git a/src/main/java/com/sumup/sdk/models/CreateReaderCheckoutRequest.java b/src/main/java/com/sumup/sdk/models/CreateReaderCheckoutRequest.java index d16fa47..9d0885c 100644 --- a/src/main/java/com/sumup/sdk/models/CreateReaderCheckoutRequest.java +++ b/src/main/java/com/sumup/sdk/models/CreateReaderCheckoutRequest.java @@ -5,6 +5,14 @@ /** Reader Checkout */ public record CreateReaderCheckoutRequest( + /** + * Optional object containing data for transactions from ERP integrators in Greece that comply + * with the AADE 1155 protocol. When such regulatory/business requirements apply, this object + * must be provided and contains the data needed to validate the transaction with the AADE + * signature provider. + */ + com.sumup.sdk.models.CreateReaderCheckoutRequestAade aade, + /** * Affiliate metadata for the transaction. It is a field that allow for integrators to track the * source of the transaction. @@ -59,6 +67,7 @@ public static Builder builder() { /** Builder for CreateReaderCheckoutRequest instances. */ public static final class Builder { + private com.sumup.sdk.models.CreateReaderCheckoutRequestAade aade; private com.sumup.sdk.models.Affiliate affiliate; private com.sumup.sdk.models.CreateReaderCheckoutRequestCardType cardType; private String description; @@ -70,6 +79,20 @@ public static final class Builder { private Builder() {} + /** + * Sets the value for {@code aade}. + * + * @param aade Optional object containing data for transactions from ERP integrators in Greece + * that comply with the AADE 1155 protocol. When such regulatory/business requirements + * apply, this object must be provided and contains the data needed to validate the + * transaction with the AADE signature provider. + * @return This builder instance. + */ + public Builder aade(com.sumup.sdk.models.CreateReaderCheckoutRequestAade aade) { + this.aade = aade; + return this; + } + /** * Sets the value for {@code affiliate}. * @@ -177,6 +200,7 @@ public Builder totalAmount(com.sumup.sdk.models.Money totalAmount) { */ public CreateReaderCheckoutRequest build() { return new CreateReaderCheckoutRequest( + aade, affiliate, cardType, description, diff --git a/src/main/java/com/sumup/sdk/models/CreateReaderCheckoutRequestAade.java b/src/main/java/com/sumup/sdk/models/CreateReaderCheckoutRequestAade.java new file mode 100644 index 0000000..3b648db --- /dev/null +++ b/src/main/java/com/sumup/sdk/models/CreateReaderCheckoutRequestAade.java @@ -0,0 +1,83 @@ +// Code generated by sumup-java/codegen. DO NOT EDIT. +package com.sumup.sdk.models; + +import java.util.Objects; + +/** + * Optional object containing data for transactions from ERP integrators in Greece that comply with + * the AADE 1155 protocol. When such regulatory/business requirements apply, this object must be + * provided and contains the data needed to validate the transaction with the AADE signature + * provider. + */ +public record CreateReaderCheckoutRequestAade( + /** The identifier of the AADE signature provider. */ + String providerId, + + /** The base64 encoded signature of the transaction data. */ + String signature, + + /** The string containing the signed transaction data. */ + String signatureData) { + /** + * Creates a builder for CreateReaderCheckoutRequestAade. + * + * @return Builder that constructs immutable CreateReaderCheckoutRequestAade instances. + */ + public static Builder builder() { + return new Builder(); + } + + /** Builder for CreateReaderCheckoutRequestAade instances. */ + public static final class Builder { + private String providerId; + private String signature; + private String signatureData; + + private Builder() {} + + /** + * Sets the value for {@code providerId}. + * + * @param providerId The identifier of the AADE signature provider. + * @return This builder instance. + */ + public Builder providerId(String providerId) { + this.providerId = providerId; + return this; + } + + /** + * Sets the value for {@code signature}. + * + * @param signature The base64 encoded signature of the transaction data. + * @return This builder instance. + */ + public Builder signature(String signature) { + this.signature = signature; + return this; + } + + /** + * Sets the value for {@code signatureData}. + * + * @param signatureData The string containing the signed transaction data. + * @return This builder instance. + */ + public Builder signatureData(String signatureData) { + this.signatureData = signatureData; + return this; + } + + /** + * Builds an immutable CreateReaderCheckoutRequestAade instance. + * + * @return Immutable CreateReaderCheckoutRequestAade. + */ + public CreateReaderCheckoutRequestAade build() { + return new CreateReaderCheckoutRequestAade( + Objects.requireNonNull(providerId, "providerId"), + Objects.requireNonNull(signature, "signature"), + Objects.requireNonNull(signatureData, "signatureData")); + } + } +} diff --git a/src/main/java/com/sumup/sdk/models/DoingBusinessAsPayloadLegacy.java b/src/main/java/com/sumup/sdk/models/DoingBusinessAsPayloadLegacy.java deleted file mode 100644 index 200c1eb..0000000 --- a/src/main/java/com/sumup/sdk/models/DoingBusinessAsPayloadLegacy.java +++ /dev/null @@ -1,118 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -/** Doing Business As information */ -public record DoingBusinessAsPayloadLegacy( - /** Personal address */ - com.sumup.sdk.models.AddressPayloadLegacy address, - - /** Doing business as name */ - String businessName, - - /** Doing business as email */ - String email, - - /** Doing business as Tax ID */ - String taxId, - - /** Doing business as VAT ID */ - String vatId, - - /** Doing business as website */ - String website) { - /** - * Creates a builder for DoingBusinessAsPayloadLegacy. - * - * @return Builder that constructs immutable DoingBusinessAsPayloadLegacy instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for DoingBusinessAsPayloadLegacy instances. */ - public static final class Builder { - private com.sumup.sdk.models.AddressPayloadLegacy address; - private String businessName; - private String email; - private String taxId; - private String vatId; - private String website; - - private Builder() {} - - /** - * Sets the value for {@code address}. - * - * @param address Personal address - * @return This builder instance. - */ - public Builder address(com.sumup.sdk.models.AddressPayloadLegacy address) { - this.address = address; - return this; - } - - /** - * Sets the value for {@code businessName}. - * - * @param businessName Doing business as name - * @return This builder instance. - */ - public Builder businessName(String businessName) { - this.businessName = businessName; - return this; - } - - /** - * Sets the value for {@code email}. - * - * @param email Doing business as email - * @return This builder instance. - */ - public Builder email(String email) { - this.email = email; - return this; - } - - /** - * Sets the value for {@code taxId}. - * - * @param taxId Doing business as Tax ID - * @return This builder instance. - */ - public Builder taxId(String taxId) { - this.taxId = taxId; - return this; - } - - /** - * Sets the value for {@code vatId}. - * - * @param vatId Doing business as VAT ID - * @return This builder instance. - */ - public Builder vatId(String vatId) { - this.vatId = vatId; - return this; - } - - /** - * Sets the value for {@code website}. - * - * @param website Doing business as website - * @return This builder instance. - */ - public Builder website(String website) { - this.website = website; - return this; - } - - /** - * Builds an immutable DoingBusinessAsPayloadLegacy instance. - * - * @return Immutable DoingBusinessAsPayloadLegacy. - */ - public DoingBusinessAsPayloadLegacy build() { - return new DoingBusinessAsPayloadLegacy(address, businessName, email, taxId, vatId, website); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/Event.java b/src/main/java/com/sumup/sdk/models/Event.java index 930f49a..ca74a36 100644 --- a/src/main/java/com/sumup/sdk/models/Event.java +++ b/src/main/java/com/sumup/sdk/models/Event.java @@ -1,7 +1,7 @@ // Code generated by sumup-java/codegen. DO NOT EDIT. package com.sumup.sdk.models; -/** Transaction event details. */ +/** High-level transaction event details. */ public record Event( /** Amount of the event. */ Float amount, @@ -21,7 +21,22 @@ public record Event( /** Consecutive number of the installment. */ Long installmentNumber, - /** Status of the transaction event. */ + /** + * Status of the transaction event. Not every value is used for every event type. - `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. - `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. - `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. - `PAID_OUT`: The payout event has been completed and the + * funds were included in a merchant payout. - `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. - `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`. - `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. + */ com.sumup.sdk.models.EventStatus status, /** Date and time of the transaction event. */ @@ -125,7 +140,21 @@ public Builder installmentNumber(Long installmentNumber) { /** * Sets the value for {@code status}. * - * @param status Status of the transaction event. + * @param status Status of the transaction event. Not every value is used for every event type. + * - `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. - `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. - `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. - `PAID_OUT`: + * The payout event has been completed and the funds were included in a merchant payout. - + * `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. - `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`. - `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. * @return This builder instance. */ public Builder status(com.sumup.sdk.models.EventStatus status) { diff --git a/src/main/java/com/sumup/sdk/models/EventStatus.java b/src/main/java/com/sumup/sdk/models/EventStatus.java index 12084e0..c8f521b 100644 --- a/src/main/java/com/sumup/sdk/models/EventStatus.java +++ b/src/main/java/com/sumup/sdk/models/EventStatus.java @@ -4,14 +4,29 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Status of the transaction event. */ +/** + * Status of the transaction event. Not every value is used for every event type. - `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. - `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. - `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. - `PAID_OUT`: The payout event has been completed and the funds were included in a + * merchant payout. - `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. - `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`. - `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. + */ public enum EventStatus { - PENDING("PENDING"), - SCHEDULED("SCHEDULED"), FAILED("FAILED"), + PAID_OUT("PAID_OUT"), + PENDING("PENDING"), + RECONCILED("RECONCILED"), REFUNDED("REFUNDED"), - SUCCESSFUL("SUCCESSFUL"), - PAID_OUT("PAID_OUT"); + SCHEDULED("SCHEDULED"), + SUCCESSFUL("SUCCESSFUL"); private final String value; diff --git a/src/main/java/com/sumup/sdk/models/MandatePayload.java b/src/main/java/com/sumup/sdk/models/MandatePayload.java index 39cfc64..2c3af0e 100644 --- a/src/main/java/com/sumup/sdk/models/MandatePayload.java +++ b/src/main/java/com/sumup/sdk/models/MandatePayload.java @@ -3,15 +3,18 @@ import java.util.Objects; -/** Mandate is passed when a card is to be tokenized */ +/** + * Mandate details used when a checkout should create a reusable card token for future recurring or + * merchant-initiated payments. + */ public record MandatePayload( - /** Indicates the mandate type */ + /** Type of mandate to create for the saved payment instrument. */ com.sumup.sdk.models.MandatePayloadType type, - /** Operating system and web client used by the end-user */ + /** Browser or client user agent observed when consent was collected. */ String userAgent, - /** IP address of the end user. Supports IPv4 and IPv6 */ + /** IP address of the payer when the mandate was accepted. */ String userIp) { /** * Creates a builder for MandatePayload. @@ -33,7 +36,7 @@ private Builder() {} /** * Sets the value for {@code type}. * - * @param type Indicates the mandate type + * @param type Type of mandate to create for the saved payment instrument. * @return This builder instance. */ public Builder type(com.sumup.sdk.models.MandatePayloadType type) { @@ -44,7 +47,7 @@ public Builder type(com.sumup.sdk.models.MandatePayloadType type) { /** * Sets the value for {@code userAgent}. * - * @param userAgent Operating system and web client used by the end-user + * @param userAgent Browser or client user agent observed when consent was collected. * @return This builder instance. */ public Builder userAgent(String userAgent) { @@ -55,7 +58,7 @@ public Builder userAgent(String userAgent) { /** * Sets the value for {@code userIp}. * - * @param userIp IP address of the end user. Supports IPv4 and IPv6 + * @param userIp IP address of the payer when the mandate was accepted. * @return This builder instance. */ public Builder userIp(String userIp) { diff --git a/src/main/java/com/sumup/sdk/models/MandatePayloadType.java b/src/main/java/com/sumup/sdk/models/MandatePayloadType.java index d35ae6b..d546763 100644 --- a/src/main/java/com/sumup/sdk/models/MandatePayloadType.java +++ b/src/main/java/com/sumup/sdk/models/MandatePayloadType.java @@ -4,7 +4,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Indicates the mandate type */ +/** Type of mandate to create for the saved payment instrument. */ public enum MandatePayloadType { RECURRENT("recurrent"); diff --git a/src/main/java/com/sumup/sdk/models/MandateResponse.java b/src/main/java/com/sumup/sdk/models/MandateResponse.java index df04ec6..ee1f96c 100644 --- a/src/main/java/com/sumup/sdk/models/MandateResponse.java +++ b/src/main/java/com/sumup/sdk/models/MandateResponse.java @@ -1,15 +1,15 @@ // Code generated by sumup-java/codegen. DO NOT EDIT. package com.sumup.sdk.models; -/** Created mandate */ +/** Details of the mandate linked to the saved payment instrument. */ public record MandateResponse( - /** Merchant code which has the mandate */ + /** Merchant account for which the mandate is valid. */ String merchantCode, - /** Mandate status */ - String status, + /** Current lifecycle status of the mandate. */ + com.sumup.sdk.models.MandateResponseStatus status, - /** Indicates the mandate type */ + /** Type of mandate stored for the checkout or payment instrument. */ String type) { /** * Creates a builder for MandateResponse. @@ -23,7 +23,7 @@ public static Builder builder() { /** Builder for MandateResponse instances. */ public static final class Builder { private String merchantCode; - private String status; + private com.sumup.sdk.models.MandateResponseStatus status; private String type; private Builder() {} @@ -31,7 +31,7 @@ private Builder() {} /** * Sets the value for {@code merchantCode}. * - * @param merchantCode Merchant code which has the mandate + * @param merchantCode Merchant account for which the mandate is valid. * @return This builder instance. */ public Builder merchantCode(String merchantCode) { @@ -42,10 +42,10 @@ public Builder merchantCode(String merchantCode) { /** * Sets the value for {@code status}. * - * @param status Mandate status + * @param status Current lifecycle status of the mandate. * @return This builder instance. */ - public Builder status(String status) { + public Builder status(com.sumup.sdk.models.MandateResponseStatus status) { this.status = status; return this; } @@ -53,7 +53,7 @@ public Builder status(String status) { /** * Sets the value for {@code type}. * - * @param type Indicates the mandate type + * @param type Type of mandate stored for the checkout or payment instrument. * @return This builder instance. */ public Builder type(String type) { diff --git a/src/main/java/com/sumup/sdk/models/BankAccountPayloadStatus.java b/src/main/java/com/sumup/sdk/models/MandateResponseStatus.java similarity index 58% rename from src/main/java/com/sumup/sdk/models/BankAccountPayloadStatus.java rename to src/main/java/com/sumup/sdk/models/MandateResponseStatus.java index 2849acf..e43f38c 100644 --- a/src/main/java/com/sumup/sdk/models/BankAccountPayloadStatus.java +++ b/src/main/java/com/sumup/sdk/models/MandateResponseStatus.java @@ -4,13 +4,14 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Determines the bank account status. */ -public enum BankAccountPayloadStatus { - OPEN("OPEN"); +/** Current lifecycle status of the mandate. */ +public enum MandateResponseStatus { + ACTIVE("active"), + INACTIVE("inactive"); private final String value; - BankAccountPayloadStatus(String value) { + MandateResponseStatus(String value) { this.value = value; } @@ -25,15 +26,15 @@ public String toString() { } @JsonCreator - public static BankAccountPayloadStatus fromValue(String value) { + public static MandateResponseStatus fromValue(String value) { if (value == null) { return null; } - for (BankAccountPayloadStatus entry : values()) { + for (MandateResponseStatus entry : values()) { if (entry.value.equals(value)) { return entry; } } - throw new IllegalArgumentException("Unknown BankAccountPayloadStatus value: " + value); + throw new IllegalArgumentException("Unknown MandateResponseStatus value: " + value); } } diff --git a/src/main/java/com/sumup/sdk/models/MerchantProfilePayload.java b/src/main/java/com/sumup/sdk/models/MerchantProfilePayload.java deleted file mode 100644 index a79168e..0000000 --- a/src/main/java/com/sumup/sdk/models/MerchantProfilePayload.java +++ /dev/null @@ -1,243 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -import java.util.Objects; - -/** Account's merchant profile */ -public record MerchantProfilePayload( - /** Personal address */ - com.sumup.sdk.models.AddressPayloadLegacy address, - - /** Business owners information. */ - com.sumup.sdk.models.BusinessOwners businessOwners, - - /** Company name */ - String companyName, - - /** Company registration number */ - String companyRegistrationNumber, - - /** Doing-business-as details associated with the merchant profile. */ - com.sumup.sdk.models.MerchantProfilePayloadDoingBusinessAs doingBusinessAs, - - /** Defines if the profile nature is for testing */ - Boolean isTestAccount, - - /** Id of the legal type of the merchant */ - Double legalTypeId, - - /** Merchant category code */ - String merchantCategoryCode, - - /** Mobile number */ - String mobilePhone, - - /** - * Nature and purpose of the business. Required for the following merchant category codes: 5999, - * 7392, 8999, 5694, 5969, 7299, 7399 - */ - String natureAndPurpose, - - /** Payment certificate access code */ - String permanentCertificateAccessCode, - - /** Vat ID */ - String vatId, - - /** Company website */ - String website) { - /** - * Creates a builder for MerchantProfilePayload. - * - * @return Builder that constructs immutable MerchantProfilePayload instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for MerchantProfilePayload instances. */ - public static final class Builder { - private com.sumup.sdk.models.AddressPayloadLegacy address; - private com.sumup.sdk.models.BusinessOwners businessOwners; - private String companyName; - private String companyRegistrationNumber; - private com.sumup.sdk.models.MerchantProfilePayloadDoingBusinessAs doingBusinessAs; - private Boolean isTestAccount; - private Double legalTypeId; - private String merchantCategoryCode; - private String mobilePhone; - private String natureAndPurpose; - private String permanentCertificateAccessCode; - private String vatId; - private String website; - - private Builder() {} - - /** - * Sets the value for {@code address}. - * - * @param address Personal address - * @return This builder instance. - */ - public Builder address(com.sumup.sdk.models.AddressPayloadLegacy address) { - this.address = address; - return this; - } - - /** - * Sets the value for {@code businessOwners}. - * - * @param businessOwners Business owners information. - * @return This builder instance. - */ - public Builder businessOwners(com.sumup.sdk.models.BusinessOwners businessOwners) { - this.businessOwners = businessOwners; - return this; - } - - /** - * Sets the value for {@code companyName}. - * - * @param companyName Company name - * @return This builder instance. - */ - public Builder companyName(String companyName) { - this.companyName = companyName; - return this; - } - - /** - * Sets the value for {@code companyRegistrationNumber}. - * - * @param companyRegistrationNumber Company registration number - * @return This builder instance. - */ - public Builder companyRegistrationNumber(String companyRegistrationNumber) { - this.companyRegistrationNumber = companyRegistrationNumber; - return this; - } - - /** - * Sets the value for {@code doingBusinessAs}. - * - * @param doingBusinessAs Doing-business-as details associated with the merchant profile. - * @return This builder instance. - */ - public Builder doingBusinessAs( - com.sumup.sdk.models.MerchantProfilePayloadDoingBusinessAs doingBusinessAs) { - this.doingBusinessAs = doingBusinessAs; - return this; - } - - /** - * Sets the value for {@code isTestAccount}. - * - * @param isTestAccount Defines if the profile nature is for testing - * @return This builder instance. - */ - public Builder isTestAccount(Boolean isTestAccount) { - this.isTestAccount = isTestAccount; - return this; - } - - /** - * Sets the value for {@code legalTypeId}. - * - * @param legalTypeId Id of the legal type of the merchant - * @return This builder instance. - */ - public Builder legalTypeId(Double legalTypeId) { - this.legalTypeId = legalTypeId; - return this; - } - - /** - * Sets the value for {@code merchantCategoryCode}. - * - * @param merchantCategoryCode Merchant category code - * @return This builder instance. - */ - public Builder merchantCategoryCode(String merchantCategoryCode) { - this.merchantCategoryCode = merchantCategoryCode; - return this; - } - - /** - * Sets the value for {@code mobilePhone}. - * - * @param mobilePhone Mobile number - * @return This builder instance. - */ - public Builder mobilePhone(String mobilePhone) { - this.mobilePhone = mobilePhone; - return this; - } - - /** - * Sets the value for {@code natureAndPurpose}. - * - * @param natureAndPurpose Nature and purpose of the business. Required for the following - * merchant category codes: 5999, 7392, 8999, 5694, 5969, 7299, 7399 - * @return This builder instance. - */ - public Builder natureAndPurpose(String natureAndPurpose) { - this.natureAndPurpose = natureAndPurpose; - return this; - } - - /** - * Sets the value for {@code permanentCertificateAccessCode}. - * - * @param permanentCertificateAccessCode Payment certificate access code - * @return This builder instance. - */ - public Builder permanentCertificateAccessCode(String permanentCertificateAccessCode) { - this.permanentCertificateAccessCode = permanentCertificateAccessCode; - return this; - } - - /** - * Sets the value for {@code vatId}. - * - * @param vatId Vat ID - * @return This builder instance. - */ - public Builder vatId(String vatId) { - this.vatId = vatId; - return this; - } - - /** - * Sets the value for {@code website}. - * - * @param website Company website - * @return This builder instance. - */ - public Builder website(String website) { - this.website = website; - return this; - } - - /** - * Builds an immutable MerchantProfilePayload instance. - * - * @return Immutable MerchantProfilePayload. - */ - public MerchantProfilePayload build() { - return new MerchantProfilePayload( - Objects.requireNonNull(address, "address"), - businessOwners, - Objects.requireNonNull(companyName, "companyName"), - Objects.requireNonNull(companyRegistrationNumber, "companyRegistrationNumber"), - doingBusinessAs, - isTestAccount, - Objects.requireNonNull(legalTypeId, "legalTypeId"), - Objects.requireNonNull(merchantCategoryCode, "merchantCategoryCode"), - mobilePhone, - natureAndPurpose, - permanentCertificateAccessCode, - vatId, - website); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/MerchantProfilePayloadDoingBusinessAs.java b/src/main/java/com/sumup/sdk/models/MerchantProfilePayloadDoingBusinessAs.java deleted file mode 100644 index feb4099..0000000 --- a/src/main/java/com/sumup/sdk/models/MerchantProfilePayloadDoingBusinessAs.java +++ /dev/null @@ -1,119 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -/** Doing-business-as details associated with the merchant profile. */ -public record MerchantProfilePayloadDoingBusinessAs( - /** Personal address */ - com.sumup.sdk.models.AddressPayloadLegacy address, - - /** Doing business as name */ - String businessName, - - /** Doing business as email */ - String email, - - /** Doing business as Tax ID */ - String taxId, - - /** Doing business as Vat ID */ - String vatId, - - /** Doing business as website */ - String website) { - /** - * Creates a builder for MerchantProfilePayloadDoingBusinessAs. - * - * @return Builder that constructs immutable MerchantProfilePayloadDoingBusinessAs instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for MerchantProfilePayloadDoingBusinessAs instances. */ - public static final class Builder { - private com.sumup.sdk.models.AddressPayloadLegacy address; - private String businessName; - private String email; - private String taxId; - private String vatId; - private String website; - - private Builder() {} - - /** - * Sets the value for {@code address}. - * - * @param address Personal address - * @return This builder instance. - */ - public Builder address(com.sumup.sdk.models.AddressPayloadLegacy address) { - this.address = address; - return this; - } - - /** - * Sets the value for {@code businessName}. - * - * @param businessName Doing business as name - * @return This builder instance. - */ - public Builder businessName(String businessName) { - this.businessName = businessName; - return this; - } - - /** - * Sets the value for {@code email}. - * - * @param email Doing business as email - * @return This builder instance. - */ - public Builder email(String email) { - this.email = email; - return this; - } - - /** - * Sets the value for {@code taxId}. - * - * @param taxId Doing business as Tax ID - * @return This builder instance. - */ - public Builder taxId(String taxId) { - this.taxId = taxId; - return this; - } - - /** - * Sets the value for {@code vatId}. - * - * @param vatId Doing business as Vat ID - * @return This builder instance. - */ - public Builder vatId(String vatId) { - this.vatId = vatId; - return this; - } - - /** - * Sets the value for {@code website}. - * - * @param website Doing business as website - * @return This builder instance. - */ - public Builder website(String website) { - this.website = website; - return this; - } - - /** - * Builds an immutable MerchantProfilePayloadDoingBusinessAs instance. - * - * @return Immutable MerchantProfilePayloadDoingBusinessAs. - */ - public MerchantProfilePayloadDoingBusinessAs build() { - return new MerchantProfilePayloadDoingBusinessAs( - address, businessName, email, taxId, vatId, website); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/MerchantSettingsPayload.java b/src/main/java/com/sumup/sdk/models/MerchantSettingsPayload.java deleted file mode 100644 index a4fc3bf..0000000 --- a/src/main/java/com/sumup/sdk/models/MerchantSettingsPayload.java +++ /dev/null @@ -1,142 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -/** Merchant payout and settlement configuration. */ -public record MerchantSettingsPayload( - /** Expected maximum amount of a single purchase */ - Double expectedMaxTransactionAmount, - - /** Gross settlement */ - Boolean grossSettlement, - - /** If true, the merchant will not receive automatic payouts. */ - Boolean payoutOnDemand, - - /** If true, the merchant will be able to manage payout_on_demand settings */ - String payoutOnDemandAvailable, - - /** Payout period. */ - com.sumup.sdk.models.MerchantSettingsPayloadPayoutPeriod payoutPeriod, - - /** Payout type. */ - com.sumup.sdk.models.MerchantSettingsPayloadPayoutType payoutType, - - /** Printers enabled. */ - Boolean printersEnabled) { - /** - * Creates a builder for MerchantSettingsPayload. - * - * @return Builder that constructs immutable MerchantSettingsPayload instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for MerchantSettingsPayload instances. */ - public static final class Builder { - private Double expectedMaxTransactionAmount; - private Boolean grossSettlement; - private Boolean payoutOnDemand; - private String payoutOnDemandAvailable; - private com.sumup.sdk.models.MerchantSettingsPayloadPayoutPeriod payoutPeriod; - private com.sumup.sdk.models.MerchantSettingsPayloadPayoutType payoutType; - private Boolean printersEnabled; - - private Builder() {} - - /** - * Sets the value for {@code expectedMaxTransactionAmount}. - * - * @param expectedMaxTransactionAmount Expected maximum amount of a single purchase - * @return This builder instance. - */ - public Builder expectedMaxTransactionAmount(Double expectedMaxTransactionAmount) { - this.expectedMaxTransactionAmount = expectedMaxTransactionAmount; - return this; - } - - /** - * Sets the value for {@code grossSettlement}. - * - * @param grossSettlement Gross settlement - * @return This builder instance. - */ - public Builder grossSettlement(Boolean grossSettlement) { - this.grossSettlement = grossSettlement; - return this; - } - - /** - * Sets the value for {@code payoutOnDemand}. - * - * @param payoutOnDemand If true, the merchant will not receive automatic payouts. - * @return This builder instance. - */ - public Builder payoutOnDemand(Boolean payoutOnDemand) { - this.payoutOnDemand = payoutOnDemand; - return this; - } - - /** - * Sets the value for {@code payoutOnDemandAvailable}. - * - * @param payoutOnDemandAvailable If true, the merchant will be able to manage payout_on_demand - * settings - * @return This builder instance. - */ - public Builder payoutOnDemandAvailable(String payoutOnDemandAvailable) { - this.payoutOnDemandAvailable = payoutOnDemandAvailable; - return this; - } - - /** - * Sets the value for {@code payoutPeriod}. - * - * @param payoutPeriod Payout period. - * @return This builder instance. - */ - public Builder payoutPeriod( - com.sumup.sdk.models.MerchantSettingsPayloadPayoutPeriod payoutPeriod) { - this.payoutPeriod = payoutPeriod; - return this; - } - - /** - * Sets the value for {@code payoutType}. - * - * @param payoutType Payout type. - * @return This builder instance. - */ - public Builder payoutType(com.sumup.sdk.models.MerchantSettingsPayloadPayoutType payoutType) { - this.payoutType = payoutType; - return this; - } - - /** - * Sets the value for {@code printersEnabled}. - * - * @param printersEnabled Printers enabled. - * @return This builder instance. - */ - public Builder printersEnabled(Boolean printersEnabled) { - this.printersEnabled = printersEnabled; - return this; - } - - /** - * Builds an immutable MerchantSettingsPayload instance. - * - * @return Immutable MerchantSettingsPayload. - */ - public MerchantSettingsPayload build() { - return new MerchantSettingsPayload( - expectedMaxTransactionAmount, - grossSettlement, - payoutOnDemand, - payoutOnDemandAvailable, - payoutPeriod, - payoutType, - printersEnabled); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/MerchantSettingsPayloadPayoutPeriod.java b/src/main/java/com/sumup/sdk/models/MerchantSettingsPayloadPayoutPeriod.java deleted file mode 100644 index cb2ef2f..0000000 --- a/src/main/java/com/sumup/sdk/models/MerchantSettingsPayloadPayoutPeriod.java +++ /dev/null @@ -1,42 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Payout period. */ -public enum MerchantSettingsPayloadPayoutPeriod { - DAILY("daily"), - WEEKLY("weekly"), - MONTHLY("monthly"); - - private final String value; - - MerchantSettingsPayloadPayoutPeriod(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return value; - } - - @JsonCreator - public static MerchantSettingsPayloadPayoutPeriod fromValue(String value) { - if (value == null) { - return null; - } - for (MerchantSettingsPayloadPayoutPeriod entry : values()) { - if (entry.value.equals(value)) { - return entry; - } - } - throw new IllegalArgumentException( - "Unknown MerchantSettingsPayloadPayoutPeriod value: " + value); - } -} diff --git a/src/main/java/com/sumup/sdk/models/MerchantSettingsPayloadPayoutType.java b/src/main/java/com/sumup/sdk/models/MerchantSettingsPayloadPayoutType.java deleted file mode 100644 index 587aae8..0000000 --- a/src/main/java/com/sumup/sdk/models/MerchantSettingsPayloadPayoutType.java +++ /dev/null @@ -1,39 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Payout type. */ -public enum MerchantSettingsPayloadPayoutType { - SINGLE_PAYMENT("SINGLE_PAYMENT"); - - private final String value; - - MerchantSettingsPayloadPayoutType(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return value; - } - - @JsonCreator - public static MerchantSettingsPayloadPayoutType fromValue(String value) { - if (value == null) { - return null; - } - for (MerchantSettingsPayloadPayoutType entry : values()) { - if (entry.value.equals(value)) { - return entry; - } - } - throw new IllegalArgumentException("Unknown MerchantSettingsPayloadPayoutType value: " + value); - } -} diff --git a/src/main/java/com/sumup/sdk/models/PaymentInstrumentCard.java b/src/main/java/com/sumup/sdk/models/PaymentInstrumentCard.java deleted file mode 100644 index 31299da..0000000 --- a/src/main/java/com/sumup/sdk/models/PaymentInstrumentCard.java +++ /dev/null @@ -1,61 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -import java.util.Objects; - -/** Details of the payment card that is saved as a payment instrument. */ -public record PaymentInstrumentCard( - /** __Required when payment type is `card`.__ Details of the payment card. */ - com.sumup.sdk.models.Card card, - - /** Type of the payment instrument. */ - com.sumup.sdk.models.PaymentInstrumentCardType type) { - /** - * Creates a builder for PaymentInstrumentCard. - * - * @return Builder that constructs immutable PaymentInstrumentCard instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for PaymentInstrumentCard instances. */ - public static final class Builder { - private com.sumup.sdk.models.Card card; - private com.sumup.sdk.models.PaymentInstrumentCardType type; - - private Builder() {} - - /** - * Sets the value for {@code card}. - * - * @param card __Required when payment type is `card`.__ Details of the payment card. - * @return This builder instance. - */ - public Builder card(com.sumup.sdk.models.Card card) { - this.card = card; - return this; - } - - /** - * Sets the value for {@code type}. - * - * @param type Type of the payment instrument. - * @return This builder instance. - */ - public Builder type(com.sumup.sdk.models.PaymentInstrumentCardType type) { - this.type = type; - return this; - } - - /** - * Builds an immutable PaymentInstrumentCard instance. - * - * @return Immutable PaymentInstrumentCard. - */ - public PaymentInstrumentCard build() { - return new PaymentInstrumentCard( - Objects.requireNonNull(card, "card"), Objects.requireNonNull(type, "type")); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/PaymentInstrumentCardType.java b/src/main/java/com/sumup/sdk/models/PaymentInstrumentCardType.java deleted file mode 100644 index b22df9c..0000000 --- a/src/main/java/com/sumup/sdk/models/PaymentInstrumentCardType.java +++ /dev/null @@ -1,39 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Type of the payment instrument. */ -public enum PaymentInstrumentCardType { - CARD("card"); - - private final String value; - - PaymentInstrumentCardType(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return value; - } - - @JsonCreator - public static PaymentInstrumentCardType fromValue(String value) { - if (value == null) { - return null; - } - for (PaymentInstrumentCardType entry : values()) { - if (entry.value.equals(value)) { - return entry; - } - } - throw new IllegalArgumentException("Unknown PaymentInstrumentCardType value: " + value); - } -} diff --git a/src/main/java/com/sumup/sdk/models/PaymentInstrumentResponse.java b/src/main/java/com/sumup/sdk/models/PaymentInstrumentResponse.java index 8a42f0b..4fabd28 100644 --- a/src/main/java/com/sumup/sdk/models/PaymentInstrumentResponse.java +++ b/src/main/java/com/sumup/sdk/models/PaymentInstrumentResponse.java @@ -18,7 +18,7 @@ public record PaymentInstrumentResponse( */ java.time.OffsetDateTime createdAt, - /** Created mandate */ + /** Details of the mandate linked to the saved payment instrument. */ com.sumup.sdk.models.MandateResponse mandate, /** Unique token identifying the saved payment card for a customer. */ @@ -70,7 +70,7 @@ public Builder createdAt(java.time.OffsetDateTime createdAt) { /** * Sets the value for {@code mandate}. * - * @param mandate Created mandate + * @param mandate Details of the mandate linked to the saved payment instrument. * @return This builder instance. */ public Builder mandate(com.sumup.sdk.models.MandateResponse mandate) { diff --git a/src/main/java/com/sumup/sdk/models/PersonalProfileLegacy.java b/src/main/java/com/sumup/sdk/models/PersonalProfileLegacy.java deleted file mode 100644 index 3d97f50..0000000 --- a/src/main/java/com/sumup/sdk/models/PersonalProfileLegacy.java +++ /dev/null @@ -1,119 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -/** Account's personal profile. */ -public record PersonalProfileLegacy( - /** Details of the registered address. */ - com.sumup.sdk.models.AddressWithDetails address, - - /** Indicates whether the profile data is complete. */ - Boolean complete, - - /** Date of birth */ - String dateOfBirth, - - /** First name of the user */ - String firstName, - - /** Last name of the user */ - String lastName, - - /** Mobile phone number */ - String mobilePhone) { - /** - * Creates a builder for PersonalProfileLegacy. - * - * @return Builder that constructs immutable PersonalProfileLegacy instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for PersonalProfileLegacy instances. */ - public static final class Builder { - private com.sumup.sdk.models.AddressWithDetails address; - private Boolean complete; - private String dateOfBirth; - private String firstName; - private String lastName; - private String mobilePhone; - - private Builder() {} - - /** - * Sets the value for {@code address}. - * - * @param address Details of the registered address. - * @return This builder instance. - */ - public Builder address(com.sumup.sdk.models.AddressWithDetails address) { - this.address = address; - return this; - } - - /** - * Sets the value for {@code complete}. - * - * @param complete Indicates whether the profile data is complete. - * @return This builder instance. - */ - public Builder complete(Boolean complete) { - this.complete = complete; - return this; - } - - /** - * Sets the value for {@code dateOfBirth}. - * - * @param dateOfBirth Date of birth - * @return This builder instance. - */ - public Builder dateOfBirth(String dateOfBirth) { - this.dateOfBirth = dateOfBirth; - return this; - } - - /** - * Sets the value for {@code firstName}. - * - * @param firstName First name of the user - * @return This builder instance. - */ - public Builder firstName(String firstName) { - this.firstName = firstName; - return this; - } - - /** - * Sets the value for {@code lastName}. - * - * @param lastName Last name of the user - * @return This builder instance. - */ - public Builder lastName(String lastName) { - this.lastName = lastName; - return this; - } - - /** - * Sets the value for {@code mobilePhone}. - * - * @param mobilePhone Mobile phone number - * @return This builder instance. - */ - public Builder mobilePhone(String mobilePhone) { - this.mobilePhone = mobilePhone; - return this; - } - - /** - * Builds an immutable PersonalProfileLegacy instance. - * - * @return Immutable PersonalProfileLegacy. - */ - public PersonalProfileLegacy build() { - return new PersonalProfileLegacy( - address, complete, dateOfBirth, firstName, lastName, mobilePhone); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/PersonalProfilePayloadLegacy.java b/src/main/java/com/sumup/sdk/models/PersonalProfilePayloadLegacy.java deleted file mode 100644 index 52ca118..0000000 --- a/src/main/java/com/sumup/sdk/models/PersonalProfilePayloadLegacy.java +++ /dev/null @@ -1,130 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -import java.util.Objects; - -/** Account's personal profile. */ -public record PersonalProfilePayloadLegacy( - /** Personal address */ - com.sumup.sdk.models.AddressPayloadLegacy address, - - /** Date of birth */ - java.time.LocalDate dateOfBirth, - - /** First name of the user */ - String firstName, - - /** Last name of the user */ - String lastName, - - /** Mobile phone number */ - String mobilePhone, - - /** - * National identification id. Country specific. Ex CPF (Brazil), DNI (Spain), PESEL - * (Poland) - */ - String nationalId) { - /** - * Creates a builder for PersonalProfilePayloadLegacy. - * - * @return Builder that constructs immutable PersonalProfilePayloadLegacy instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for PersonalProfilePayloadLegacy instances. */ - public static final class Builder { - private com.sumup.sdk.models.AddressPayloadLegacy address; - private java.time.LocalDate dateOfBirth; - private String firstName; - private String lastName; - private String mobilePhone; - private String nationalId; - - private Builder() {} - - /** - * Sets the value for {@code address}. - * - * @param address Personal address - * @return This builder instance. - */ - public Builder address(com.sumup.sdk.models.AddressPayloadLegacy address) { - this.address = address; - return this; - } - - /** - * Sets the value for {@code dateOfBirth}. - * - * @param dateOfBirth Date of birth - * @return This builder instance. - */ - public Builder dateOfBirth(java.time.LocalDate dateOfBirth) { - this.dateOfBirth = dateOfBirth; - return this; - } - - /** - * Sets the value for {@code firstName}. - * - * @param firstName First name of the user - * @return This builder instance. - */ - public Builder firstName(String firstName) { - this.firstName = firstName; - return this; - } - - /** - * Sets the value for {@code lastName}. - * - * @param lastName Last name of the user - * @return This builder instance. - */ - public Builder lastName(String lastName) { - this.lastName = lastName; - return this; - } - - /** - * Sets the value for {@code mobilePhone}. - * - * @param mobilePhone Mobile phone number - * @return This builder instance. - */ - public Builder mobilePhone(String mobilePhone) { - this.mobilePhone = mobilePhone; - return this; - } - - /** - * Sets the value for {@code nationalId}. - * - * @param nationalId National identification id. Country specific. Ex CPF (Brazil), DNI - * (Spain), PESEL (Poland) - * @return This builder instance. - */ - public Builder nationalId(String nationalId) { - this.nationalId = nationalId; - return this; - } - - /** - * Builds an immutable PersonalProfilePayloadLegacy instance. - * - * @return Immutable PersonalProfilePayloadLegacy. - */ - public PersonalProfilePayloadLegacy build() { - return new PersonalProfilePayloadLegacy( - Objects.requireNonNull(address, "address"), - Objects.requireNonNull(dateOfBirth, "dateOfBirth"), - Objects.requireNonNull(firstName, "firstName"), - Objects.requireNonNull(lastName, "lastName"), - mobilePhone, - nationalId); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/ProcessCheckout.java b/src/main/java/com/sumup/sdk/models/ProcessCheckout.java index e035fe7..93a78f5 100644 --- a/src/main/java/com/sumup/sdk/models/ProcessCheckout.java +++ b/src/main/java/com/sumup/sdk/models/ProcessCheckout.java @@ -3,7 +3,11 @@ import java.util.Objects; -/** Details of the payment instrument for processing the checkout. */ +/** + * 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. + */ public record ProcessCheckout( /** * Raw payment token object received from Apple Pay. Send the Apple Pay response payload as-is. @@ -13,7 +17,10 @@ public record ProcessCheckout( /** __Required when payment type is `card`.__ Details of the payment card. */ com.sumup.sdk.models.Card card, - /** __Required when `token` is provided.__ Unique ID of the customer. */ + /** + * Customer identifier associated with the saved payment instrument. Required when `token` is + * provided. + */ String customerId, /** @@ -25,18 +32,24 @@ public record ProcessCheckout( /** Number of installments for deferred payments. Available only to merchant users in Brazil. */ Long installments, - /** Mandate is passed when a card is to be tokenized */ + /** + * Mandate details used when a checkout should create a reusable card token for future recurring + * or merchant-initiated payments. + */ com.sumup.sdk.models.MandatePayload mandate, - /** Describes the payment method used to attempt processing */ + /** + * Payment method used for this processing attempt. It determines which additional request + * fields are required. + */ com.sumup.sdk.models.ProcessCheckoutPaymentType paymentType, /** Personal details for the customer. */ com.sumup.sdk.models.PersonalDetails personalDetails, /** - * __Required when using a tokenized card to process a checkout.__ Unique token identifying the - * saved payment card for a customer. + * Saved-card token to use instead of raw card details when processing with a previously stored + * payment instrument. */ String token) { /** @@ -88,7 +101,8 @@ public Builder card(com.sumup.sdk.models.Card card) { /** * Sets the value for {@code customerId}. * - * @param customerId __Required when `token` is provided.__ Unique ID of the customer. + * @param customerId Customer identifier associated with the saved payment instrument. Required + * when `token` is provided. * @return This builder instance. */ public Builder customerId(String customerId) { @@ -123,7 +137,8 @@ public Builder installments(Long installments) { /** * Sets the value for {@code mandate}. * - * @param mandate Mandate is passed when a card is to be tokenized + * @param mandate Mandate details used when a checkout should create a reusable card token for + * future recurring or merchant-initiated payments. * @return This builder instance. */ public Builder mandate(com.sumup.sdk.models.MandatePayload mandate) { @@ -134,7 +149,8 @@ public Builder mandate(com.sumup.sdk.models.MandatePayload mandate) { /** * Sets the value for {@code paymentType}. * - * @param paymentType Describes the payment method used to attempt processing + * @param paymentType Payment method used for this processing attempt. It determines which + * additional request fields are required. * @return This builder instance. */ public Builder paymentType(com.sumup.sdk.models.ProcessCheckoutPaymentType paymentType) { @@ -156,8 +172,8 @@ public Builder personalDetails(com.sumup.sdk.models.PersonalDetails personalDeta /** * Sets the value for {@code token}. * - * @param token __Required when using a tokenized card to process a checkout.__ Unique token - * identifying the saved payment card for a customer. + * @param token Saved-card token to use instead of raw card details when processing with a + * previously stored payment instrument. * @return This builder instance. */ public Builder token(String token) { diff --git a/src/main/java/com/sumup/sdk/models/ProcessCheckoutPaymentType.java b/src/main/java/com/sumup/sdk/models/ProcessCheckoutPaymentType.java index b4c17ac..8a1e680 100644 --- a/src/main/java/com/sumup/sdk/models/ProcessCheckoutPaymentType.java +++ b/src/main/java/com/sumup/sdk/models/ProcessCheckoutPaymentType.java @@ -4,7 +4,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Describes the payment method used to attempt processing */ +/** + * Payment method used for this processing attempt. It determines which additional request fields + * are required. + */ public enum ProcessCheckoutPaymentType { CARD("card"), BOLETO("boleto"), diff --git a/src/main/java/com/sumup/sdk/models/ReceiptEvent.java b/src/main/java/com/sumup/sdk/models/ReceiptEvent.java index fad353e..f1e387e 100644 --- a/src/main/java/com/sumup/sdk/models/ReceiptEvent.java +++ b/src/main/java/com/sumup/sdk/models/ReceiptEvent.java @@ -12,7 +12,22 @@ public record ReceiptEvent( /** Receipt number associated with the event. */ String receiptNo, - /** Status of the transaction event. */ + /** + * Status of the transaction event. Not every value is used for every event type. - `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. - `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. - `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. - `PAID_OUT`: The payout event has been completed and the + * funds were included in a merchant payout. - `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. - `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`. - `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. + */ com.sumup.sdk.models.EventStatus status, /** Date and time of the transaction event. */ @@ -80,7 +95,21 @@ public Builder receiptNo(String receiptNo) { /** * Sets the value for {@code status}. * - * @param status Status of the transaction event. + * @param status Status of the transaction event. Not every value is used for every event type. + * - `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. - `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. - `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. - `PAID_OUT`: + * The payout event has been completed and the funds were included in a merchant payout. - + * `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. - `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`. - `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. * @return This builder instance. */ public Builder status(com.sumup.sdk.models.EventStatus status) { diff --git a/src/main/java/com/sumup/sdk/models/TimeoffsetDetails.java b/src/main/java/com/sumup/sdk/models/TimeoffsetDetails.java deleted file mode 100644 index 9840b74..0000000 --- a/src/main/java/com/sumup/sdk/models/TimeoffsetDetails.java +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by sumup-java/codegen. DO NOT EDIT. -package com.sumup.sdk.models; - -/** TimeOffset Details */ -public record TimeoffsetDetails( - /** Daylight Saving Time */ - Boolean dst, - - /** UTC offset */ - Double offset, - - /** Postal code */ - String postCode) { - /** - * Creates a builder for TimeoffsetDetails. - * - * @return Builder that constructs immutable TimeoffsetDetails instances. - */ - public static Builder builder() { - return new Builder(); - } - - /** Builder for TimeoffsetDetails instances. */ - public static final class Builder { - private Boolean dst; - private Double offset; - private String postCode; - - private Builder() {} - - /** - * Sets the value for {@code dst}. - * - * @param dst Daylight Saving Time - * @return This builder instance. - */ - public Builder dst(Boolean dst) { - this.dst = dst; - return this; - } - - /** - * Sets the value for {@code offset}. - * - * @param offset UTC offset - * @return This builder instance. - */ - public Builder offset(Double offset) { - this.offset = offset; - return this; - } - - /** - * Sets the value for {@code postCode}. - * - * @param postCode Postal code - * @return This builder instance. - */ - public Builder postCode(String postCode) { - this.postCode = postCode; - return this; - } - - /** - * Builds an immutable TimeoffsetDetails instance. - * - * @return Immutable TimeoffsetDetails. - */ - public TimeoffsetDetails build() { - return new TimeoffsetDetails(dst, offset, postCode); - } - } -} diff --git a/src/main/java/com/sumup/sdk/models/TransactionEvent.java b/src/main/java/com/sumup/sdk/models/TransactionEvent.java index 6ef7bb4..ffb26f8 100644 --- a/src/main/java/com/sumup/sdk/models/TransactionEvent.java +++ b/src/main/java/com/sumup/sdk/models/TransactionEvent.java @@ -1,7 +1,7 @@ // Code generated by sumup-java/codegen. DO NOT EDIT. package com.sumup.sdk.models; -/** Details of a transaction event. */ +/** Detailed information about a transaction event. */ public record TransactionEvent( /** Amount of the event. */ Double amount, @@ -24,7 +24,22 @@ public record TransactionEvent( */ Long installmentNumber, - /** Status of the transaction event. */ + /** + * Status of the transaction event. Not every value is used for every event type. - `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. - `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. - `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. - `PAID_OUT`: The payout event has been completed and the + * funds were included in a merchant payout. - `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. - `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`. - `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. + */ com.sumup.sdk.models.EventStatus status, /** Date and time of the transaction event. */ @@ -121,7 +136,21 @@ public Builder installmentNumber(Long installmentNumber) { /** * Sets the value for {@code status}. * - * @param status Status of the transaction event. + * @param status Status of the transaction event. Not every value is used for every event type. + * - `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. - `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. - `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. - `PAID_OUT`: + * The payout event has been completed and the funds were included in a merchant payout. - + * `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. - `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`. - `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. * @return This builder instance. */ public Builder status(com.sumup.sdk.models.EventStatus status) {