{"id":21578237,"url":"https://github.com/wallee-payment/java-sdk","last_synced_at":"2025-08-01T05:07:55.860Z","repository":{"id":37977882,"uuid":"97803335","full_name":"wallee-payment/java-sdk","owner":"wallee-payment","description":"The wallee Java SDK allows an easy integration of the wallee payment hub into Java applications.","archived":false,"fork":false,"pushed_at":"2024-11-04T16:01:26.000Z","size":4678,"stargazers_count":3,"open_issues_count":2,"forks_count":1,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-24T15:11:14.572Z","etag":null,"topics":["java-application","payment-integration","payment-processing","wallee-java-sdk","wallee-payment-hub"],"latest_commit_sha":null,"homepage":null,"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/wallee-payment.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-20T07:17:22.000Z","updated_at":"2024-11-04T16:01:31.000Z","dependencies_parsed_at":"2023-02-12T21:30:29.564Z","dependency_job_id":"18222714-d727-4dfd-95fd-dd54ef8c0bcc","html_url":"https://github.com/wallee-payment/java-sdk","commit_stats":null,"previous_names":[],"tags_count":76,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wallee-payment%2Fjava-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wallee-payment%2Fjava-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wallee-payment%2Fjava-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wallee-payment%2Fjava-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wallee-payment","download_url":"https://codeload.github.com/wallee-payment/java-sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248261993,"owners_count":21074229,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-application","payment-integration","payment-processing","wallee-java-sdk","wallee-payment-hub"],"created_at":"2024-11-24T13:09:56.324Z","updated_at":"2025-08-01T05:07:55.845Z","avatar_url":"https://github.com/wallee-payment.png","language":"Java","readme":"# wallee Java Library\n\nThe wallee Java library wraps around the wallee API. This library facilitates your interaction with various services such as transactions, accounts, and subscriptions.\n\n\n## Documentation\n\n[wallee Web Service API](https://app-wallee.com/doc/api/web-service)\n\n## Requirements\n\n- Java 1.8+\n\n## Installation\n\n### Maven users\n\nAdd this dependency to your project's POM:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.wallee\u003c/groupId\u003e\n    \u003cartifactId\u003ewallee-java-sdk\u003c/artifactId\u003e\n    \u003cversion\u003e8.7.0\u003c/version\u003e\n    \u003cscope\u003ecompile\u003c/scope\u003e\n\u003c/dependency\u003e\n```\n\n### Gradle users\n\nAdd this dependency to your project's build file:\n\n```groovy\ncompile \"com.wallee:wallee-java-sdk:8.7.0\"\n```\n\n### Others\n\nAt first generate the JAR by executing:\n\n```shell\nmvn clean package\n```\n\nThen manually install the following JARs:\n\n* `target/wallee-java-sdk-8.7.0.jar`\n* `target/lib/*.jar`\n\n## Usage\nThe library needs to be configured with your account's space id, user id, and secret key which are available in your [wallee\naccount dashboard](https://app-wallee.com/account/select). Set `space_id`, `user_id`, and `api_secret` to their values.\n\n### Configuring a Service\n\n```java\npackage com.wallee.sdk.example;\n\nimport com.wallee.sdk.ApiClient;\nimport com.wallee.sdk.service.TransactionService;\n\npublic class Example {\n\n    public static void main(String[] args) {\n\n        // Credentials\n        Long userId = 512L;\n        String secret = \"FKrO76r5VwJtBrqZawBspljbBNOxp5veKQQkOnZxucQ=\";\n        \n        // API Client\n        ApiClient apiClient = new ApiClient(userId, secret);\n\n        //Setup a custom connection timeout if needed. (Default value is: 25 seconds)\n        apiClient.setReadTimeOut(20);\n\n        // Create an API service instance:\n        TransactionService transactionService = apiClient.getTransactionService();\n\n        // ... use the transactionService to make API calls ...\n        \n    }\n}\n```\n\nTo get started with sending transactions, please review the example below:\n\n```java\npackage com.wallee.sdk.test;\n\nimport java.io.IOException;\nimport java.math.BigDecimal;\n\nimport com.wallee.sdk.ApiClient;\nimport com.wallee.sdk.model.*;\n\n/**\n * \n */\npublic class TransactionPaymentPageExample {\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t    // Credentials\n        Long spaceId = 405L;\n        Long applicationUserId = 512L;\n        String authenticationKey = \"FKrO76r5VwJtBrqZawBspljbBNOxp5veKQQkOnZxucQ=\";\n\n\t    // API Client\n\t    ApiClient apiClient = new ApiClient(applicationUserId, authenticationKey);\n\n        // Line item\n        LineItemCreate lineItem = new LineItemCreate();\n        lineItem.name(\"Red T-Shirt\")\n                .uniqueId(\"5412\")\n                .type(LineItemType.PRODUCT)\n                .quantity(BigDecimal.valueOf(1))\n                .amountIncludingTax(BigDecimal.valueOf(29.95))\n                .sku(\"red-t-shirt-123\");\n\n        // Customer Billing Address\n        AddressCreate billingAddress = new AddressCreate();\n        billingAddress.city(\"Winterthur\")\n                .country(\"CH\")\n                .emailAddress(\"test@example.com\")\n                .familyName(\"Customer\")\n                .givenName(\"Good\")\n                .postcode(\"8400\")\n                .postalState(\"ZH\")\n                .organizationName(\"Test GmbH\")\n                .mobilePhoneNumber(\"+41791234567\")\n                .salutation(\"Ms\");\n\n\t    // Transaction Create Request\n\t    TransactionCreate request = new TransactionCreate();\n        request.autoConfirmationEnabled(true).currency(\"CHF\").language(\"en-US\");\n        request.setBillingAddress(billingAddress);\n        request.setShippingAddress(billingAddress);\n        request.addLineItemsItem(lineItem);\n        \n        // Create Transaction\n        Transaction transaction = apiClient.getTransactionService().create(spaceId, request);\n        \n        // Build the payment page URL to which the user should be redirected when the payment page should be used:\n        String paymentPageUrl = apiClient.getTransactionPaymentPageService().paymentPageUrl(spaceId, transaction.getId());\n        System.out.println(\"Payment Page URL: \" + paymentPageUrl);\n        \n        // The above statement should print something like:\n        //\n        //   Payment Page URL: https://app-wallee.com/s/405/payment/transaction/pay/[transaction ID]?securityToken=[some token]\n        //\n\t}\n\n}\n\n```\nConsider using the following overloaded ApiClient constructor and following code snippet to gain access to a resource behind a **proxy** server with a Basic Authentication scheme\n```java\n    // Create an instance of the ApiClient with the user's unique credentials and proxy information.\n    ApiClient apiClient = new ApiClient(userId, secret, String proxyHostname, int proxyPort);\n\n    Authenticator authenticator = new Authenticator() {\n        @Override\n        protected PasswordAuthentication getPasswordAuthentication() {\n            // Check if the authentication request is for a proxy\n            if (getRequestorType() == RequestorType.PROXY) {\n                // Check if the authentication scheme is Basic\n                if (\"Basic\".equalsIgnoreCase(getRequestingScheme())) {\n                    // Return the PasswordAuthentication instance with the proxy credentials\n                    return new PasswordAuthentication(proxyUsername, proxyPassword.toCharArray());\n                }\n            }\n\n            return null;\n          }\n    };\n\n    // Set the default Authenticator that will be used by the networking code when a proxy or an HTTP server asks for authentication.\n    // Authenticator.setDefault will set the java.net.Authenticator that processes all authentication requests.\n    Authenticator.setDefault(authenticator);\n```\n### Disable Basic authentication for HTTPS tunneling\n\n\u003eIn some environments, certain authentication schemes may be undesirable when proxying HTTPS. Accordingly, the Basic authentication scheme has been deactivated, by default, in the Oracle\n\u003eJava Runtime, by adding Basic to the jdk.http.auth.tunneling.disabledSchemes networking property. Now, proxies requiring Basic authentication when setting up a tunnel for HTTPS\n\u003ewill no longer succeed by default. If required, this authentication scheme can be reactivated by removing Basic from the jdk.http.auth.tunneling.disabledSchemes networking\n\u003eproperty, or by setting a system property of the same name to \"\" ( empty ) on the command line.\n\n```java\n    System.setProperty(\"jdk.http.auth.tunneling.disabledSchemes\", \"\");\n    System.setProperty(\"jdk.http.auth.proxying.disabledSchemes\", \"\");\n```\n### Integrating Webhook Payload Signing Mechanism into webhook callback handler\n\nThe HTTP request which is sent for a state change of an entity now includes an additional field `state`, which provides information about the update of the monitored entity's state. This enhancement is a result of the implementation of our webhook encryption mechanism.\n\nPayload field `state` provides direct information about the state update of the entity, making additional API calls to retrieve the entity state redundant.\n\n#### ⚠️ Warning: Generic Pseudocode\n\n\u003e **The provided pseudocode is intentionally generic and serves to illustrate the process of enhancing your API to leverage webhook payload signing. It is not a complete implementation.**\n\u003e\n\u003e Please ensure that you adapt and extend this code to meet the specific needs of your application, including appropriate security measures and error handling.\nFor a detailed webhook payload signing mechanism understanding we highly recommend referring to our comprehensive\n[Webhook Payload Signing Documentation](https://app-wallee.com/doc/webhooks#_webhook_payload_signing_mechanism).\n\n\n```java\n@RestController\n@RequestMapping(\"/webhook\")\npublic class WebhookController {\n\n    @PostMapping(\"/callback\")\n    public ResponseEntity\u003cObject\u003e handleWebhook(@RequestBody String requestPayload,\n                                                HttpServletRequest request) {\n\n      // ...\n\n      // Retrieve the 'x-signature' header from the request\n        String signature = request.getHeader(\"x-signature\");\n\n        // Check if the x-signature header is present\n        if (signature == null || signature.isEmpty()) {\n\n          // Make additional API call to retrieve the entity state.\n          // ...\n\n        } else {\n\n          // Authenticate webhook payload\n          if (apiClient.getWebhookEncryptionService().isContentValid(signature, requestPayload)) {\n            // parse the requestPayload to extract the 'state' value\n\n            // After parsing the 'state', process the entity's state change.\n             if (state != null) {\n                 processEntityStateChange(state);\n             }\n\n            // Process the received webhook data\n            // ...\n          }\n\n        }\n\n        // Process the received webhook data\n        // ...\n    }\n}\n```\n\n## Recommendation\n\nIt is recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues.\n\n## License\n\nPlease see the [license file](https://github.com/wallee-payment/java-sdk/blob/master/LICENSE) for more information.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwallee-payment%2Fjava-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwallee-payment%2Fjava-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwallee-payment%2Fjava-sdk/lists"}