Documentation
¶
Overview ¶
Package apicommands connects CLI commands to the OpenAPI operations exposed by the pinned SumUp Go SDK.
Index ¶
Constants ¶
View Source
const ( CatalogSDKModule = "github.com/sumup/sumup-go" CatalogSDKVersion = "v0.21.0" CatalogOpenAPIVersion = "1.0.0" CatalogSpecSHA256 = "05ccb4935d5687339dfc111cf2294a8ae36762393cde5d5ee50361a284eb5949" )
Variables ¶
View Source
var Operations = []Operation{ { ID: "CreateCheckout", Client: "Checkouts", SDKMethod: "Create", HTTPMethod: "POST", Path: "/v0.1/checkouts", Summary: "Create a checkout", Description: "Creates a payment checkout for the specified merchant, amount, and currency. Supply a `checkout_reference` to identify the payment attempt in your own systems. Creating a checkout does not charge a payment instrument.\n\nSet `hosted_checkout.enabled` to `true` to receive a [Hosted Checkout](https://developer.sumup.com/online-payments/checkouts/hosted-checkout/) URL where the customer can complete the payment.\nUse `redirect_url` for redirect-based payment and 3DS flows. If `return_url` is provided, SumUp sends processing updates to that backend callback URL.\n\nComplete the payment through [Hosted Checkout](https://developer.sumup.com/online-payments/checkouts/hosted-checkout/) or the [Payment Widget](https://developer.sumup.com/online-payments/checkouts/card-widget).", RequestBody: &RequestBody{Schema: "CheckoutCreateRequest", Required: true}, }, { ID: "CreateApplePaySession", Client: "Checkouts", SDKMethod: "CreateApplePaySession", HTTPMethod: "PUT", Path: "/v0.2/checkouts/{checkout_id}/apple-pay-session", 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.", Parameters: []Parameter{ {Name: "checkout_id", Location: "path", Description: "SumUp-generated `id` returned when creating a checkout. Use this value to retrieve, update, process, or deactivate the checkout.", Type: "string", Format: "", Required: true}, }, RequestBody: &RequestBody{Schema: "object", Required: false}, }, { ID: "DeactivateCheckout", Client: "Checkouts", SDKMethod: "Deactivate", HTTPMethod: "DELETE", Path: "/v0.1/checkouts/{checkout_id}", Summary: "Deactivate a checkout", Description: "Deactivates an identified checkout resource. If the checkout has already been processed it can not be deactivated.", Parameters: []Parameter{ {Name: "checkout_id", Location: "path", Description: "SumUp-generated `id` returned when creating a checkout. Use this value to retrieve, update, process, or deactivate the checkout.", Type: "string", Format: "", Required: true}, }, }, { ID: "GetCheckout", Client: "Checkouts", SDKMethod: "Get", HTTPMethod: "GET", Path: "/v0.1/checkouts/{checkout_id}", Summary: "Retrieve a checkout", Description: "Retrieves a checkout by its SumUp `checkout_id`. After processing a payment, returning from a redirect, or receiving a checkout notification, retrieve the checkout to confirm its current `status` before updating your order or displaying the payment outcome to the payer.", Parameters: []Parameter{ {Name: "checkout_id", Location: "path", Description: "SumUp-generated `id` returned when creating a checkout. Use this value to retrieve, update, process, or deactivate the checkout.", Type: "string", Format: "", Required: true}, }, }, { ID: "ListCheckouts", Client: "Checkouts", SDKMethod: "List", HTTPMethod: "GET", Path: "/v0.1/checkouts", Summary: "List checkouts", Description: "Lists created checkout resources according to the applied `checkout_reference`.", Parameters: []Parameter{ {Name: "checkout_reference", Location: "query", Description: "Filters checkouts by the merchant-defined `checkout_reference` supplied when creating the checkout. This is separate from the SumUp-generated checkout `id`.", Type: "string", Format: "", Required: false}, }, }, { ID: "GetPaymentMethods", Client: "Checkouts", SDKMethod: "ListAvailablePaymentMethods", HTTPMethod: "GET", Path: "/v0.1/merchants/{merchant_code}/payment-methods", Summary: "Get available payment methods", Description: "Lists the payment methods available to the merchant for checkout payments. Use the optional amount and currency filters to check eligibility for a particular payment before presenting payment options to the payer.", Parameters: []Parameter{ {Name: "merchant_code", Location: "path", Description: "Short unique identifier for the merchant.", Type: "string", Format: "", Required: true}, {Name: "amount", Location: "query", Description: "Payment amount in major units, for example `9.99` for EUR 9.99. When filtering by `amount`, also provide `currency`.", Type: "number", Format: "", Required: false}, {Name: "currency", Location: "query", Description: "Three-letter ISO 4217 currency code for which the payment methods should be eligible, for example `EUR`.", Type: "string", Format: "", Required: false}, }, }, { ID: "ProcessCheckout", Client: "Checkouts", SDKMethod: "Process", HTTPMethod: "PUT", Path: "/v0.1/checkouts/{checkout_id}", Summary: "Process a checkout", Description: ":::caution[PCI DSS compliance required]\nWhen you submit raw card details directly to the Checkout API, your systems store, process, or transmit cardholder data and are therefore subject to applicable [PCI DSS requirements](https://www.pcisecuritystandards.org/document_library/). You should only use this integration if your environment is appropriately PCI DSS compliant.\n:::\n\nProcessing 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\nA processing response can require an additional payer action, such as a 3DS challenge or a payment-provider redirect. If `next_step` is returned, follow its instructions to continue the payment flow.\n\nRetrieve the checkout afterwards to confirm its payment status. Acceptance of the processing request does not by itself mean the checkout is paid.", Unsupported: true, Parameters: []Parameter{ {Name: "checkout_id", Location: "path", Description: "SumUp-generated `id` returned when creating a checkout. Use this value to retrieve, update, process, or deactivate the checkout.", Type: "string", Format: "", Required: true}, }, RequestBody: &RequestBody{Schema: "ProcessCheckout", Required: true}, }, { ID: "UpdateCheckout", Client: "Checkouts", SDKMethod: "Update", HTTPMethod: "PATCH", Path: "/v0.1/checkouts/{checkout_id}", Summary: "Update a checkout", Description: "Updates the amount, currency, description, reference, expiration, or customer associated with an existing checkout. Only the supplied fields are updated.\n\nThis request changes the checkout details; it does not charge a payment instrument. Process the checkout separately to attempt a payment.", Parameters: []Parameter{ {Name: "checkout_id", Location: "path", Description: "SumUp-generated `id` returned when creating a checkout. Use this value to retrieve, update, process, or deactivate the checkout.", Type: "string", Format: "", Required: true}, }, RequestBody: &RequestBody{Schema: "CheckoutUpdateRequest", Required: true}, }, { ID: "CreateCustomer", Client: "Customers", SDKMethod: "Create", HTTPMethod: "POST", Path: "/v0.1/customers", Summary: "Create a customer", Description: "Creates a customer using the `customer_id` you supply. Choose an identifier that maps to the payer in your own system and reuse it when retrieving the customer or associating checkouts and saved payment instruments with them.", RequestBody: &RequestBody{Schema: "Customer", Required: true}, }, { ID: "DeactivatePaymentInstrument", Client: "Customers", SDKMethod: "DeactivatePaymentInstrument", HTTPMethod: "DELETE", Path: "/v0.1/customers/{customer_id}/payment-instruments/{token}", Summary: "Deactivate a payment instrument", Description: "Deactivates an identified card payment instrument resource for a customer.", Parameters: []Parameter{ {Name: "customer_id", Location: "path", Description: "The `customer_id` you supplied when creating the customer.", Type: "string", Format: "", Required: true}, {Name: "token", Location: "path", Description: "Unique token identifying the card saved as a payment instrument resource.", Type: "string", Format: "", Required: true}, }, }, { ID: "GetCustomer", Client: "Customers", SDKMethod: "Get", HTTPMethod: "GET", Path: "/v0.1/customers/{customer_id}", Summary: "Retrieve a customer", Description: "Retrieves a saved customer using the `customer_id` you supplied when creating the customer.", Parameters: []Parameter{ {Name: "customer_id", Location: "path", Description: "The `customer_id` you supplied when creating the customer.", Type: "string", Format: "", Required: true}, }, }, { ID: "ListPaymentInstruments", Client: "Customers", SDKMethod: "ListPaymentInstruments", HTTPMethod: "GET", Path: "/v0.1/customers/{customer_id}/payment-instruments", Summary: "List payment instruments", Description: "Lists all payment instrument resources that are saved for an identified customer.", Parameters: []Parameter{ {Name: "customer_id", Location: "path", Description: "The `customer_id` you supplied when creating the customer.", Type: "string", Format: "", Required: true}, }, }, { ID: "UpdateCustomer", Client: "Customers", SDKMethod: "Update", HTTPMethod: "PUT", Path: "/v0.1/customers/{customer_id}", 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.", Parameters: []Parameter{ {Name: "customer_id", Location: "path", Description: "The `customer_id` you supplied when creating the customer.", Type: "string", Format: "", Required: true}, }, RequestBody: &RequestBody{Schema: "object", Required: true}, }, { ID: "CreateMerchantMember", Client: "Members", SDKMethod: "Create", HTTPMethod: "POST", Path: "/v0.1/merchants/{merchant_code}/members", Summary: "Create a member", Description: "Adds a member to the merchant account with the specified roles.\n\nBy default, sends an invitation email to the provided address. The recipient must accept the invitation to join the account.\nWhen `is_managed_user` is `true`, creates a managed user with the provided password and optional nickname and assigns the roles directly, without sending an invitation.", Parameters: []Parameter{ {Name: "merchant_code", Location: "path", Description: "Short unique identifier for the merchant.", Type: "string", Format: "", Required: true}, }, RequestBody: &RequestBody{Schema: "object", Required: true}, }, { ID: "DeleteMerchantMember", Client: "Members", SDKMethod: "Delete", HTTPMethod: "DELETE", Path: "/v0.1/merchants/{merchant_code}/members/{member_id}", Summary: "Delete a member", Description: "Deletes a merchant member.", Parameters: []Parameter{ {Name: "merchant_code", Location: "path", Description: "Short unique identifier for the merchant.", Type: "string", Format: "", Required: true}, {Name: "member_id", Location: "path", Description: "The ID of the member to retrieve.", Type: "string", Format: "", Required: true}, }, }, { ID: "GetMerchantMember", Client: "Members", SDKMethod: "Get", HTTPMethod: "GET", Path: "/v0.1/merchants/{merchant_code}/members/{member_id}", Summary: "Retrieve a member", Description: "Retrieve a merchant member.", Parameters: []Parameter{ {Name: "merchant_code", Location: "path", Description: "Short unique identifier for the merchant.", Type: "string", Format: "", Required: true}, {Name: "member_id", Location: "path", Description: "The ID of the member to retrieve.", Type: "string", Format: "", Required: true}, }, }, { ID: "ListMerchantMembers", Client: "Members", SDKMethod: "List", HTTPMethod: "GET", Path: "/v0.1/merchants/{merchant_code}/members", Summary: "List members", Description: "Lists merchant members.", Parameters: []Parameter{ {Name: "offset", Location: "query", Description: "Offset of the first member to return.", Type: "integer", Format: "", Required: false}, {Name: "limit", Location: "query", Description: "Maximum number of members to return.", Type: "integer", Format: "", Required: false}, {Name: "scroll", Location: "query", Description: "Indicates to skip count query.", Type: "boolean", Format: "", Required: false}, {Name: "email", Location: "query", Description: "Filter the returned members by email address prefix.", Type: "string", Format: "", Required: false}, {Name: "user.id", Location: "query", Description: "Search for a member by user id.", Type: "string", Format: "uuid", Required: false}, {Name: "status", Location: "query", Description: "Filter the returned members by the membership status.", Type: "MembershipStatus", Format: "", Required: false}, {Name: "roles", Location: "query", Description: "Filter the returned members by role.", Type: "array", Format: "", Required: false}, {Name: "merchant_code", Location: "path", Description: "Short unique identifier for the merchant.", Type: "string", Format: "", Required: true}, }, }, { ID: "UpdateMerchantMember", Client: "Members", SDKMethod: "Update", HTTPMethod: "PUT", Path: "/v0.1/merchants/{merchant_code}/members/{member_id}", Summary: "Update a member", Description: "Updates a merchant member and returns the updated member.\n\nProviding `roles` replaces the member's assigned roles and can grant or revoke access. Providing `metadata` replaces the entire metadata object.\nFor managed users, `user.nickname` changes the display name and `user.password` replaces the password. Updating the password also enables the managed user account.", Parameters: []Parameter{ {Name: "merchant_code", Location: "path", Description: "Short unique identifier for the merchant.", Type: "string", Format: "", Required: true}, {Name: "member_id", Location: "path", Description: "The ID of the member to retrieve.", Type: "string", Format: "", Required: true}, }, RequestBody: &RequestBody{Schema: "object", Required: true}, }, { ID: "ListMemberships", Client: "Memberships", SDKMethod: "List", HTTPMethod: "GET", Path: "/v0.1/memberships", Summary: "List memberships", Description: "List memberships of the current user.", Parameters: []Parameter{ {Name: "offset", Location: "query", Description: "Offset of the first member to return.", Type: "integer", Format: "", Required: false}, {Name: "limit", Location: "query", Description: "Maximum number of members to return.", Type: "integer", Format: "", Required: false}, {Name: "kind", Location: "query", Description: "Filter memberships by resource kind.", Type: "ResourceType", Format: "", Required: false}, {Name: "status", Location: "query", Description: "Filter the returned memberships by the membership status.", Type: "MembershipStatus", Format: "", Required: false}, {Name: "resource.type", Location: "query", Description: "Filter memberships by resource kind.", Type: "ResourceType", Format: "", Required: false}, {Name: "resource.attributes.sandbox", Location: "query", Description: "Filter memberships by the sandbox status of the resource the membership is in.", Type: "boolean", Format: "", Required: false}, {Name: "resource.name", Location: "query", Description: "Filter memberships by the name of the resource the membership is in.", Type: "string", Format: "", Required: false}, {Name: "resource.id", Location: "query", Description: "Filter memberships by the ID of the resource the membership is in.", Type: "string", Format: "", Required: false}, {Name: "resource.parent.id", Location: "query", Description: "Filter memberships by the parent of the resource the membership is in.\nOmit both `resource.parent.id` and `resource.parent.type` to skip parent filtering. When filtering by parent, both parameters must be present. To select resources without a parent, set each parameter to an empty value. Otherwise, both parameters must identify a parent.", Type: "string", Format: "", Required: false}, {Name: "resource.parent.type", Location: "query", Description: "Filter memberships by the parent of the resource the membership is in.\nOmit both `resource.parent.id` and `resource.parent.type` to skip parent filtering. When filtering by parent, both parameters must be present. To select resources without a parent, set each parameter to an empty value. Otherwise, both parameters must identify a parent.", Type: "ResourceType", Format: "", Required: false}, {Name: "roles", Location: "query", Description: "Filter the returned memberships by role.", Type: "array", Format: "", Required: false}, }, }, { ID: "GetMerchant", Client: "Merchants", SDKMethod: "Get", HTTPMethod: "GET", Path: "/v1/merchants/{merchant_code}", Summary: "Get Merchant", Description: "Returns a Merchant for a valid Merchant code.", Parameters: []Parameter{ {Name: "merchant_code", Location: "path", Description: "Short unique identifier for the merchant.", Type: "string", Format: "", Required: true}, }, }, { ID: "GetPerson", Client: "Merchants", SDKMethod: "GetPerson", HTTPMethod: "GET", Path: "/v1/merchants/{merchant_code}/persons/{person_id}", Summary: "Get Person", Description: "Returns a single Person related to a Merchant.", Parameters: []Parameter{ {Name: "merchant_code", Location: "path", Description: "Short unique identifier for the merchant.", Type: "string", Format: "", Required: true}, {Name: "person_id", Location: "path", Description: "Person ID", Type: "string", Format: "", Required: true}, }, }, { ID: "ListPersons", Client: "Merchants", SDKMethod: "ListPersons", HTTPMethod: "GET", Path: "/v1/merchants/{merchant_code}/persons", Summary: "List Persons", Description: "Returns the Persons related to a Merchant.", Parameters: []Parameter{ {Name: "merchant_code", Location: "path", Description: "Short unique identifier for the merchant.", Type: "string", Format: "", Required: true}, }, }, { ID: "ListPayoutsV1", Client: "Payouts", SDKMethod: "List", HTTPMethod: "GET", Path: "/v1.0/merchants/{merchant_code}/payouts", Summary: "List payouts", Description: "Lists payout and payout-deduction records for the specified merchant account within the requested date range.\n\nThe response can include:\n- regular payouts (`type = PAYOUT`)\n- deduction records for refunds, chargebacks, direct debit returns, or balance adjustments\n\nResults are sorted by payout date in the requested `order`.", Parameters: []Parameter{ {Name: "merchant_code", Location: "path", Description: "Short unique identifier for the merchant.", Type: "string", Format: "", Required: true}, {Name: "start_date", Location: "query", Description: "Start date of the payout period filter, inclusive, in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) `date` format (`YYYY-MM-DD`).", Type: "string", Format: "date", Required: true}, {Name: "end_date", Location: "query", Description: "End date of the payout period filter, inclusive, in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) `date` format (`YYYY-MM-DD`). Must be greater than or equal to `start_date`.", Type: "string", Format: "date", Required: true}, {Name: "format", Location: "query", Description: "Response format for the payout list.", Type: "string", Format: "", Required: false}, {Name: "limit", Location: "query", Description: "Maximum number of payout records to return.", Type: "integer", Format: "", Required: false}, {Name: "order", Location: "query", Description: "Sort direction for the returned payouts.", Type: "string", Format: "", Required: false}, }, }, { ID: "CreateReader", Client: "Readers", SDKMethod: "Create", HTTPMethod: "POST", Path: "/v0.1/merchants/{merchant_code}/readers", Summary: "Create a Reader", Description: "Create a new Reader for the merchant account.", Parameters: []Parameter{ {Name: "merchant_code", Location: "path", Description: "Short unique identifier for the merchant.", Type: "string", Format: "", Required: true}, }, RequestBody: &RequestBody{Schema: "object", Required: true}, }, { ID: "CreateReaderCheckout", Client: "Readers", SDKMethod: "CreateCheckout", HTTPMethod: "POST", Path: "/v0.1/merchants/{merchant_code}/readers/{reader_id}/checkout", Summary: "Create a Reader Checkout", Description: "Creates a Checkout for a Reader.\n\nThis process is asynchronous and the actual transaction may take some time to be started on the device.\n\n\nThere are some caveats when using this endpoint:\n* The target device must be online, otherwise checkout won't be accepted\n* After the checkout is accepted, the system has 60 seconds to start the payment on the target device. During this time, any other checkout for the same device will be rejected.\n\n\n**Note**: If the target device is a Solo, it must be in version 3.3.24.3 or higher.\n\n\nOptionally include an `affiliate` object to attach integrator metadata to the payment.\nProvide both `app_id` and `key` when including this object.", Parameters: []Parameter{ {Name: "merchant_code", Location: "path", Description: "Merchant Code", Type: "string", Format: "", Required: true}, {Name: "reader_id", Location: "path", Description: "The unique identifier of the Reader", Type: "string", Format: "", Required: true}, }, RequestBody: &RequestBody{Schema: "CreateReaderCheckoutRequest", Required: true}, }, { ID: "CreateGoReaderCheckout", Client: "Readers", SDKMethod: "CreateGoCheckout", HTTPMethod: "POST", Path: "/v0/merchants/{merchant_code}/readers/{reader_id}/go-checkout", 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: []Parameter{ {Name: "merchant_code", Location: "path", Description: "Short unique identifier for the merchant.", Type: "string", Format: "", Required: true}, {Name: "reader_id", Location: "path", Description: "The unique identifier of the reader.", Type: "ReaderID", Format: "", Required: true}, }, RequestBody: &RequestBody{Schema: "ReaderPaymentRequestParams", Required: true}, }, { ID: "DeleteReader", Client: "Readers", SDKMethod: "Delete", HTTPMethod: "DELETE", Path: "/v0.1/merchants/{merchant_code}/readers/{reader_id}", Summary: "Delete a reader", Description: "Delete a reader.", Parameters: []Parameter{ {Name: "merchant_code", Location: "path", Description: "Short unique identifier for the merchant.", Type: "string", Format: "", Required: true}, {Name: "reader_id", Location: "path", Description: "The unique identifier of the reader.", Type: "ReaderID", Format: "", Required: true}, }, }, { ID: "GetReader", Client: "Readers", SDKMethod: "Get", HTTPMethod: "GET", Path: "/v0.1/merchants/{merchant_code}/readers/{reader_id}", Summary: "Retrieve a Reader", Description: "Retrieve a Reader.", Parameters: []Parameter{ {Name: "If-Modified-Since", Location: "header", Description: "Return the reader only if it has been modified after the specified timestamp given in the headers.\n\nTimestamps are accepted in the following formats:\n\n - HTTP Standard: [IMF format (RFC 5322)](https://www.rfc-editor.org/rfc/rfc5322#section-3.3), sometimes also referred to as [RFC 7231](https://www.rfc-editor.org/rfc/rfc7231#section-7.1.1.1).\n - RFC 3339: Used for timestamps in JSON payloads on this API.", Type: "string", Format: "", Required: false}, {Name: "merchant_code", Location: "path", Description: "Short unique identifier for the merchant.", Type: "string", Format: "", Required: true}, {Name: "reader_id", Location: "path", Description: "The unique identifier of the reader.", Type: "ReaderID", Format: "", Required: true}, }, }, { ID: "GetReaderCheckout", Client: "Readers", SDKMethod: "GetCheckout", HTTPMethod: "GET", Path: "/v0.1/merchants/{merchant_code}/readers/{reader_id}/checkout/{checkout_id}", Summary: "Get a Reader Checkout", Description: "Get a Checkout for a Reader.", Parameters: []Parameter{ {Name: "merchant_code", Location: "path", Description: "Merchant Code", Type: "string", Format: "", Required: true}, {Name: "reader_id", Location: "path", Description: "The unique identifier of the Reader", Type: "string", Format: "", Required: true}, {Name: "checkout_id", Location: "path", Description: "The unique identifier of the Checkout", Type: "string", Format: "", Required: true}, }, }, { ID: "GetReaderSettings", Client: "Readers", SDKMethod: "GetReaderSettings", HTTPMethod: "GET", Path: "/v0.1/merchants/{merchant_code}/readers/{reader_id}/settings", Summary: "Get Reader Settings", Description: "Returns the menu lock settings for a Solo reader.\n\nFor an online reader, returns the current settings. For an offline reader,\nreturns the last saved settings, which may differ from its current configuration.\nReturns `404` if the reader is offline and no saved settings are available.\n\nThe response may include the menu lock PIN.", Parameters: []Parameter{ {Name: "merchant_code", Location: "path", Description: "The merchant code of the account that owns the reader.", Type: "string", Format: "", Required: true}, {Name: "reader_id", Location: "path", Description: "The unique identifier of the reader.", Type: "string", Format: "", Required: true}, }, }, { ID: "GetReaderStatus", Client: "Readers", SDKMethod: "GetStatus", HTTPMethod: "GET", Path: "/v0.1/merchants/{merchant_code}/readers/{reader_id}/status", Summary: "Get a Reader Status", Description: "Provides the last known status for a Reader.\n\nThis endpoint allows you to retrieve updates from the connected card reader, including the current screen being displayed during the payment process and the device status (battery level, connectivity, and update state).\n\nSupported States\n\n* `IDLE` – Reader ready for next transaction\n* `SELECTING_TIP` – Waiting for tip input\n* `WAITING_FOR_CARD` – Awaiting card insert/tap\n* `WAITING_FOR_PIN` – Waiting for PIN entry\n* `WAITING_FOR_SIGNATURE` – Waiting for customer signature\n* `UPDATING_FIRMWARE` – Firmware update in progress\n\nDevice Status\n\n* `ONLINE` – Device connected and operational\n* `OFFLINE` – Device disconnected (last state persisted)\n\n**Note**: If the target device is a Solo, it must be in version 3.3.39.0 or higher.", Parameters: []Parameter{ {Name: "merchant_code", Location: "path", Description: "Merchant Code", Type: "string", Format: "", Required: true}, {Name: "reader_id", Location: "path", Description: "The unique identifier of the Reader", Type: "string", Format: "", Required: true}, }, }, { ID: "ListReaders", Client: "Readers", SDKMethod: "List", HTTPMethod: "GET", Path: "/v0.1/merchants/{merchant_code}/readers", Summary: "List Readers", Description: "List all readers of the merchant.", Parameters: []Parameter{ {Name: "merchant_code", Location: "path", Description: "Short unique identifier for the merchant.", Type: "string", Format: "", Required: true}, }, }, { ID: "CreateReaderTerminate", Client: "Readers", SDKMethod: "TerminateCheckout", HTTPMethod: "POST", Path: "/v0.1/merchants/{merchant_code}/readers/{reader_id}/terminate", Summary: "Terminate a Reader Checkout", Description: "Terminate a Reader Checkout stops the current transaction on the target device.\n\nThis process is asynchronous and the actual termination may take some time to be performed on the device.\n\n\nThere are some caveats when using this endpoint:\n* The target device must be online, otherwise terminate won't be accepted\n* The action will succeed only if the device is waiting for cardholder action: e.g: waiting for card, waiting for PIN, etc.\n* There is no confirmation of the termination.\n\nIf a transaction is successfully terminated and `return_url` was provided on Checkout, the transaction status will be sent as `failed` to the provided URL.\n\n\n**Note**: If the target device is a Solo, it must be in version 3.3.28.0 or higher.", Parameters: []Parameter{ {Name: "merchant_code", Location: "path", Description: "Merchant Code", Type: "string", Format: "", Required: true}, {Name: "reader_id", Location: "path", Description: "The unique identifier of the Reader", Type: "string", Format: "", Required: true}, }, RequestBody: &RequestBody{Schema: "", Required: false}, }, { ID: "UpdateReader", Client: "Readers", SDKMethod: "Update", HTTPMethod: "PATCH", Path: "/v0.1/merchants/{merchant_code}/readers/{reader_id}", Summary: "Update a Reader", Description: "Updates a reader's name or metadata and returns the updated reader.\n\nProviding `metadata` replaces the entire metadata object; include all entries that should be retained. Omitted fields remain unchanged.", Parameters: []Parameter{ {Name: "merchant_code", Location: "path", Description: "Short unique identifier for the merchant.", Type: "string", Format: "", Required: true}, {Name: "reader_id", Location: "path", Description: "The unique identifier of the reader.", Type: "ReaderID", Format: "", Required: true}, }, RequestBody: &RequestBody{Schema: "object", Required: true}, }, { ID: "UpdateReaderSettings", Client: "Readers", SDKMethod: "UpdateReaderSettings", HTTPMethod: "PATCH", Path: "/v0.1/merchants/{merchant_code}/readers/{reader_id}/settings", Summary: "Update Reader Settings", Description: "Updates the menu lock settings for a Solo reader. The reader must be online.\nA successful response confirms that the reader applied the update.\n\nInclude at least one of `menu_lock.enabled` or `menu_lock.passcode`.\nOmitted settings keep their current values. The response contains only the\nsettings included in the request.\n\nWhen enabling menu lock for a reader without a PIN, include a four-digit PIN\nin `menu_lock.passcode` in the same request.", Parameters: []Parameter{ {Name: "merchant_code", Location: "path", Description: "The merchant code of the account that owns the reader.", Type: "string", Format: "", Required: true}, {Name: "reader_id", Location: "path", Description: "The unique identifier of the reader.", Type: "string", Format: "", Required: true}, }, RequestBody: &RequestBody{Schema: "UpdateReaderSettingsRequest", Required: true}, }, { ID: "GetReceipt", Client: "Receipts", SDKMethod: "Get", HTTPMethod: "GET", Path: "/v1.1/receipts/{transaction_id}", Summary: "Retrieve receipt details", Description: "Retrieves structured receipt data for a transaction belonging to the merchant specified by `mid`. The path accepts either the SumUp transaction ID or transaction code. Provide `tx_event_id` to include a specific transaction event, such as a refund, on the receipt.", Parameters: []Parameter{ {Name: "transaction_id", Location: "path", Description: "SumUp unique transaction ID or transaction code, e.g. TS7HDYLSKD.", Type: "string", Format: "", Required: true}, {Name: "mid", Location: "query", Description: "Short unique identifier for the merchant.", Type: "string", Format: "", Required: true}, {Name: "tx_event_id", Location: "query", Description: "Unique identifier of the transaction event to include on the receipt.", Type: "integer", Format: "", Required: false}, }, }, { ID: "CreateMerchantRole", Client: "Roles", SDKMethod: "Create", HTTPMethod: "POST", Path: "/v0.1/merchants/{merchant_code}/roles", Summary: "Create a role", Description: "Create a custom role for the merchant. Roles are defined by the set of permissions that they grant to the members that they are assigned to.", Parameters: []Parameter{ {Name: "merchant_code", Location: "path", Description: "Short unique identifier for the merchant.", Type: "string", Format: "", Required: true}, }, RequestBody: &RequestBody{Schema: "object", Required: true}, }, { ID: "DeleteMerchantRole", Client: "Roles", SDKMethod: "Delete", HTTPMethod: "DELETE", Path: "/v0.1/merchants/{merchant_code}/roles/{role_id}", Summary: "Delete a role", Description: "Delete a custom role.", Parameters: []Parameter{ {Name: "merchant_code", Location: "path", Description: "Short unique identifier for the merchant.", Type: "string", Format: "", Required: true}, {Name: "role_id", Location: "path", Description: "The ID of the role to retrieve.", Type: "string", Format: "", Required: true}, }, }, { ID: "GetMerchantRole", Client: "Roles", SDKMethod: "Get", HTTPMethod: "GET", Path: "/v0.1/merchants/{merchant_code}/roles/{role_id}", Summary: "Retrieve a role", Description: "Retrieve a custom role by ID.", Parameters: []Parameter{ {Name: "merchant_code", Location: "path", Description: "Short unique identifier for the merchant.", Type: "string", Format: "", Required: true}, {Name: "role_id", Location: "path", Description: "The ID of the role to retrieve.", Type: "string", Format: "", Required: true}, }, }, { ID: "ListMerchantRoles", Client: "Roles", SDKMethod: "List", HTTPMethod: "GET", Path: "/v0.1/merchants/{merchant_code}/roles", Summary: "List roles", Description: "List merchant's custom roles.", Parameters: []Parameter{ {Name: "merchant_code", Location: "path", Description: "Short unique identifier for the merchant.", Type: "string", Format: "", Required: true}, }, }, { ID: "UpdateMerchantRole", Client: "Roles", SDKMethod: "Update", HTTPMethod: "PATCH", Path: "/v0.1/merchants/{merchant_code}/roles/{role_id}", Summary: "Update a role", Description: "Updates a custom role's name, description, or permissions and returns the updated role.\n\nProviding `permissions` replaces the role's permission list and changes the access granted to members assigned to that role. Omitted fields remain unchanged.", Parameters: []Parameter{ {Name: "merchant_code", Location: "path", Description: "Short unique identifier for the merchant.", Type: "string", Format: "", Required: true}, {Name: "role_id", Location: "path", Description: "The ID of the role to retrieve.", Type: "string", Format: "", Required: true}, }, RequestBody: &RequestBody{Schema: "object", Required: true}, }, { ID: "CreateMerchantToken", Client: "Tokens", SDKMethod: "Create", HTTPMethod: "POST", Path: "/v0.1/merchants/{merchant_code}/tokens", Summary: "Create a merchant token", Description: "Creates a short-lived token for the merchant account identified by `merchant_code` and the requested actions.\n\nCall this endpoint from your backend using a [supported authentication method](https://developer.sumup.com/api/authentication). You must have access to the merchant account. Before returning the token, check that the user signed in to your application is allowed to accept payments for that account.\n\nPass the returned `access_token` to the SDK. The token expires 15 minutes after creation; use `expires_in` for its remaining lifetime. To continue after it expires, create a new token through this endpoint.", Parameters: []Parameter{ {Name: "merchant_code", Location: "path", Description: "Unique code of the merchant account that will receive the payments.", Type: "string", Format: "", Required: true}, }, RequestBody: &RequestBody{Schema: "object", Required: true}, }, { ID: "GetTransactionV2.1", Client: "Transactions", SDKMethod: "Get", HTTPMethod: "GET", Path: "/v2.1/merchants/{merchant_code}/transactions", Summary: "Retrieve a transaction", Description: "Retrieves the full details of an identified transaction. The transaction resource is identified by a query parameter and *one* of following parameters is required:\n- `id`\n- `transaction_code`\n- `foreign_transaction_id`\n- `client_transaction_id`", Parameters: []Parameter{ {Name: "merchant_code", Location: "path", Description: "Short unique identifier for the merchant.", Type: "string", Format: "", Required: true}, {Name: "id", Location: "query", Description: "Retrieves the transaction resource with the specified transaction ID (the `id` parameter in the transaction resource).", Type: "string", Format: "", Required: false}, {Name: "transaction_code", Location: "query", Description: "Retrieves the transaction resource with the specified transaction code.", Type: "string", Format: "", Required: false}, {Name: "foreign_transaction_id", Location: "query", Description: "External transaction identifier supplied by the client.", Type: "string", Format: "", Required: false}, {Name: "client_transaction_id", Location: "query", Description: "Client-supplied identifier of the transaction.", Type: "string", Format: "", Required: false}, }, }, { ID: "ListTransactionsV2.1", Client: "Transactions", SDKMethod: "List", HTTPMethod: "GET", Path: "/v2.1/merchants/{merchant_code}/transactions/history", Summary: "List transactions", Description: "Lists transaction history for the merchant, with optional filters for payment type, status, and date range. The response contains the current page in `items` and pagination query strings in `links`.\n\nTo request another page, use the query string from the relevant link's `href` with this history endpoint. Use `changes_since` when retrieving transactions modified since a previous synchronization, including transactions created earlier whose status has changed.", Parameters: []Parameter{ {Name: "merchant_code", Location: "path", Description: "Short unique identifier for the merchant.", Type: "string", Format: "", Required: true}, {Name: "transaction_code", Location: "query", Description: "Retrieves the transaction resource with the specified transaction code.", Type: "string", Format: "", Required: false}, {Name: "order", Location: "query", Description: "Sort direction for the transaction history. Use `ascending` or `descending`; the default is `ascending`.", Type: "string", Format: "", Required: false}, {Name: "limit", Location: "query", Description: "Maximum number of transactions per page. Must be a positive integer. Defaults to `10` when omitted; a page can contain fewer results.", Type: "integer", Format: "", Required: false}, {Name: "users[]", Location: "query", Description: "Filters transactions by user email. For multiple values, repeat the query parameter, for example `users[]=first@example.com&users[]=second@example.com`.", Type: "array", Format: "", Required: false}, {Name: "statuses[]", Location: "query", Description: "Filters transactions by the listed final statuses. For multiple values, repeat the query parameter, for example `statuses[]=SUCCESSFUL&statuses[]=REFUNDED`.", Type: "array", Format: "", Required: false}, {Name: "payment_types[]", Location: "query", Description: "Filters the returned results by the specified list of payment types used for the transactions.", Type: "array", Format: "", Required: false}, {Name: "entry_modes[]", Location: "query", Description: "Filters the returned results by the specified list of entry modes.", Type: "array", Format: "", Required: false}, {Name: "types[]", Location: "query", Description: "Filters the returned results by the specified list of transaction types.", Type: "array", Format: "", Required: false}, {Name: "changes_since", Location: "query", Description: "Filters the results by the latest modification time of resources and returns only transactions that are modified *at or after* the specified timestamp (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format).", Type: "string", Format: "date-time", Required: false}, {Name: "newest_time", Location: "query", Description: "Filters the results by the creation time of resources and returns only transactions that are created *before* the specified timestamp (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format).", Type: "string", Format: "date-time", Required: false}, {Name: "newest_ref", Location: "query", Description: "Pagination reference that returns results before the specified reference. Use the value from a returned pagination link rather than constructing it yourself. This parameter takes precedence over `newest_time` when both are provided.", Type: "string", Format: "", Required: false}, {Name: "oldest_time", Location: "query", Description: "Filters the results by the creation time of resources and returns only transactions that are created *at or after* the specified timestamp (in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format).", Type: "string", Format: "date-time", Required: false}, {Name: "oldest_ref", Location: "query", Description: "Pagination reference that returns results after the specified reference. Use the value from a returned pagination link rather than constructing it yourself. This parameter takes precedence over `oldest_time` when both are provided.", Type: "string", Format: "", Required: false}, }, }, { ID: "RefundTransaction", Client: "Transactions", SDKMethod: "Refund", HTTPMethod: "POST", Path: "/v1.0/merchants/{merchant_code}/payments/{transaction_id}/refunds", Summary: "Refund a transaction", Description: "Refunds a transaction identified by its SumUp transaction ID. Omit the request body to request a full refund, or provide `amount` for a partial refund in the transaction's currency.\n\nRetrieve the transaction afterwards to inspect its refunded amount and refund events. The transaction must be eligible for a refund; see the error responses for invalid amounts, permissions, and processing failures.", Parameters: []Parameter{ {Name: "merchant_code", Location: "path", Description: "Short unique identifier for the merchant.", Type: "string", Format: "", Required: true}, {Name: "transaction_id", Location: "path", Description: "Unique identifier of the transaction.", Type: "string", Format: "", Required: true}, }, RequestBody: &RequestBody{Schema: "object", Required: false}, }, }
Functions ¶
Types ¶
type Operation ¶
type Operation struct {
ID string
Client string
SDKMethod string
HTTPMethod string
Path string
Summary string
Description string
Unsupported bool
Parameters []Parameter
RequestBody *RequestBody
}
Operation describes one SDK method generated from an OpenAPI operation.
type Parameter ¶
type Parameter struct {
Name string
Location string
Description string
Type string
Format string
Required bool
}
Parameter describes an OpenAPI operation parameter.
type RequestBody ¶
RequestBody describes the JSON request body accepted by an operation.
Click to show internal directories.
Click to hide internal directories.