{"id":37019533,"url":"https://github.com/spare-technologies/java-sdk","last_synced_at":"2026-01-14T02:10:30.578Z","repository":{"id":49343060,"uuid":"369567289","full_name":"spare-technologies/java-sdk","owner":"spare-technologies","description":null,"archived":false,"fork":false,"pushed_at":"2022-12-03T21:13:58.000Z","size":78,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-17T10:36:38.121Z","etag":null,"topics":["fintech","fintech-api","openbanking","payment","payment-gateway","webpaymentapi"],"latest_commit_sha":null,"homepage":"https://docs.tryspare.com","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spare-technologies.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}},"created_at":"2021-05-21T14:48:46.000Z","updated_at":"2022-07-25T19:21:35.000Z","dependencies_parsed_at":"2023-01-22T20:31:29.688Z","dependency_job_id":null,"html_url":"https://github.com/spare-technologies/java-sdk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/spare-technologies/java-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spare-technologies%2Fjava-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spare-technologies%2Fjava-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spare-technologies%2Fjava-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spare-technologies%2Fjava-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spare-technologies","download_url":"https://codeload.github.com/spare-technologies/java-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spare-technologies%2Fjava-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["fintech","fintech-api","openbanking","payment","payment-gateway","webpaymentapi"],"created_at":"2026-01-14T02:10:29.740Z","updated_at":"2026-01-14T02:10:30.571Z","avatar_url":"https://github.com/spare-technologies.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# java-sdk\n[![Maven Central](https://img.shields.io/maven-central/v/com.tryspare/java.sdk.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.tryspare%22%20AND%20a:%22java.sdk%22)\n![Test and analyse workflow](https://github.com/spare-technologies/java-sdk/actions/workflows/dev_build_and_analyse.yml/badge.svg)\n![Build and deploy workflow](https://github.com/spare-technologies/java-sdk/actions/workflows/master_build_and_deploy.yml/badge.svg)\n### Usage\n\n#### I- Add dependencies to ```pom.xml``` file\n\n```xml\n \u003cdependency\u003e\n    \u003cgroupId\u003ecom.tryspare\u003c/groupId\u003e\n    \u003cartifactId\u003ejava.sdk\u003c/artifactId\u003e\n    \u003cversion\u003e1.1.0\u003c/version\u003e\n \u003c/dependency\u003e\n``` \n\n#### II- To Generate ECC key pair\n\n```java\nimport com.spare.sdk.security.crypto.SpCrypto;\n\npublic class MyClass {\n    SpEcKeyPair eccKeyPair = SpCrypto.generateKeyPair();\n    \n    System.out.println(\"Private key \\n\", eccKeyPair.getPrivateKey());\n    System.out.println(\"\\n\\n\");\n    System.out.println(\"Private key \\n\", eccKeyPair.getPublicKey());\n}\n```\n\n#### III- To create your first payment request\n\n```java\nimport com.spare.sdk.payment.models.builder.SpDomesticPaymentRequestBuilder;\nimport com.spare.sdk.payment.models.payment.domestic.SpDomesticPaymentRequest;\n\npublic class MyClass {\n\n    // Business ECC private key\n    public static String privateKey = \"\"\"\"\"\";\n\n    // Spare ECC public key\n    public static String serverPublicKey = \"\"\"\"\"\";\n\n    public static void main(String[] args) {\n\n        // Configure client\n        SpPaymentClientOptions clientOptions = new SpPaymentClientOptions();\n        clientOptions.setBaseUrl(URI.create(\"https://payment.tryspare.com\"));\n        clientOptions.setApiKey(\"Your API key\");\n        clientOptions.setAppId(\"Your app id\");\n\n        SpPaymentClient client = new SpPaymentClient(clientOptions);\n\n        // Initialize payment\n        SpDomesticPaymentRequestBuilder paymentRequestBuilder = new SpDomesticPaymentRequestBuilder();\n        SpDomesticPaymentRequest paymentRequest = paymentRequestBuilder.setAmount(10.0)\n                .setDescription(\"Shopping\")\n                .setOrderId(\"12345\")\n                .build();\n\n        // Sign the payment \n        String signature = SpEccSignatureManager.Sign(privateKey, paymentRequest.toJsonString());\n\n        // Create payment\n\n        SpCreateDomesticPaymentResponse paymentResponse = client.CreateDomesticPayment(paymentRequest, signature);\n\n        // To verify signature of the created payment \n        if (SpEccSignatureManager.Verify(serverPublicKey, paymentResponse.getPayment().toJsonString(), createPayment.getSignature())) {\n            // signature verified\n        }\n    }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspare-technologies%2Fjava-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspare-technologies%2Fjava-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspare-technologies%2Fjava-sdk/lists"}