{"id":47067067,"url":"https://github.com/sumup/sumup-java","last_synced_at":"2026-03-12T05:07:23.658Z","repository":{"id":331942476,"uuid":"1129191938","full_name":"sumup/sumup-java","owner":"sumup","description":"Java SDK for the SumUp API.","archived":false,"fork":false,"pushed_at":"2026-03-10T06:14:50.000Z","size":521,"stargazers_count":4,"open_issues_count":5,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-10T14:18:59.367Z","etag":null,"topics":["java","payments","sdk","sumup"],"latest_commit_sha":null,"homepage":"https://developer.sumup.com/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sumup.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-06T18:30:19.000Z","updated_at":"2026-03-04T01:18:15.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sumup/sumup-java","commit_stats":null,"previous_names":["sumup/sumup-java"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/sumup/sumup-java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumup%2Fsumup-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumup%2Fsumup-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumup%2Fsumup-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumup%2Fsumup-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sumup","download_url":"https://codeload.github.com/sumup/sumup-java/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumup%2Fsumup-java/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30416310,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T04:41:02.746Z","status":"ssl_error","status_checked_at":"2026-03-12T04:40:12.571Z","response_time":114,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","payments","sdk","sumup"],"created_at":"2026-03-12T05:07:22.921Z","updated_at":"2026-03-12T05:07:23.650Z","avatar_url":"https://github.com/sumup.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# SumUp Java SDK\n\n[![Maven Central](https://img.shields.io/maven-central/v/com.sumup/sumup-sdk)](https://central.sonatype.com/artifact/com.sumup/sumup-sdk)\n[![Documentation][docs-badge]](https://developer.sumup.com)\n[![CI Status](https://github.com/sumup/sumup-java/actions/workflows/ci.yaml/badge.svg)](https://github.com/sumup/sumup-java/actions/workflows/ci.yaml)\n[![License](https://img.shields.io/github/license/sumup/sumup-java)](./LICENSE)\n\n\u003c/div\u003e\n\n_**IMPORTANT:** This SDK is under heavy development and subject to breaking changes._\n\nThe Java SDK for the SumUp [API](https://developer.sumup.com) generated from the canonical OpenAPI specification. Requires Java 17 or newer.\n\n## Installation\n\n### Gradle (Kotlin DSL)\n\nAdd the dependency in your `build.gradle.kts` file:\n\n```kotlin\ndependencies {\n    implementation(\"com.sumup:sumup-sdk:0.0.6\")\n}\n```\n\n### Gradle (Groovy)\n\nAdd the dependency in your `build.gradle` file:\n\n```groovy\ndependencies {\n    implementation 'com.sumup:sumup-sdk:0.0.6'\n}\n```\n\n### Maven\n\nAdd the dependency in your `pom.xml` file:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.sumup\u003c/groupId\u003e\n  \u003cartifactId\u003esumup-sdk\u003c/artifactId\u003e\n  \u003cversion\u003e0.0.6\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Getting Started\n\nAuthenticate with a personal access token before making calls:\n\n```bash\nexport SUMUP_API_KEY=\"my-token\"\n```\n\nCreate clients using the default constructor (reads `SUMUP_API_KEY`):\n\n```java\nSumUpClient client = new SumUpClient();\nSumUpAsyncClient asyncClient = new SumUpAsyncClient();\n```\n\nOr pass the API key explicitly:\n\n```java\nSumUpClient client = new SumUpClient(\"api-key\");\n```\n\nIf you need more configuration, use the builder (for example, to override the base URL):\n\n```java\nSumUpClient client =\n    SumUpClient.builder()\n        .baseUri(\"https://api.sumup.com\")\n        .build();\n```\n\n## Usage\n\n### Creating an Online Checkout\n\nSynchronous example:\n\n```java\nimport com.sumup.sdk.SumUpClient;\nimport com.sumup.sdk.models.CheckoutCreateRequest;\nimport com.sumup.sdk.models.Currency;\nimport java.util.UUID;\n\nSumUpClient client =\n    SumUpClient.builder()\n        .build();\n\nString merchantCode = client.merchant().getMerchantProfile().merchantCode();\nString checkoutReference = \"checkout-\" + UUID.randomUUID();\n\nCheckoutCreateRequest request =\n    CheckoutCreateRequest.builder()\n        .amount(10.00f)\n        .currency(Currency.EUR)\n        .checkoutReference(checkoutReference)\n        .merchantCode(merchantCode)\n        .description(\"Test payment\")\n        .redirectUrl(\"https://example.com/success\")\n        .returnUrl(\"https://example.com/webhook\")\n        .build();\n\nvar checkout = client.checkouts().createCheckout(request);\nSystem.out.printf(\"Checkout %s created with id %s%n\", checkout.checkoutReference(), checkout.id());\n```\n\nAsynchronous example:\n\n```java\nimport com.sumup.sdk.SumUpAsyncClient;\nimport com.sumup.sdk.models.CheckoutCreateRequest;\nimport com.sumup.sdk.models.Currency;\nimport java.util.UUID;\nimport java.util.concurrent.CompletableFuture;\n\nSumUpAsyncClient client =\n    SumUpAsyncClient.builder()\n        .build();\n\nCompletableFuture\u003cVoid\u003e checkoutFuture =\n    client\n        .merchant()\n        .getMerchantProfile()\n        .thenApply(profile -\u003e profile.merchantCode())\n        .thenCompose(\n            merchantCode -\u003e {\n              String checkoutReference = \"checkout-\" + UUID.randomUUID();\n              CheckoutCreateRequest request =\n                  CheckoutCreateRequest.builder()\n                      .amount(10.00f)\n                      .currency(Currency.EUR)\n                      .checkoutReference(checkoutReference)\n                      .merchantCode(merchantCode)\n                      .description(\"Test payment\")\n                      .redirectUrl(\"https://example.com/success\")\n                      .returnUrl(\"https://example.com/webhook\")\n                      .build();\n\n              return client.checkouts().createCheckout(request);\n            })\n        .thenAccept(\n            checkout -\u003e\n                System.out.printf(\n                    \"Checkout %s created (%s)%n\",\n                    checkout.checkoutReference(), checkout.id()));\n\ncheckoutFuture.join();\n```\n\n### Creating a Card Reader Checkout\n\nSynchronous example:\n\n```java\nimport com.sumup.sdk.SumUpClient;\nimport com.sumup.sdk.models.CreateReaderCheckoutRequest;\nimport com.sumup.sdk.models.Money;\nimport java.util.Optional;\nimport java.util.UUID;\n\nString merchantCode = System.getenv(\"SUMUP_MERCHANT_CODE\");\n\nSumUpClient client =\n    SumUpClient.builder()\n        .build();\n\nString readerId =\n    Optional.ofNullable(System.getenv(\"SUMUP_READER_ID\"))\n        .orElseGet(\n            () -\u003e\n                client.readers().listReaders(merchantCode).items().stream()\n                    .findFirst()\n                    .map(reader -\u003e reader.id().value())\n                    .orElseThrow(() -\u003e new IllegalStateException(\"No paired readers found.\")));\n\nCreateReaderCheckoutRequest request =\n    CreateReaderCheckoutRequest.builder()\n        .description(\"sumup-java reader checkout \" + UUID.randomUUID())\n        .totalAmount(\n            Money.builder()\n                .currency(\"EUR\")\n                .minorUnit(2L)\n                .value(1000L) // €10.00\n                .build())\n        .returnUrl(\"https://example.com/webhook\")\n        .build();\n\nclient.readers().createReaderCheckout(merchantCode, readerId, request);\nSystem.out.println(\"Reader checkout created.\");\n```\n\nAsynchronous example:\n\n```java\nimport com.sumup.sdk.SumUpAsyncClient;\nimport com.sumup.sdk.models.CreateReaderCheckoutRequest;\nimport com.sumup.sdk.models.Money;\nimport java.util.Optional;\nimport java.util.UUID;\nimport java.util.concurrent.CompletableFuture;\n\nString merchantCode = System.getenv(\"SUMUP_MERCHANT_CODE\");\n\nSumUpAsyncClient client =\n    SumUpAsyncClient.builder()\n        .build();\n\nCompletableFuture\u003cString\u003e readerIdFuture =\n    Optional.ofNullable(System.getenv(\"SUMUP_READER_ID\"))\n        .map(CompletableFuture::completedFuture)\n        .orElseGet(\n            () -\u003e\n                client\n                    .readers()\n                    .listReaders(merchantCode)\n                    .thenApply(\n                        response -\u003e\n                            response.items().stream()\n                                .findFirst()\n                                .map(reader -\u003e reader.id().value())\n                                .orElseThrow(\n                                    () -\u003e\n                                        new IllegalStateException(\"No paired readers found.\"))));\n\nreaderIdFuture\n    .thenCompose(\n        readerId -\u003e {\n          CreateReaderCheckoutRequest request =\n              CreateReaderCheckoutRequest.builder()\n                  .description(\"sumup-java reader checkout \" + UUID.randomUUID())\n                  .totalAmount(\n                      Money.builder()\n                          .currency(\"EUR\")\n                          .minorUnit(2L)\n                          .value(1000L)\n                          .build())\n                  .returnUrl(\"https://example.com/webhook\")\n                  .build();\n\n          return client.readers().createReaderCheckout(merchantCode, readerId, request);\n        })\n    .thenAccept(\n        response -\u003e\n            System.out.printf(\n                \"Reader checkout created: %s%n\",\n                Optional.ofNullable(response.data())\n                    .map(data -\u003e data.clientTransactionId())\n                    .orElse(\"\u003cunknown\u003e\")))\n    .join();\n```\n\n## Examples\n\n- `examples/basic` – lists recent checkouts to verify that your API token works.\n- `examples/card-reader-checkout` – lists paired readers and creates a €10 checkout on the first available device.\n\nTo run the card reader example locally:\n\n```bash\nexport SUMUP_API_KEY=\"your_api_key\"\nexport SUMUP_MERCHANT_CODE=\"your_merchant_code\"\n# Optional: pick a concrete reader instead of taking the first\n# export SUMUP_READER_ID=\"your_reader_id\"\n./gradlew :examples:card-reader-checkout:run\n```\n\n## Generating Javadoc\n\nBuild the aggregated API reference locally with `just javadoc` (or `./gradlew aggregateJavadoc`). The HTML output is placed under `build/docs/javadoc/index.html`.\n\n[docs-badge]: https://img.shields.io/badge/SumUp-documentation-white.svg?logo=data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgY29sb3I9IndoaXRlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogICAgPHBhdGggZD0iTTIyLjI5IDBIMS43Qy43NyAwIDAgLjc3IDAgMS43MVYyMi4zYzAgLjkzLjc3IDEuNyAxLjcxIDEuN0gyMi4zYy45NCAwIDEuNzEtLjc3IDEuNzEtMS43MVYxLjdDMjQgLjc3IDIzLjIzIDAgMjIuMjkgMFptLTcuMjIgMTguMDdhNS42MiA1LjYyIDAgMCAxLTcuNjguMjQuMzYuMzYgMCAwIDEtLjAxLS40OWw3LjQ0LTcuNDRhLjM1LjM1IDAgMCAxIC40OSAwIDUuNiA1LjYgMCAwIDEtLjI0IDcuNjlabTEuNTUtMTEuOS03LjQ0IDcuNDVhLjM1LjM1IDAgMCAxLS41IDAgNS42MSA1LjYxIDAgMCAxIDcuOS03Ljk2bC4wMy4wM2MuMTMuMTMuMTQuMzUuMDEuNDlaIiBmaWxsPSJjdXJyZW50Q29sb3IiLz4KPC9zdmc+\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsumup%2Fsumup-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsumup%2Fsumup-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsumup%2Fsumup-java/lists"}