### Install Go SDK Source: https://developer.sumup.com/api/authentication Install the SumUp SDK for Go using go get. ```bash go get github.com/sumup/sumup-go ``` -------------------------------- ### Get Customer using Go SDK Source: https://developer.sumup.com/api/customers/deactivate-payment-instrument Obtain customer details using the SumUp Go SDK. This example initializes the client and calls the `Get` method for customers. ```go client := sumup.NewClient() result, err := client.Customers.Get(context.Background(), "customer_id") ``` -------------------------------- ### Create Customer using Rust SDK Source: https://developer.sumup.com/api/customers/deactivate-payment-instrument This Rust example shows how to create a customer using the SumUp Rust SDK. Use `Client::default()` to get a client and call `customers().create`. ```rust use sumup::Client; let client = Client::default(); let result = client.customers().create(sumup::CreateCustomerBody{ customer_id: "831ff8d4cd5958ab5670".to_string(), }).await; ``` -------------------------------- ### Get Customer using .NET SDK Source: https://developer.sumup.com/api/customers/deactivate-payment-instrument Fetch customer information with the SumUp .NET SDK. This example demonstrates initializing the client and asynchronously retrieving customer data. ```csharp using SumUp; var client = new SumUpClient(); var result = await client.Customers.GetAsync( "customer_id" ); ``` -------------------------------- ### Start Payment with Region-Specific Processing Source: https://developer.sumup.com/terminal-payments/sdks/android-ttp/index.md Initiate a payment transaction in Brazil or Chile by specifying the card processing method using `ProcessCardAs`. This example demonstrates setting it for credit with installments. ```kotlin tapToPay.startPayment( CheckoutData( totalAmount = amount, clientUniqueTransactionId = UUID.randomUUID().toString(), tipsAmount = null, vatAmount = null, customItems = null, products = null, priceItems = null, processCardAs = ProcessCardAs.Credit(instalments = 5), // or ProcessCardAs.Debit affiliateData = null ) ) ``` -------------------------------- ### Initialize SumUp SDK in Swift Source: https://developer.sumup.com/terminal-payments/sdks/ios-sdk Sets up the SumUp SDK with your Affiliate Key. This should be called on the main thread and may request location permissions. ```swift import SumUpSDK import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { SumUpSDK.setup(withAPIKey: "sup_afk_abcqwerty") return true } } ``` -------------------------------- ### Get Customer using Python SDK Source: https://developer.sumup.com/api/customers/deactivate-payment-instrument Retrieve customer data with the SumUp Python SDK. This example initializes the client and calls the `get` method for customers. ```python from sumup import Sumup client = Sumup() result = client.customers.get("customer_id") ``` -------------------------------- ### Go SDK Authentication Example Source: https://developer.sumup.com/api/authentication This example demonstrates how to configure the SumUp Go SDK with an API key for authentication. ```APIDOC ## Go SDK Authentication Example ### Description This example demonstrates how to configure the SumUp Go SDK with an API key for authentication. ### Method Client Initialization ### Endpoint N/A (SDK Initialization) ### Parameters #### Client Options - **APIKey** (string) - Required - Your SumUp API key (e.g., `sup_sk_MvxmLOl0...`) ### Request Example ```go package main import ( "github.com/sumup/sumup-go/client" sumup "github.com/sumup/sumup-go" ) func main() { client := sumup.NewClient(client.WithAPIKey("sup_sk_MvxmLOl0...")) } ``` ``` -------------------------------- ### Initialize SumUp SDK in Swift Source: https://developer.sumup.com/terminal-payments/sdks/ios-sdk/index.md Sets up the SumUp SDK using your Affiliate Key. This should be called on the main thread and may trigger location permission requests. Ensure your app's Bundle Identifier is registered in the SumUp developer portal. ```swift import SumUpSDK import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { /* * This will setup the SumUpSDK. * * You might consider moving this to a later point in your application's lifecycle, * as this will start updating for locations. * * Also remember to provide the necessary usage descriptions in your info.plist * and to properly localize it, see the * Add Property List Keys to Project section. * * Ensure to add the Bundle Identifier of your iOS app to your * Affiliate Key's Application identifiers in the SumUp developer portal. */ SumUpSDK.setup(withAPIKey: "sup_afk_abcqwerty") return true } } ``` -------------------------------- ### Create Customer using PHP SDK Source: https://developer.sumup.com/api/customers/deactivate-payment-instrument This PHP example demonstrates creating a customer. Instantiate the `SumUp` class and use the `customers->create` method. ```php $sumup = new \SumUp\SumUp(); $result = $sumup->customers->create([ 'customer_id' => '831ff8d4cd5958ab5670', ]); ``` -------------------------------- ### Get Customer using Node.js SDK Source: https://developer.sumup.com/api/customers/deactivate-payment-instrument Retrieve customer data using the SumUp Node.js SDK. This example initializes the client and calls the `get` method for customers. ```javascript import SumUp from '@sumup/sdk'; const client = new SumUp(); const result = await client.customers.get("customer_id"); ``` -------------------------------- ### Get Reader by ID (Go SDK) Source: https://developer.sumup.com/api/readers/list Retrieve reader information using the SumUp Go SDK. This example demonstrates creating a new client and calling the Get method with the necessary parameters. ```go client := sumup.NewClient() result, err := client.Readers.Get(context.Background(), "MK10CL2A", "rdr_3MSAFM23CK82VSTT4BN6RWSQ65") ``` -------------------------------- ### Create a Hosted Checkout (Go) Source: https://developer.sumup.com/online-payments/checkouts/hosted-checkout This Go example demonstrates creating a hosted checkout with the SumUp Go SDK. It includes setting the `RedirectURL` and enabling `HostedCheckout`. ```go checkout, err := client.Checkouts.Create(ctx, sumup.CheckoutsCreateParams{ MerchantCode: merchantCode, Amount: 12.0, Currency: sumup.CurrencyEUR, CheckoutReference: "b50pr914-6k0e-3091-a592-890010285b3d", Description: "A sample checkout", RedirectURL: "https://example.com/orders/123/complete", HostedCheckout: &sumup.CheckoutHostedCheckout{ Enabled: true, }, }) ``` -------------------------------- ### Initialize SumUp SDK in Objective-C Source: https://developer.sumup.com/terminal-payments/sdks/ios-sdk Sets up the SumUp SDK with your Affiliate Key. This should be called on the main thread and may request location permissions. ```objective-c #import "SUSAppDelegate.h" #import @implementation SUSAppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [SMPSumUpSDK setupWithAPIKey:@"sup_afk_abcqwerty"]; return YES; } @end ``` -------------------------------- ### Get Reader by ID (Python SDK) Source: https://developer.sumup.com/api/readers/list Retrieve reader data using the SumUp Python SDK. This example initializes the client and calls the get method with the merchant code and reader ID. ```python from sumup import Sumup client = Sumup() result = client.readers.get("MK10CL2A", "rdr_3MSAFM23CK82VSTT4BN6RWSQ65") ``` -------------------------------- ### Get Person using Python SDK Source: https://developer.sumup.com/api/merchants/get-person This Python example shows how to get person details using the SumUp Python SDK. Initialize the client and call the get_person method with the necessary IDs. ```python from sumup import Sumup client = Sumup() result = client.merchants.get_person("MK10CL2A", "pers_5AKFHN2KSK8D3TS79DJE3P3A2Z") ``` -------------------------------- ### Create Customer using Go SDK Source: https://developer.sumup.com/api/customers/deactivate-payment-instrument Create a customer using the SumUp Go SDK. Initialize the client and call `client.Customers.Create` with the necessary parameters. ```go client := sumup.NewClient() result, err := client.Customers.Create(context.Background(), sumup.CustomersCreateParams{ CustomerId: "831ff8d4cd5958ab5670", }) ``` -------------------------------- ### Get Merchant Details using Python SDK Source: https://developer.sumup.com/api/merchants/get-person This Python example shows how to get merchant details using the SumUp library. Instantiate the Sumup client and then call the `merchants.get` method with the merchant code. ```python from sumup import Sumup client = Sumup() result = client.merchants.get("MK10CL2A") ``` -------------------------------- ### Create Customer using Java SDK Source: https://developer.sumup.com/api/customers/deactivate-payment-instrument This Java example shows how to create a customer using the SumUp Java SDK. Use the `SumUpClient.builder()` to create a client instance. ```java import com.sumup.sdk.SumUpClient; SumUpClient client = SumUpClient.builder().build(); var result = client.customers().createCustomer( Customer.builder() .customerId("831ff8d4cd5958ab5670") .build() ); ``` -------------------------------- ### Get Reader by ID (JavaScript SDK) Source: https://developer.sumup.com/api/readers/list Retrieve a reader's information using the SumUp JavaScript SDK. This example shows how to instantiate the client and call the get method with merchant code and reader ID. ```javascript import SumUp from '@sumup/sdk'; const client = new SumUp(); const result = await client.readers.get("MK10CL2A", "rdr_3MSAFM23CK82VSTT4BN6RWSQ65"); ``` -------------------------------- ### Retrieve a Role using SumUp SDK for Python Source: https://developer.sumup.com/api/roles/delete This Python example shows how to get a role using the SumUp SDK. Instantiate the `Sumup` client and call the `get` method with the merchant code and role ID. ```python from sumup import Sumup client = Sumup() result = client.roles.get("MK10CL2A", "role_WZsm7QTPhVrompscmPhoGTXXcrd58fr9MOhP") ``` -------------------------------- ### Create and Process a Checkout with Go SDK Source: https://developer.sumup.com/changelog/sumup-go Demonstrates how to create a new checkout and then process it using card payment details. Ensure you have the SDK imported and initialized. ```go package main import ( "context" "log" "github.com/sumup/sumup-go" ) func main() { ctx := context.Background() client := sumup.NewClient() checkout, err := client.Checkouts.Create(ctx, sumup.CheckoutsCreateParams{ Amount: 123, CheckoutReference: "TX000001", Currency: sumup.CurrencyEUR, MerchantCode: "MK0001", }) if err != nil { log.Printf("[ERROR] create checkout: %v", err) return } log.Printf("[INFO] checkout created: id=%q, amount=%v, currency=%q", *checkout.ID, *checkout.Amount, string(*checkout.Currency)) checkoutSuccess, err := client.Checkouts.Process(ctx, *checkout.ID, sumup.CheckoutsProcessParams{ Card: &sumup.Card{ Cvv: "123", ExpiryMonth: "12", ExpiryYear: "2023", Name: "Boaty McBoatface", Number: "4200000000000042", }, PaymentType: sumup.ProcessCheckoutPaymentTypeCard, }) if err != nil { log.Printf("[ERROR] process checkout: %v", err) return } success, _ := checkoutSuccess.AsCheckoutSuccess() log.Printf("[INFO] checkout processed: id=%q, transaction_id=%q", *success.ID, string((*success.Transactions)[0].ID)) } ``` -------------------------------- ### Get Reader Status using Python SDK Source: https://developer.sumup.com/api/readers/list This Python example shows how to get a reader's status using the SumUp library. Instantiate the `Sumup` client and call the `get_status` method with the merchant and reader IDs. ```python from sumup import Sumup client = Sumup() result = client.readers.get_status("merchant_code", "reader_id") ``` -------------------------------- ### Install Python SDK Source: https://developer.sumup.com/api/authentication Install the SumUp SDK for Python using pip or uv. ```bash pip install sumup # or uv add sumup ``` -------------------------------- ### Setup Offline Session (iOS) Source: https://developer.sumup.com/terminal-payments/sdks/offline-transactions/index.md Prepare for offline transactions by calling this method while the device is online. This is a prerequisite for starting an offline session. ```swift setupOfflineSession ``` -------------------------------- ### .NET SDK Authentication Example Source: https://developer.sumup.com/api/authentication This example demonstrates how to initialize the SumUp .NET SDK client with an access token for authentication. ```APIDOC ## .NET SDK Authentication Example ### Description This example demonstrates how to initialize the SumUp .NET SDK client with an access token for authentication. ### Method Client Initialization ### Endpoint N/A (SDK Initialization) ### Parameters #### Client Options - **AccessToken** (string) - Required - Your SumUp API key (e.g., `sup_sk_MvxmLOl0...`) ### Request Example ```csharp using SumUp; var client = new SumUpClient(new SumUpClientOptions { AccessToken = "sup_sk_MvxmLOl0...", }); ``` ``` -------------------------------- ### Look up Transaction ID with Ruby SDK Source: https://developer.sumup.com/online-payments/guides/refund Get checkout details using the Ruby SDK. This example uses an asynchronous call. ```ruby let checkout = client .checkouts() .get("4ebc2ed7-bb8c-4d4d-a110-08fd31301bf2") .await? ``` -------------------------------- ### Install SumUp Skills from GitHub Source: https://developer.sumup.com/tools/llms/agent-skills/index.md This is the URL for the sumup/sumup-skills repository. Clone this repository to manually install the skills. ```text https://github.com/sumup/sumup-skills ``` -------------------------------- ### Install Node.js SDK Source: https://developer.sumup.com/api/authentication Install the SumUp SDK for Node.js using npm. ```bash npm install --save @sumup/sdk ``` -------------------------------- ### Get Transaction by ID (Rust) Source: https://developer.sumup.com/api/transactions/list Retrieve a transaction using the SumUp Rust SDK. This example shows default client initialization and detailed parameter options for fetching. ```rust use sumup::Client; let client = Client::default(); let result = client.transactions().get("MH4H92C7", sumup::GetTransactionV2_1Params{ id: Some("id".to_string()), transaction_code: Some("transaction_code".to_string()), foreign_transaction_id: Some("foreign_transaction_id".to_string()), client_transaction_id: Some("client_transaction_id".to_string()), }).await; ``` -------------------------------- ### Initialize Go SDK with API Key Source: https://developer.sumup.com/api/authentication Initialize the SumUp client for Go with your API key. ```go package main import ( "github.com/sumup/sumup-go/client" sumup "github.com/sumup/sumup-go" ) func main() { client := sumup.NewClient(client.WithAPIKey("sup_sk_MvxmLOl0...")) } ``` -------------------------------- ### Get Persons with SumUp SDK for C# Source: https://developer.sumup.com/api/merchants/get-person This C# example shows how to retrieve a list of persons using the SumUp client. Call the `ListPersonsAsync` method with the merchant code. ```csharp using SumUp; var client = new SumUpClient(); var result = await client.Merchants.ListPersonsAsync( "MK10CL2A" ); ``` -------------------------------- ### PHP SDK Authentication Example Source: https://developer.sumup.com/api/authentication This example demonstrates how to create an instance of the SumUp PHP SDK client using an API key. ```APIDOC ## PHP SDK Authentication Example ### Description This example demonstrates how to create an instance of the SumUp PHP SDK client using an API key. ### Method Instantiation ### Endpoint N/A (SDK Initialization) ### Parameters #### Constructor Arguments - **API Key** (string) - Required - Your SumUp API key (e.g., `sup_sk_MvxmLOl0...`) ### Request Example ```php $sumup = new \SumUp\SumUp("sup_sk_MvxmLOl0..."); ``` ``` -------------------------------- ### Initialize and Use SumUpClient in .NET Source: https://developer.sumup.com/changelog/tags/net Demonstrates how to initialize the SumUpClient, retrieve merchant information, and create a checkout. Ensure you have the necessary SumUp SDK installed. ```csharp using SumUp; using var client = new SumUpClient(); var merchantResponse = await client.Merchant.GetAsync(); var merchantCode = merchantResponse.Data?.MerchantProfile?.MerchantCode ?? throw new InvalidOperationException("Merchant code not returned."); var checkoutResponse = await client.Checkouts.CreateAsync(new CheckoutCreateRequest { Amount = 10.00f, Currency = Currency.Eur, CheckoutReference = $"checkout-{Guid.NewGuid():N}", MerchantCode = merchantCode, Description = "Test payment", RedirectUrl = "https://example.com/success", ReturnUrl = "https://example.com/webhook", }); Console.WriteLine($"Checkout ID: {checkoutResponse.Data?.Id}"); ``` -------------------------------- ### Configure SumUp Medusa Plugin Source: https://developer.sumup.com/changelog Configure the SumUp provider in your `medusa-config.ts` file and enable it for the relevant region in Medusa Admin. This setup is required after installing the SumUp Medusa plugin. ```typescript payment_providers: [ // ... { resolve: "@sumup/medusa-plugin", options: { // SumUp API keys and other configuration }, }, // ... ] ``` -------------------------------- ### Get Persons with SumUp SDK for Python Source: https://developer.sumup.com/api/merchants/get-person This Python example shows how to list persons using the SumUp library. Instantiate the client and call the `list_persons` method with the merchant code. ```python from sumup import Sumup client = Sumup() result = client.merchants.list_persons("MK10CL2A") ``` -------------------------------- ### Install PHP SDK Source: https://developer.sumup.com/api/authentication Install the SumUp SDK for PHP using composer. ```bash composer require sumup/sumup-php ```