{"id":18352361,"url":"https://github.com/plughacker/malga-java-api-sdk","last_synced_at":"2025-10-08T07:10:27.925Z","repository":{"id":177095893,"uuid":"656750140","full_name":"plughacker/malga-java-api-sdk","owner":"plughacker","description":"Java library for using Malga's APIs","archived":false,"fork":false,"pushed_at":"2023-06-30T17:17:56.000Z","size":821,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-06T15:41:15.798Z","etag":null,"topics":[],"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/plughacker.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":"2023-06-21T15:00:20.000Z","updated_at":"2023-06-28T23:24:52.000Z","dependencies_parsed_at":"2023-07-25T17:16:23.787Z","dependency_job_id":null,"html_url":"https://github.com/plughacker/malga-java-api-sdk","commit_stats":null,"previous_names":["plughacker/malga-java-api-sdk"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/plughacker/malga-java-api-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plughacker%2Fmalga-java-api-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plughacker%2Fmalga-java-api-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plughacker%2Fmalga-java-api-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plughacker%2Fmalga-java-api-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plughacker","download_url":"https://codeload.github.com/plughacker/malga-java-api-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plughacker%2Fmalga-java-api-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278903594,"owners_count":26065906,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"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":[],"created_at":"2024-11-05T21:35:44.587Z","updated_at":"2025-10-08T07:10:27.883Z","avatar_url":"https://github.com/plughacker.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Malga Java SDK\n\nMalga’s API SDK.\n\n- API version: 0.5\n- SDK version: 0.1.0\n\nFor more information, refer to our [documentation](https://docs.malga.io/).\n\n## Requirements\n\nUsing the API client library requires:\n\n* [Malga test account](https://dashboard.malga.io/)\n* [API key](https://docs.malga.io/docs/getting-started/credentials).\n* Java 11 or higher\n* Maven (3.8.3+)/Gradle (7.2+)\n\n## Authentication\n\nMalga’s API services are protected through access keys. You can manage your access keys through your dashboard.\n\nIt is important to store your keys privately and safely since they have modification privileges in your account. Do not share your keys, do not leave them fixed in your code, and do not store them on your version control server. We recommend using secret environment variables to make the key available to your application.\n\nAuthentication for all API calls is done through HTTP headers, requiring you to enter your Malga client identifier and secret access key.\n\n## X-Client-ID\n\n| Security Scheme Type | API Key |\n|-----------------------|-----------|\n| Header parameter name | `X-Client-ID` |\n\n## X-Api-Key\n\n| Security Scheme Type | API Key |\n|-----------------------|-----------|\n| Header parameter name | `X-Api-Key` |\n\n## Installation\n\nAdd this dependency to your project's build file:\n\n```\n    \u003cdependency\u003e\n        \u003cgroupId\u003eio.malga\u003c/groupId\u003e\n        \u003cartifactId\u003emalga-java-api-sdk\u003c/artifactId\u003e\n        \u003cversion\u003e0.1.0\u003c/version\u003e\n    \u003c/dependency\u003e\n```\n\n## Getting Started\n\nPlease follow the [installation](#installation) instruction and execute the following Java code:\n\n```java\n\n// Import classes:\n\nimport io.malga.client.ApiClient;\nimport io.malga.client.ApiException;\nimport io.malga.client.Configuration;\nimport io.malga.client.models.charge.*;\nimport io.malga.client.service.charges.ChargesApi;\n\npublic class Example {\n    public static void main(String[] args) {\n        ApiClient defaultClient = Configuration.getDefaultApiClient();\n        defaultClient.setBasePath(\"https://sandbox-api.malga.io\");\n\n        // Configure API key authorization: X-Client-ID\n        ApiKeyAuth clientID = (ApiKeyAuth) defaultClient.getAuthentication(\"X-Client-ID\");\n        clientID.setApiKey(\"YOUR CLIENT ID\");\n\n        // Configure API key authorization: X-Api-Key\n        ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication(\"X-Api-Key\");\n        apiKey.setApiKey(\"YOUR API KEY\");\n\n        ChargesApi chargesApi = new ChargesApi(defaultClient);\n\n        ChargeRequest chargeRequest = createCardChargeRequest();\n        ChargeResponse chargeResponse = chargesApi.charge(chargeRequest);\n\n        SourceTypeCard cardOneShot = ((new SourceTypeCard())\n                .sourceType(\"card\")\n                .card((new TokenRequest())\n                        .cardExpirationDate(\"12/2025\")\n                        .cardHolderName(\"John Doe\")\n                        .cardNumber(\"4929564637987814\")\n                        .cardCvv(\"410\")\n                ));\n\n        PaymentMethodCard paymentMethodCard = (new PaymentMethodCard())\n                .paymentType(PaymentMethodCard.PaymentTypeEnum.CREDIT)\n                .installments(1);\n\n        ChargeRequest chargeRequest(new ChargeRequest())\n                .capture(false)\n                .statementDescriptor(\"should be statement descriptor\")\n                .merchantId(\"YOUR MERCHANT ID\")\n                .amount(1000)\n                .orderId(\"1234567890\")\n                .capture(false)\n                .paymentSource((new ChargeRequestPaymentSource(cardOneShot)))\n                .paymentMethod((new ChargeRequestPaymentMethod(paymentMethodCard)));\n\n        ChargesApi chargesApi = new ChargesApi(defaultClient);\n\n        try {\n            ChargeResponse chargeResponse = chargesApi.charge(chargeRequest);\n            System.out.println(chargeResponse);\n        } catch (ApiException e) {\n            System.err.println(\"Exception when calling CardsApi#getCardById\");\n            System.err.println(\"Status code: \" + e.getCode());\n            System.err.println(\"Reason: \" + e.getResponseBody());\n            System.err.println(\"Response headers: \" + e.getResponseHeaders());\n            e.printStackTrace();\n        }\n    }\n}\n\n```\n\n## Recommendation\n\nIt's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues.\n\n## Support\n\nIf you have a feature request, or spotted a bug or a technical problem, [create an issue here](https://github.com/plughacker/malga-java-api-sdk/issues/new/choose).\n\nFor other questions, contact our Support Team\n\n## Licence\n\nThis repository is available under the [Apache 2 license](https://github.com/plughacker/malga-java-api-sdk/blob/main/LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplughacker%2Fmalga-java-api-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplughacker%2Fmalga-java-api-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplughacker%2Fmalga-java-api-sdk/lists"}