diff --git a/openapi.json b/openapi.json
index de333ee..04f9652 100755
--- a/openapi.json
+++ b/openapi.json
@@ -3030,6 +3030,171 @@
]
}
},
+ "/v0/merchants/{merchant_code}/readers/{reader_id}/go-checkout": {
+ "post": {
+ "operationId": "CreateGoReaderCheckout",
+ "summary": "Create a Go Reader Payment",
+ "description": "Initiates a payment on the SumUp Go terminal identified by the reader ID.\n\nUse `client_transaction_id` as an idempotency key: retrying the request with the same value returns the result of the original payment instead of creating a duplicate.",
+ "parameters": [
+ {
+ "name": "Authorization",
+ "in": "header",
+ "description": "Access token in the format 'Bearer {token}'.",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "merchant_code",
+ "in": "path",
+ "description": "Short unique identifier for the merchant.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": "MK10CL2A"
+ }
+ },
+ {
+ "name": "reader_id",
+ "in": "path",
+ "description": "The unique identifier of the reader.",
+ "required": true,
+ "schema": {
+ "$ref": "#/components/schemas/ReaderID"
+ }
+ }
+ ],
+ "requestBody": {
+ "description": "Payment details to initiate on the reader.",
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ReaderPaymentRequestParams"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Returns the result of the payment initiated on the reader.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ReaderPaymentResponse"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "The request is invalid.",
+ "content": {
+ "application/problem+json": {
+ "schema": {
+ "$ref": "#/components/schemas/Problem"
+ },
+ "example": {
+ "type": "https://developer.sumup.com/problem/bad-request",
+ "title": "Bad Request",
+ "status": 400,
+ "detail": "Request validation failed."
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Authentication failed or missing required scope.",
+ "content": {
+ "application/problem+json": {
+ "schema": {
+ "$ref": "#/components/schemas/Problem"
+ },
+ "example": {
+ "type": "https://developer.sumup.com/problem/unauthorized",
+ "title": "Unauthorized",
+ "status": 401,
+ "detail": "Authentication credentials are missing or invalid."
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "The requested Reader resource does not exist.",
+ "content": {
+ "application/problem+json": {
+ "schema": {
+ "$ref": "#/components/schemas/Problem"
+ },
+ "example": {
+ "type": "https://developer.sumup.com/problem/not-found",
+ "title": "Requested resource couldn't be found.",
+ "status": 404,
+ "detail": "The requested resource doesn't exist or does not belong to you."
+ }
+ }
+ }
+ },
+ "422": {
+ "description": "The request could not be processed as it violates a business rule.",
+ "content": {
+ "application/problem+json": {
+ "schema": {
+ "$ref": "#/components/schemas/Problem"
+ },
+ "example": {
+ "type": "https://developer.sumup.com/problem/validation-error",
+ "title": "Unprocessable Entity",
+ "status": 422,
+ "detail": "Validation failed."
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "An unexpected error occurred while processing the request.",
+ "content": {
+ "application/problem+json": {
+ "schema": {
+ "$ref": "#/components/schemas/Problem"
+ },
+ "example": {
+ "type": "https://developer.sumup.com/problem/internal-server-error",
+ "title": "Internal Server Error",
+ "status": 500,
+ "detail": "An unexpected error occurred while processing the request."
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "apiKey": []
+ },
+ {
+ "oauth2": [
+ "payments",
+ "readers.write"
+ ]
+ }
+ ],
+ "tags": [
+ "Readers"
+ ],
+ "x-codegen": {
+ "method_name": "create_go_checkout",
+ "ignore": true
+ },
+ "x-permissions": [
+ "readers_checkout_create"
+ ],
+ "x-scopes": [
+ "payments",
+ "readers.write"
+ ]
+ }
+ },
"/v0.1/memberships": {
"get": {
"operationId": "ListMemberships",
@@ -5711,6 +5876,122 @@
"readers.write"
]
}
+ },
+ "/v0.1/merchants/{merchant_code}/readers/{reader_id}/checkout/{checkout_id}": {
+ "get": {
+ "operationId": "GetReaderCheckout",
+ "summary": "Get a Reader Checkout",
+ "description": "Get a Checkout for a Reader.\n",
+ "parameters": [
+ {
+ "name": "merchant_code",
+ "in": "path",
+ "description": "Merchant Code",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "example": "MC0X0ABC"
+ },
+ {
+ "name": "reader_id",
+ "in": "path",
+ "description": "The unique identifier of the Reader",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "example": "rdr_3MSAFM23CK82VSTT4BN6RWSQ65"
+ },
+ {
+ "name": "checkout_id",
+ "in": "path",
+ "description": "The unique identifier of the Checkout",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "example": "74ecff66-1655-43ed-8ce3-193f49fa602f"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The Checkout got successfully retrieved for the given reader.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/GetReaderCheckoutResponse"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "Unauthorized",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/CreateReaderCheckoutError"
+ }
+ },
+ "application/problem+json": {
+ "example": {
+ "detail": "Unauthorized",
+ "status": 401,
+ "title": "Unauthorized",
+ "type": "https://developer.sumup.com/problem/unauthorized"
+ },
+ "schema": {
+ "$ref": "#/components/schemas/Problem"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Response when given reader or checkout is not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFound"
+ }
+ },
+ "application/problem+json": {
+ "example": {
+ "detail": "The requested resource doesn't exist or does not belong to you.",
+ "status": 404,
+ "title": "Requested resource couldn't be found.",
+ "type": "https://developer.sumup.com/problem/not-found"
+ },
+ "schema": {
+ "$ref": "#/components/schemas/Problem"
+ }
+ }
+ }
+ }
+ },
+ "callbacks": {},
+ "security": [
+ {
+ "apiKey": []
+ },
+ {
+ "oauth2": [
+ "readers.read"
+ ]
+ }
+ ],
+ "tags": [
+ "Readers"
+ ],
+ "x-codegen": {
+ "method_name": "get_checkout"
+ },
+ "x-permissions": [
+ "readers_checkout_view"
+ ],
+ "x-scopes": [
+ "readers.read"
+ ]
+ }
}
},
"components": {
@@ -8066,6 +8347,97 @@
"type": "string",
"title": "Transaction ID"
},
+ "Affiliate": {
+ "type": "object",
+ "properties": {
+ "app_id": {
+ "type": "string",
+ "example": "com.example.app"
+ },
+ "key": {
+ "type": "string",
+ "example": "123e4567-e89b-12d3-a456-426614174000"
+ }
+ },
+ "required": [
+ "app_id",
+ "key"
+ ]
+ },
+ "Amount": {
+ "type": "object",
+ "properties": {
+ "currency": {
+ "description": "Currency ISO 4217 code",
+ "type": "string",
+ "example": "MXN"
+ },
+ "value": {
+ "description": "Amount in minor units (e.g. cents).",
+ "type": "integer",
+ "example": 1000
+ }
+ },
+ "required": [
+ "currency",
+ "value"
+ ]
+ },
+ "ReaderID": {
+ "description": "Unique identifier of the reader that the payment is initiated on.",
+ "type": "string",
+ "example": "rdr_3MSAFM23CK82VSTT4BN6RWSQ65",
+ "maxLength": 30,
+ "minLength": 30
+ },
+ "ReaderPaymentRequestParams": {
+ "type": "object",
+ "properties": {
+ "affiliate": {
+ "$ref": "#/components/schemas/Affiliate"
+ },
+ "client_transaction_id": {
+ "description": "Caller-supplied correlation identifier, used as the idempotency key.",
+ "type": "string",
+ "example": "19e12390-72cf-4f9f-80b5-b0c8a67fa43f"
+ },
+ "tip_amount": {
+ "description": "Optional tip amount in minor units, added on top of total_amount.",
+ "type": "integer",
+ "example": 100
+ },
+ "total_amount": {
+ "$ref": "#/components/schemas/Amount"
+ }
+ },
+ "required": [
+ "total_amount",
+ "client_transaction_id"
+ ]
+ },
+ "ReaderPaymentResponse": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "$ref": "#/components/schemas/ReaderPaymentResponseData"
+ }
+ }
+ },
+ "ReaderPaymentResponseData": {
+ "type": "object",
+ "properties": {
+ "client_transaction_id": {
+ "description": "Caller-supplied correlation identifier that was provided in the request.",
+ "type": "string",
+ "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
+ },
+ "transaction_code": {
+ "description": "Transaction code returned by the acquirer/processing entity after processing the transaction.",
+ "type": "string",
+ "example": "TEENSK4W2K"
+ }
+ }
+ },
"MembershipStatus": {
"description": "The status of the membership.",
"type": "string",
@@ -9246,13 +9618,6 @@
],
"title": "Reader"
},
- "ReaderID": {
- "description": "Unique identifier of the object.\n\nNote that this identifies the instance of the physical devices pairing with your SumUp account. If you [delete](https://developer.sumup.com/api/readers/delete-reader) a reader, and pair the device again, the ID will be different. Do not use this ID to refer to a physical device.",
- "type": "string",
- "example": "rdr_3MSAFM23CK82VSTT4BN6RWSQ65",
- "maxLength": 30,
- "minLength": 30
- },
"ReaderName": {
"description": "Custom human-readable, user-defined name for easier identification of the reader.",
"type": "string",
@@ -9393,6 +9758,165 @@
],
"title": "CreateReaderCheckoutError"
},
+ "GetReaderCheckoutResponse": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "properties": {
+ "card_type": {
+ "description": "Type of the card. Required for some countries",
+ "type": "string",
+ "enum": [
+ "credit",
+ "debit"
+ ],
+ "nullable": true
+ },
+ "checkout_id": {
+ "description": "Unique identifier for the checkout",
+ "type": "string",
+ "format": "uuid"
+ },
+ "client_transaction_id": {
+ "description": "Client transaction identifier associated with the checkout",
+ "type": "string"
+ },
+ "created_at": {
+ "description": "Checkout creation timestamp",
+ "type": "string",
+ "format": "date-time"
+ },
+ "installments": {
+ "description": "Number of installments for the transaction. Required for some countries.",
+ "type": "integer",
+ "nullable": true
+ },
+ "payment_failure_reason": {
+ "description": "Payment failure reason",
+ "type": "string",
+ "nullable": true
+ },
+ "payment_status": {
+ "description": "Payment status from payments v2 event",
+ "type": "string",
+ "nullable": true
+ },
+ "payment_type": {
+ "description": "Type of the payment. Required for some countries",
+ "type": "string",
+ "enum": [
+ "card",
+ "pix"
+ ]
+ },
+ "reader_firmware_version": {
+ "description": "Reader firmware version",
+ "type": "string"
+ },
+ "reader_serial_number": {
+ "description": "Device serial number",
+ "type": "string"
+ },
+ "status": {
+ "description": "Current status of the checkout",
+ "type": "string",
+ "enum": [
+ "pending",
+ "successful",
+ "failed",
+ "cancelled"
+ ]
+ },
+ "total_amount": {
+ "description": "Amount structure.\n\nThe amount is represented as an integer value altogether with the currency and the minor unit.\n\nFor example, EUR 1.00 is represented as value 100 with minor unit of 2.\n",
+ "type": "object",
+ "example": {
+ "currency": "EUR",
+ "minor_unit": 2,
+ "value": 1000
+ },
+ "properties": {
+ "currency": {
+ "description": "Currency ISO 4217 code",
+ "type": "string",
+ "example": "EUR"
+ },
+ "minor_unit": {
+ "description": "The minor units of the currency.\nIt represents the number of decimals of the currency. For the currencies CLP, COP and HUF, the minor unit is 0.\n",
+ "type": "integer",
+ "example": 2,
+ "minimum": 0
+ },
+ "value": {
+ "description": "Integer value of the amount.",
+ "type": "integer",
+ "example": 1000,
+ "minimum": 0
+ }
+ },
+ "required": [
+ "currency",
+ "minor_unit",
+ "value"
+ ],
+ "title": "Money"
+ },
+ "updated_at": {
+ "description": "Checkout last update timestamp",
+ "type": "string",
+ "format": "date-time"
+ },
+ "valid_until": {
+ "description": "Checkout expiration timestamp. After this time, the checkout will be automatically cancelled.",
+ "type": "string",
+ "format": "date-time",
+ "nullable": true
+ }
+ },
+ "required": [
+ "checkout_id",
+ "client_transaction_id",
+ "reader_serial_number",
+ "payment_type",
+ "card_type",
+ "reader_firmware_version",
+ "installments",
+ "payment_status",
+ "valid_until",
+ "created_at",
+ "updated_at",
+ "status",
+ "total_amount"
+ ]
+ }
+ },
+ "example": {
+ "data": {
+ "card_type": "credit",
+ "checkout_id": "00e33a36-c99b-4cb2-b635-b90c1455c9c8",
+ "client_transaction_id": "00e33a36-c99b-4cb2-b635-b90c1455c9c8",
+ "created_at": "2026-07-07T20:41:16.315434Z",
+ "installments": 1,
+ "payment_status": "pending",
+ "payment_type": "card",
+ "reader_firmware_version": "3.3.3.21",
+ "reader_serial_number": "1234567890",
+ "status": "pending",
+ "total_amount": {
+ "currency": "EUR",
+ "minor_unit": 2,
+ "value": 10000
+ },
+ "updated_at": "2026-07-07T20:42:18.117244Z",
+ "valid_until": "2026-07-07T20:41:16.315434Z"
+ }
+ },
+ "required": [
+ "data"
+ ],
+ "title": "GetReaderCheckoutResponse"
+ },
"StatusResponse": {
"description": "Status of a device",
"type": "object",
@@ -9577,6 +10101,11 @@
"data": {
"type": "object",
"properties": {
+ "checkout_id": {
+ "description": "The checkout ID is a unique identifier for the checkout.\n",
+ "type": "string",
+ "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
+ },
"client_transaction_id": {
"description": "The client transaction ID is a unique identifier for the transaction that is generated for the client.\n\nIt can be used later to fetch the transaction details via the [Transactions API](https://developer.sumup.com/api/transactions/get).\n",
"type": "string",
@@ -9590,6 +10119,7 @@
},
"example": {
"data": {
+ "checkout_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"client_transaction_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
},
@@ -10676,6 +11206,70 @@
}
}
},
+ "BadRequest": {
+ "description": "The request is invalid.",
+ "content": {
+ "application/problem+json": {
+ "schema": {
+ "$ref": "#/components/schemas/Problem"
+ },
+ "example": {
+ "type": "https://developer.sumup.com/problem/bad-request",
+ "title": "Bad Request",
+ "status": 400,
+ "detail": "Request validation failed."
+ }
+ }
+ }
+ },
+ "Unauthorized": {
+ "description": "Authentication failed or missing required scope.",
+ "content": {
+ "application/problem+json": {
+ "schema": {
+ "$ref": "#/components/schemas/Problem"
+ },
+ "example": {
+ "type": "https://developer.sumup.com/problem/unauthorized",
+ "title": "Unauthorized",
+ "status": 401,
+ "detail": "Authentication credentials are missing or invalid."
+ }
+ }
+ }
+ },
+ "NotFound": {
+ "description": "The requested Reader resource does not exist.",
+ "content": {
+ "application/problem+json": {
+ "schema": {
+ "$ref": "#/components/schemas/Problem"
+ },
+ "example": {
+ "type": "https://developer.sumup.com/problem/not-found",
+ "title": "Requested resource couldn't be found.",
+ "status": 404,
+ "detail": "The requested resource doesn't exist or does not belong to you."
+ }
+ }
+ }
+ },
+ "InternalError": {
+ "description": "An unexpected error occurred while processing the request.",
+ "content": {
+ "application/problem+json": {
+ "schema": {
+ "$ref": "#/components/schemas/Problem"
+ },
+ "example": {
+ "type": "https://developer.sumup.com/problem/internal-server-error",
+ "title": "Internal Server Error",
+ "status": 500,
+ "detail": "An unexpected error occurred while processing the request."
+ }
+ }
+ }
+ },
"ListMemberships": {
"description": "Returns a list of Membership objects.",
"content": {
@@ -10848,6 +11442,9 @@
}
]
},
+ {
+ "name": "Readers"
+ },
{
"name": "Members",
"description": "Endpoints to manage account members. Members are users that have membership within merchant accounts.",
@@ -10886,15 +11483,6 @@
"$ref": "#/components/schemas/Merchant"
}
]
- },
- {
- "name": "Readers",
- "description": "A reader represents a device that accepts payments. You can use the SumUp Solo to accept in-person payments.",
- "x-core-objects": [
- {
- "$ref": "#/components/schemas/Reader"
- }
- ]
}
]
-}
+}
\ No newline at end of file
diff --git a/src/SumUp/Models/Affiliate.g.cs b/src/SumUp/Models/Affiliate.g.cs
new file mode 100644
index 0000000..8b799a4
--- /dev/null
+++ b/src/SumUp/Models/Affiliate.g.cs
@@ -0,0 +1,13 @@
+//
+#nullable enable
+
+namespace SumUp;
+
+using System.Text.Json.Serialization;
+public sealed partial class Affiliate
+{
+ [JsonPropertyName("app_id")]
+ public string AppId { get; set; } = default!;
+ [JsonPropertyName("key")]
+ public string Key { get; set; } = default!;
+}
\ No newline at end of file
diff --git a/src/SumUp/Models/Amount.g.cs b/src/SumUp/Models/Amount.g.cs
new file mode 100644
index 0000000..35ae62a
--- /dev/null
+++ b/src/SumUp/Models/Amount.g.cs
@@ -0,0 +1,15 @@
+//
+#nullable enable
+
+namespace SumUp;
+
+using System.Text.Json.Serialization;
+public sealed partial class Amount
+{
+ /// Currency ISO 4217 code
+ [JsonPropertyName("currency")]
+ public string Currency { get; set; } = default!;
+ /// Amount in minor units (e.g. cents).
+ [JsonPropertyName("value")]
+ public int Value { get; set; }
+}
\ No newline at end of file
diff --git a/src/SumUp/Models/CreateReaderCheckoutResponseData.g.cs b/src/SumUp/Models/CreateReaderCheckoutResponseData.g.cs
index 2c5d3e9..1b5ad58 100644
--- a/src/SumUp/Models/CreateReaderCheckoutResponseData.g.cs
+++ b/src/SumUp/Models/CreateReaderCheckoutResponseData.g.cs
@@ -6,6 +6,9 @@ namespace SumUp;
using System.Text.Json.Serialization;
public sealed partial class CreateReaderCheckoutResponseData
{
+ /// The checkout ID is a unique identifier for the checkout.
+ [JsonPropertyName("checkout_id")]
+ public string? CheckoutId { get; set; }
/// The client transaction ID is a unique identifier for the transaction that is generated for the client. It can be used later to fetch the transaction details via the Transactions API.
[JsonPropertyName("client_transaction_id")]
public string ClientTransactionId { get; set; } = default!;
diff --git a/src/SumUp/Models/GetReaderCheckoutResponse.g.cs b/src/SumUp/Models/GetReaderCheckoutResponse.g.cs
new file mode 100644
index 0000000..f4ca780
--- /dev/null
+++ b/src/SumUp/Models/GetReaderCheckoutResponse.g.cs
@@ -0,0 +1,11 @@
+//
+#nullable enable
+
+namespace SumUp;
+
+using System.Text.Json.Serialization;
+public sealed partial class GetReaderCheckoutResponse
+{
+ [JsonPropertyName("data")]
+ public GetReaderCheckoutResponseData Data { get; set; } = default!;
+}
\ No newline at end of file
diff --git a/src/SumUp/Models/GetReaderCheckoutResponseData.g.cs b/src/SumUp/Models/GetReaderCheckoutResponseData.g.cs
new file mode 100644
index 0000000..9200440
--- /dev/null
+++ b/src/SumUp/Models/GetReaderCheckoutResponseData.g.cs
@@ -0,0 +1,51 @@
+//
+#nullable enable
+
+namespace SumUp;
+
+using System.Text.Json.Serialization;
+public sealed partial class GetReaderCheckoutResponseData
+{
+ /// Type of the card. Required for some countries
+ [JsonPropertyName("card_type")]
+ public GetReaderCheckoutResponseDataCardType CardType { get; set; }
+ /// Unique identifier for the checkout
+ [JsonPropertyName("checkout_id")]
+ public Guid CheckoutId { get; set; }
+ /// Client transaction identifier associated with the checkout
+ [JsonPropertyName("client_transaction_id")]
+ public string ClientTransactionId { get; set; } = default!;
+ /// Checkout creation timestamp
+ [JsonPropertyName("created_at")]
+ public DateTimeOffset CreatedAt { get; set; }
+ /// Number of installments for the transaction. Required for some countries.
+ [JsonPropertyName("installments")]
+ public int? Installments { get; set; }
+ /// Payment failure reason
+ [JsonPropertyName("payment_failure_reason")]
+ public string? PaymentFailureReason { get; set; }
+ /// Payment status from payments v2 event
+ [JsonPropertyName("payment_status")]
+ public string? PaymentStatus { get; set; }
+ /// Type of the payment. Required for some countries
+ [JsonPropertyName("payment_type")]
+ public GetReaderCheckoutResponseDataPaymentType PaymentType { get; set; }
+ /// Reader firmware version
+ [JsonPropertyName("reader_firmware_version")]
+ public string ReaderFirmwareVersion { get; set; } = default!;
+ /// Device serial number
+ [JsonPropertyName("reader_serial_number")]
+ public string ReaderSerialNumber { get; set; } = default!;
+ /// Current status of the checkout
+ [JsonPropertyName("status")]
+ public GetReaderCheckoutResponseDataStatus Status { get; set; }
+ /// Amount structure. The amount is represented as an integer value altogether with the currency and the minor unit. For example, EUR 1.00 is represented as value 100 with minor unit of 2.
+ [JsonPropertyName("total_amount")]
+ public GetReaderCheckoutResponseDataTotalAmount TotalAmount { get; set; } = default!;
+ /// Checkout last update timestamp
+ [JsonPropertyName("updated_at")]
+ public DateTimeOffset UpdatedAt { get; set; }
+ /// Checkout expiration timestamp. After this time, the checkout will be automatically cancelled.
+ [JsonPropertyName("valid_until")]
+ public DateTimeOffset? ValidUntil { get; set; }
+}
\ No newline at end of file
diff --git a/src/SumUp/Models/GetReaderCheckoutResponseDataCardType.g.cs b/src/SumUp/Models/GetReaderCheckoutResponseDataCardType.g.cs
new file mode 100644
index 0000000..abfc0b2
--- /dev/null
+++ b/src/SumUp/Models/GetReaderCheckoutResponseDataCardType.g.cs
@@ -0,0 +1,16 @@
+//
+#nullable enable
+
+namespace SumUp;
+
+using System.Runtime.Serialization;
+using System.Text.Json.Serialization;
+
+[JsonConverter(typeof(EnumMemberJsonConverterFactory))]
+public enum GetReaderCheckoutResponseDataCardType
+{
+ [EnumMember(Value = "credit")]
+ Credit,
+ [EnumMember(Value = "debit")]
+ Debit,
+}
\ No newline at end of file
diff --git a/src/SumUp/Models/GetReaderCheckoutResponseDataPaymentType.g.cs b/src/SumUp/Models/GetReaderCheckoutResponseDataPaymentType.g.cs
new file mode 100644
index 0000000..73e6cb5
--- /dev/null
+++ b/src/SumUp/Models/GetReaderCheckoutResponseDataPaymentType.g.cs
@@ -0,0 +1,16 @@
+//
+#nullable enable
+
+namespace SumUp;
+
+using System.Runtime.Serialization;
+using System.Text.Json.Serialization;
+
+[JsonConverter(typeof(EnumMemberJsonConverterFactory))]
+public enum GetReaderCheckoutResponseDataPaymentType
+{
+ [EnumMember(Value = "card")]
+ Card,
+ [EnumMember(Value = "pix")]
+ Pix,
+}
\ No newline at end of file
diff --git a/src/SumUp/Models/GetReaderCheckoutResponseDataStatus.g.cs b/src/SumUp/Models/GetReaderCheckoutResponseDataStatus.g.cs
new file mode 100644
index 0000000..9e8c5a9
--- /dev/null
+++ b/src/SumUp/Models/GetReaderCheckoutResponseDataStatus.g.cs
@@ -0,0 +1,20 @@
+//
+#nullable enable
+
+namespace SumUp;
+
+using System.Runtime.Serialization;
+using System.Text.Json.Serialization;
+
+[JsonConverter(typeof(EnumMemberJsonConverterFactory))]
+public enum GetReaderCheckoutResponseDataStatus
+{
+ [EnumMember(Value = "pending")]
+ Pending,
+ [EnumMember(Value = "successful")]
+ Successful,
+ [EnumMember(Value = "failed")]
+ Failed,
+ [EnumMember(Value = "cancelled")]
+ Cancelled,
+}
\ No newline at end of file
diff --git a/src/SumUp/Models/GetReaderCheckoutResponseDataTotalAmount.g.cs b/src/SumUp/Models/GetReaderCheckoutResponseDataTotalAmount.g.cs
new file mode 100644
index 0000000..0e66ce8
--- /dev/null
+++ b/src/SumUp/Models/GetReaderCheckoutResponseDataTotalAmount.g.cs
@@ -0,0 +1,19 @@
+//
+#nullable enable
+
+namespace SumUp;
+
+using System.Text.Json.Serialization;
+/// Amount structure. The amount is represented as an integer value altogether with the currency and the minor unit. For example, EUR 1.00 is represented as value 100 with minor unit of 2.
+public sealed partial class GetReaderCheckoutResponseDataTotalAmount
+{
+ /// Currency ISO 4217 code
+ [JsonPropertyName("currency")]
+ public string Currency { get; set; } = default!;
+ /// The minor units of the currency. It represents the number of decimals of the currency. For the currencies CLP, COP and HUF, the minor unit is 0.
+ [JsonPropertyName("minor_unit")]
+ public int MinorUnit { get; set; }
+ /// Integer value of the amount.
+ [JsonPropertyName("value")]
+ public int Value { get; set; }
+}
\ No newline at end of file
diff --git a/src/SumUp/Models/Reader.g.cs b/src/SumUp/Models/Reader.g.cs
index e7d23a8..3138fd8 100644
--- a/src/SumUp/Models/Reader.g.cs
+++ b/src/SumUp/Models/Reader.g.cs
@@ -13,7 +13,7 @@ public sealed partial class Reader
/// Information about the underlying physical device.
[JsonPropertyName("device")]
public ReaderDevice Device { get; set; } = default!;
- /// Unique identifier of the object. Note that this identifies the instance of the physical devices pairing with your SumUp account. If you delete a reader, and pair the device again, the ID will be different. Do not use this ID to refer to a physical device.
+ /// Unique identifier of the reader that the payment is initiated on.
[JsonPropertyName("id")]
public string Id { get; set; } = default!;
/// Set of user-defined key-value pairs attached to the object. Partial updates are not supported. When updating, always submit whole metadata. Maximum of 64 parameters are allowed in the object.
diff --git a/src/SumUp/Models/ReaderPaymentRequestParams.g.cs b/src/SumUp/Models/ReaderPaymentRequestParams.g.cs
new file mode 100644
index 0000000..ba2d04c
--- /dev/null
+++ b/src/SumUp/Models/ReaderPaymentRequestParams.g.cs
@@ -0,0 +1,19 @@
+//
+#nullable enable
+
+namespace SumUp;
+
+using System.Text.Json.Serialization;
+public sealed partial class ReaderPaymentRequestParams
+{
+ [JsonPropertyName("affiliate")]
+ public Affiliate? Affiliate { get; set; }
+ /// Caller-supplied correlation identifier, used as the idempotency key.
+ [JsonPropertyName("client_transaction_id")]
+ public string ClientTransactionId { get; set; } = default!;
+ /// Optional tip amount in minor units, added on top of total_amount.
+ [JsonPropertyName("tip_amount")]
+ public int? TipAmount { get; set; }
+ [JsonPropertyName("total_amount")]
+ public Amount TotalAmount { get; set; } = default!;
+}
\ No newline at end of file
diff --git a/src/SumUp/Models/ReaderPaymentResponse.g.cs b/src/SumUp/Models/ReaderPaymentResponse.g.cs
new file mode 100644
index 0000000..0af90b0
--- /dev/null
+++ b/src/SumUp/Models/ReaderPaymentResponse.g.cs
@@ -0,0 +1,11 @@
+//
+#nullable enable
+
+namespace SumUp;
+
+using System.Text.Json.Serialization;
+public sealed partial class ReaderPaymentResponse
+{
+ [JsonPropertyName("data")]
+ public ReaderPaymentResponseData? Data { get; set; }
+}
\ No newline at end of file
diff --git a/src/SumUp/Models/ReaderPaymentResponseData.g.cs b/src/SumUp/Models/ReaderPaymentResponseData.g.cs
new file mode 100644
index 0000000..9f8d43e
--- /dev/null
+++ b/src/SumUp/Models/ReaderPaymentResponseData.g.cs
@@ -0,0 +1,15 @@
+//
+#nullable enable
+
+namespace SumUp;
+
+using System.Text.Json.Serialization;
+public sealed partial class ReaderPaymentResponseData
+{
+ /// Caller-supplied correlation identifier that was provided in the request.
+ [JsonPropertyName("client_transaction_id")]
+ public string? ClientTransactionId { get; set; }
+ /// Transaction code returned by the acquirer/processing entity after processing the transaction.
+ [JsonPropertyName("transaction_code")]
+ public string? TransactionCode { get; set; }
+}
\ No newline at end of file
diff --git a/src/SumUp/Options/ReadersCreateGoCheckoutOptions.g.cs b/src/SumUp/Options/ReadersCreateGoCheckoutOptions.g.cs
new file mode 100644
index 0000000..def5e48
--- /dev/null
+++ b/src/SumUp/Options/ReadersCreateGoCheckoutOptions.g.cs
@@ -0,0 +1,13 @@
+//
+#nullable enable
+
+namespace SumUp;
+
+///
+/// Optional parameters for Create a Go Reader Payment.
+///
+public sealed partial class ReadersCreateGoCheckoutOptions
+{
+ /// Access token in the format 'Bearer {token}'.
+ public string Authorization { get; set; } = default!;
+}
\ No newline at end of file
diff --git a/src/SumUp/ReadersClient.g.cs b/src/SumUp/ReadersClient.g.cs
index 98e7b90..415d946 100644
--- a/src/SumUp/ReadersClient.g.cs
+++ b/src/SumUp/ReadersClient.g.cs
@@ -17,7 +17,6 @@ public sealed partial class ReadersClient
///
/// Client for the Readers API endpoints.
///
- /// A reader represents a device that accepts payments. You can use the SumUp Solo to accept in-person payments.
internal ReadersClient(ApiClient client)
{
_client = client;
@@ -293,6 +292,164 @@ public async Task> CreateCheckoutAsync
}
}
+ ///
+ /// Create a Go Reader Payment
+ ///
+ /// Initiates a payment on the SumUp Go terminal identified by the reader ID. Use client_transaction_id as an idempotency key: retrying the request with the same value returns the result of the original payment instead of creating a duplicate.
+ /// Short unique identifier for the merchant.
+ /// The unique identifier of the reader.
+ /// Payment details to initiate on the reader.
+ /// Query and header parameters for the request.
+ /// Optional per-request overrides.
+ /// Token used to cancel the request.
+ public ApiResponse CreateGoCheckout(string merchantCode, string readerId, ReaderPaymentRequestParams body, ReadersCreateGoCheckoutOptions options, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
+ {
+ var operationOptions = options;
+ var request = _client.CreateRequest(HttpMethod.Post, "/v0/merchants/{merchant_code}/readers/{reader_id}/go-checkout", builder =>
+ {
+ builder.AddPath("merchant_code", merchantCode);
+ builder.AddPath("reader_id", readerId);
+ builder.AddHeader("Authorization", operationOptions.Authorization);
+ });
+ var effectiveCancellationToken = ApiClient.CreateCancellationToken(cancellationToken, requestOptions, out var timeoutScope);
+ try
+ {
+ _client.ApplyAuthorizationHeaderAsync(request, effectiveCancellationToken, requestOptions).GetAwaiter().GetResult();
+ if (body is not null && request.Content is null)
+ {
+ request.Content = _client.CreateContent(body, "application/json");
+ }
+
+ using var response = _client.HttpClient.SendAsync(
+ request,
+ HttpCompletionOption.ResponseHeadersRead,
+ effectiveCancellationToken).GetAwaiter().GetResult();
+
+ if (!response.IsSuccessStatusCode)
+ {
+ var responseBody = response.Content is null
+ ? null
+ : ApiClient.ReadContentAsStringAsync(response.Content, effectiveCancellationToken).GetAwaiter().GetResult();
+ switch ((int)response.StatusCode)
+ {
+ case 400:
+ {
+ var errorForStatus400 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus400, responseBody, response.RequestMessage?.RequestUri);
+ }
+ case 401:
+ {
+ var errorForStatus401 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus401, responseBody, response.RequestMessage?.RequestUri);
+ }
+ case 404:
+ {
+ var errorForStatus404 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus404, responseBody, response.RequestMessage?.RequestUri);
+ }
+ case 422:
+ {
+ var errorForStatus422 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus422, responseBody, response.RequestMessage?.RequestUri);
+ }
+ case 500:
+ {
+ var errorForStatus500 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus500, responseBody, response.RequestMessage?.RequestUri);
+ }
+ }
+ var fallbackError = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, fallbackError, responseBody, response.RequestMessage?.RequestUri);
+ }
+ using var stream = ApiClient.ReadContentAsStreamAsync(response.Content!, effectiveCancellationToken).GetAwaiter().GetResult();
+ var result = JsonSerializer.Deserialize(stream, _client.SerializerOptions);
+ return ApiResponse.From(result, response.StatusCode, response.Headers, response.RequestMessage?.RequestUri);
+ }
+ finally
+ {
+ timeoutScope?.Dispose();
+ }
+ }
+
+ ///
+ /// Create a Go Reader Payment
+ ///
+ /// Initiates a payment on the SumUp Go terminal identified by the reader ID. Use client_transaction_id as an idempotency key: retrying the request with the same value returns the result of the original payment instead of creating a duplicate.
+ /// Short unique identifier for the merchant.
+ /// The unique identifier of the reader.
+ /// Payment details to initiate on the reader.
+ /// Query and header parameters for the request.
+ /// Optional per-request overrides.
+ /// Token used to cancel the request.
+ public async Task> CreateGoCheckoutAsync(string merchantCode, string readerId, ReaderPaymentRequestParams body, ReadersCreateGoCheckoutOptions options, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
+ {
+ var operationOptions = options;
+ var request = _client.CreateRequest(HttpMethod.Post, "/v0/merchants/{merchant_code}/readers/{reader_id}/go-checkout", builder =>
+ {
+ builder.AddPath("merchant_code", merchantCode);
+ builder.AddPath("reader_id", readerId);
+ builder.AddHeader("Authorization", operationOptions.Authorization);
+ });
+ var effectiveCancellationToken = ApiClient.CreateCancellationToken(cancellationToken, requestOptions, out var timeoutScope);
+ try
+ {
+ await _client.ApplyAuthorizationHeaderAsync(request, effectiveCancellationToken, requestOptions).ConfigureAwait(false);
+ if (body is not null && request.Content is null)
+ {
+ request.Content = _client.CreateContent(body, "application/json");
+ }
+
+ using var response = await _client.HttpClient.SendAsync(
+ request,
+ HttpCompletionOption.ResponseHeadersRead,
+ effectiveCancellationToken).ConfigureAwait(false);
+
+ if (!response.IsSuccessStatusCode)
+ {
+ var responseBody = response.Content is null
+ ? null
+ : await ApiClient.ReadContentAsStringAsync(response.Content, effectiveCancellationToken).ConfigureAwait(false);
+ switch ((int)response.StatusCode)
+ {
+ case 400:
+ {
+ var errorForStatus400 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus400, responseBody, response.RequestMessage?.RequestUri);
+ }
+ case 401:
+ {
+ var errorForStatus401 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus401, responseBody, response.RequestMessage?.RequestUri);
+ }
+ case 404:
+ {
+ var errorForStatus404 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus404, responseBody, response.RequestMessage?.RequestUri);
+ }
+ case 422:
+ {
+ var errorForStatus422 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus422, responseBody, response.RequestMessage?.RequestUri);
+ }
+ case 500:
+ {
+ var errorForStatus500 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus500, responseBody, response.RequestMessage?.RequestUri);
+ }
+ }
+ var fallbackError = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, fallbackError, responseBody, response.RequestMessage?.RequestUri);
+ }
+ using var stream = await ApiClient.ReadContentAsStreamAsync(response.Content!, effectiveCancellationToken).ConfigureAwait(false);
+ var result = await JsonSerializer.DeserializeAsync(stream, _client.SerializerOptions, effectiveCancellationToken).ConfigureAwait(false);
+ return ApiResponse.From(result, response.StatusCode, response.Headers, response.RequestMessage?.RequestUri);
+ }
+ finally
+ {
+ timeoutScope?.Dispose();
+ }
+ }
+
///
/// Delete a reader
///
@@ -499,6 +656,122 @@ public async Task> GetAsync(string merchantCode, string read
}
}
+ ///
+ /// Get a Reader Checkout
+ ///
+ /// Get a Checkout for a Reader.
+ /// Merchant Code
+ /// The unique identifier of the Reader
+ /// The unique identifier of the Checkout
+ /// Optional per-request overrides.
+ /// Token used to cancel the request.
+ public ApiResponse GetCheckout(string merchantCode, string readerId, string checkoutId, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
+ {
+ var request = _client.CreateRequest(HttpMethod.Get, "/v0.1/merchants/{merchant_code}/readers/{reader_id}/checkout/{checkout_id}", builder =>
+ {
+ builder.AddPath("merchant_code", merchantCode);
+ builder.AddPath("reader_id", readerId);
+ builder.AddPath("checkout_id", checkoutId);
+ });
+ var effectiveCancellationToken = ApiClient.CreateCancellationToken(cancellationToken, requestOptions, out var timeoutScope);
+ try
+ {
+ _client.ApplyAuthorizationHeaderAsync(request, effectiveCancellationToken, requestOptions).GetAwaiter().GetResult();
+
+ using var response = _client.HttpClient.SendAsync(
+ request,
+ HttpCompletionOption.ResponseHeadersRead,
+ effectiveCancellationToken).GetAwaiter().GetResult();
+
+ if (!response.IsSuccessStatusCode)
+ {
+ var responseBody = response.Content is null
+ ? null
+ : ApiClient.ReadContentAsStringAsync(response.Content, effectiveCancellationToken).GetAwaiter().GetResult();
+ switch ((int)response.StatusCode)
+ {
+ case 401:
+ {
+ var errorForStatus401 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus401, responseBody, response.RequestMessage?.RequestUri);
+ }
+ case 404:
+ {
+ var errorForStatus404 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus404, responseBody, response.RequestMessage?.RequestUri);
+ }
+ }
+ var fallbackError = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, fallbackError, responseBody, response.RequestMessage?.RequestUri);
+ }
+ using var stream = ApiClient.ReadContentAsStreamAsync(response.Content!, effectiveCancellationToken).GetAwaiter().GetResult();
+ var result = JsonSerializer.Deserialize(stream, _client.SerializerOptions);
+ return ApiResponse.From(result, response.StatusCode, response.Headers, response.RequestMessage?.RequestUri);
+ }
+ finally
+ {
+ timeoutScope?.Dispose();
+ }
+ }
+
+ ///
+ /// Get a Reader Checkout
+ ///
+ /// Get a Checkout for a Reader.
+ /// Merchant Code
+ /// The unique identifier of the Reader
+ /// The unique identifier of the Checkout
+ /// Optional per-request overrides.
+ /// Token used to cancel the request.
+ public async Task> GetCheckoutAsync(string merchantCode, string readerId, string checkoutId, RequestOptions? requestOptions = null, CancellationToken cancellationToken = default)
+ {
+ var request = _client.CreateRequest(HttpMethod.Get, "/v0.1/merchants/{merchant_code}/readers/{reader_id}/checkout/{checkout_id}", builder =>
+ {
+ builder.AddPath("merchant_code", merchantCode);
+ builder.AddPath("reader_id", readerId);
+ builder.AddPath("checkout_id", checkoutId);
+ });
+ var effectiveCancellationToken = ApiClient.CreateCancellationToken(cancellationToken, requestOptions, out var timeoutScope);
+ try
+ {
+ await _client.ApplyAuthorizationHeaderAsync(request, effectiveCancellationToken, requestOptions).ConfigureAwait(false);
+
+ using var response = await _client.HttpClient.SendAsync(
+ request,
+ HttpCompletionOption.ResponseHeadersRead,
+ effectiveCancellationToken).ConfigureAwait(false);
+
+ if (!response.IsSuccessStatusCode)
+ {
+ var responseBody = response.Content is null
+ ? null
+ : await ApiClient.ReadContentAsStringAsync(response.Content, effectiveCancellationToken).ConfigureAwait(false);
+ switch ((int)response.StatusCode)
+ {
+ case 401:
+ {
+ var errorForStatus401 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus401, responseBody, response.RequestMessage?.RequestUri);
+ }
+ case 404:
+ {
+ var errorForStatus404 = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, errorForStatus404, responseBody, response.RequestMessage?.RequestUri);
+ }
+ }
+ var fallbackError = _client.TryDeserialize(responseBody);
+ throw new ApiException(response.StatusCode, fallbackError, responseBody, response.RequestMessage?.RequestUri);
+ }
+ using var stream = await ApiClient.ReadContentAsStreamAsync(response.Content!, effectiveCancellationToken).ConfigureAwait(false);
+ var result = await JsonSerializer.DeserializeAsync(stream, _client.SerializerOptions, effectiveCancellationToken).ConfigureAwait(false);
+ return ApiResponse.From(result, response.StatusCode, response.Headers, response.RequestMessage?.RequestUri);
+ }
+ finally
+ {
+ timeoutScope?.Dispose();
+ }
+ }
+
///
/// Get a Reader Status
///