{"id":29608187,"url":"https://github.com/iinsys/fapshi-java-sdk","last_synced_at":"2025-08-20T18:56:06.824Z","repository":{"id":305144967,"uuid":"1022021696","full_name":"iinsys/fapshi-java-sdk","owner":"iinsys","description":"Fapshi SDK spring boot for easy payment integration ","archived":false,"fork":false,"pushed_at":"2025-08-12T21:11:18.000Z","size":110,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-12T23:24:39.010Z","etag":null,"topics":["java","maven","sdk-java","springboot"],"latest_commit_sha":null,"homepage":"","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/iinsys.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","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,"zenodo":null}},"created_at":"2025-07-18T10:19:09.000Z","updated_at":"2025-08-12T21:11:15.000Z","dependencies_parsed_at":"2025-07-18T15:51:17.258Z","dependency_job_id":"ac3b694f-5423-4566-a6b1-6a6877728bd4","html_url":"https://github.com/iinsys/fapshi-java-sdk","commit_stats":null,"previous_names":["iinsys/fapshi-java-sdk"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/iinsys/fapshi-java-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iinsys%2Ffapshi-java-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iinsys%2Ffapshi-java-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iinsys%2Ffapshi-java-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iinsys%2Ffapshi-java-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iinsys","download_url":"https://codeload.github.com/iinsys/fapshi-java-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iinsys%2Ffapshi-java-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271369048,"owners_count":24747790,"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-08-20T02:00:09.606Z","response_time":69,"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":["java","maven","sdk-java","springboot"],"created_at":"2025-07-20T19:03:11.243Z","updated_at":"2025-08-20T18:56:06.779Z","avatar_url":"https://github.com/iinsys.png","language":"Java","readme":"# Fapshi Java SDK\n\nJava SDK for integrating with the [Fapshi Payment API](https://docs.fapshi.com/en/api-reference/getting-started).\n\n## Workflows\n\n![Manual Build and Test](https://github.com/iinsys/fapshi-java-sdk/actions/workflows/maven.yml/badge.svg)\n![CodeQL](https://github.com/iinsys/fapshi-java-sdk/actions/workflows/codeql-analysis.yml/badge.svg)\n[![Dependabot Status](https://img.shields.io/badge/Dependabot-Enabled-brightgreen?logo=dependabot)](https://github.com/iinsys/fapshi-java-sdk/network/updates)\n[![Snyk Vulnerabilities](https://snyk.io/test/github/iinsys/fapshi-java-sdk/badge.svg)](https://snyk.io/test/github/iinsys/fapshi-java-sdk)\n\n\n## 🔄 Dependency Management\n\n- 🛠️ **Dependabot**: Automatically checks for dependency updates via [`.github/dependabot.yml`](.github/dependabot.yml)\n- 🤖 **Renovate**: Alternative to Dependabot for custom and bulk PRs (configurable via `renovate.json`)\n\n## Features\n- Generate payment links\n- Direct mobile money payments (MTN, Orange)\n- Check transaction status\n- Handle webhook notifications\n\n## Requirements\n- Java 21+\n- Maven\n\n## Installation\n\nAdd the following to your Maven `pom.xml` to use the latest release from JitPack:\n\n```xml\n\u003crepository\u003e\n  \u003cid\u003ejitpack.io\u003c/id\u003e\n  \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n\u003c/repository\u003e\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.github.iinsys\u003c/groupId\u003e\n  \u003cartifactId\u003efapshi-java-sdk\u003c/artifactId\u003e\n  \u003cversion\u003ev1.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Configuration\n\n```java\nimport com.fapshi.sdk.FapshiConfig;\nimport com.fapshi.sdk.FapshiClient;\n\nFapshiConfig config = new FapshiConfig(\n    \"YOUR_API_KEY\",\n    \"YOUR_API_USER\",\n    \"https://api.fapshi.com\"\n);\nFapshiClient client = new FapshiClient(config);\n```\n\n## Generate Payment Link Example\n\n```java\nimport com.fapshi.sdk.model.PaymentLinkRequest;\nimport com.fapshi.sdk.model.PaymentLinkResponse;\nimport com.fapshi.sdk.service.PaymentService;\n\nPaymentService paymentService = new PaymentService(client);\n\nPaymentLinkRequest request = new PaymentLinkRequest();\nrequest.setAmount(1000);\nrequest.setCurrency(\"XAF\");\nrequest.setDescription(\"Order #1234\");\nrequest.setCustomerName(\"John Doe\");\nrequest.setCustomerEmail(\"john@example.com\");\nrequest.setCustomerPhone(\"2376XXXXXXX\");\nrequest.setCallbackUrl(\"https://yourdomain.com/payment-callback\");\n\nPaymentLinkResponse response = paymentService.generatePaymentLink(request);\nSystem.out.println(\"Payment Link: \" + response.getLink());\n```\n\n## Direct Payment Example (MTN/Orange)\n\n### Minimal Example (Required Fields Only)\n\n```java\nimport com.fapshi.sdk.model.DirectPaymentRequest;\nimport com.fapshi.sdk.model.DirectPaymentResponse;\n\nDirectPaymentRequest directRequest = new DirectPaymentRequest();\ndirectRequest.setAmount(1000); // required\ndirectRequest.setPhone(\"237670000000\"); // required\n\nDirectPaymentResponse directResponse = paymentService.initiateDirectPayment(directRequest);\nSystem.out.println(\"Direct Payment Status: \" + directResponse.getStatus());\n```\n\n### Full Example (All Optional Fields)\n\n```java\nDirectPaymentRequest directRequest = new DirectPaymentRequest();\ndirectRequest.setAmount(2000); // required\ndirectRequest.setPhone(\"237690000000\"); // required\ndirectRequest.setName(\"Jane Smith\"); // optional\ndirectRequest.setEmail(\"jane@example.com\"); // optional\ndirectRequest.setMedium(\"mobile money\"); // optional\ndirectRequest.setUserId(\"user-123\"); // optional\ndirectRequest.setExternalId(\"order-5678\"); // optional\ndirectRequest.setMessage(\"Order #5678 payment\"); // optional\n\nDirectPaymentResponse directResponse = paymentService.initiateDirectPayment(directRequest);\nSystem.out.println(\"Direct Payment Status: \" + directResponse.getStatus());\n```\n\n## Check Transaction Status Example\n\nThe response will now include all fields as per the Fapshi API documentation:\n\n```java\nimport com.fapshi.sdk.model.TransactionStatusResponse;\n\nString transactionId = \"txn_abc123\";\nTransactionStatusResponse status = paymentService.getTransactionStatus(transactionId);\nSystem.out.println(\"Transaction Status: \" + status.getStatus());\nSystem.out.println(\"Transaction ID: \" + status.getTransId());\nSystem.out.println(\"Amount: \" + status.getAmount());\nSystem.out.println(\"Medium: \" + status.getMedium());\nSystem.out.println(\"Payer Name: \" + status.getPayerName());\n// ... print other fields as needed\n```\n\n### Transaction Status Response Fields\n\n| Field             | Type    | Description                                  |\n|-------------------|---------|----------------------------------------------|\n| transId           | String  | Transaction ID                               |\n| status            | String  | Payment status (CREATED, PENDING, etc.)      |\n| medium            | String  | Payment medium (mobile money, orange money)  |\n| serviceName       | String  | Name of the service                          |\n| amount            | int     | Payment amount                               |\n| revenue           | int     | Revenue                                      |\n| payerName         | String  | Name of the payer                            |\n| email             | String  | Payer's email                                |\n| redirectUrl       | String  | Redirect URL                                 |\n| externalId        | String  | External order/transaction ID                |\n| userId            | String  | Your system's user ID                        |\n| webhook           | String  | Webhook URL                                  |\n| financialTransId  | String  | Financial transaction ID                     |\n| dateInitiated     | String  | Date initiated                               |\n| dateConfirmed     | String  | Date confirmed                               |\n\n## Webhook Handling Example\n\nThe webhook payload will match the transaction status response structure above. Example controller:\n\n```java\nimport org.springframework.web.bind.annotation.*;\nimport com.fapshi.sdk.model.WebhookNotification;\n\n@RestController\n@RequestMapping(\"/fapshi\")\npublic class FapshiWebhookController {\n    @PostMapping(\"/webhook\")\n    public void handleWebhook(@RequestBody WebhookNotification notification) {\n        // Access all fields from notification, e.g.:\n        System.out.println(\"Webhook Status: \" + notification.getStatus());\n        System.out.println(\"Webhook Transaction ID: \" + notification.getTransId());\n        // ... handle other fields as needed\n    }\n}\n```\n\n## Error Handling\n\nAll SDK methods throw `FapshiApiException` on API or network errors. Use try/catch to handle errors gracefully.\n\n```java\ntry {\n    // call SDK method\n} catch (FapshiApiException e) {\n    // handle error\n}\n```\n\n## Architecture\n\n![Fapshi Java SDK Architecture](docs/images/fapshi-flow.png)\n\n## Contributing\n\nWe welcome contributions! Please see [docs/CONTRIBUTING.md](docs/CONTRIBUTING.md) for guidelines before submitting issues or pull requests.\n\n## License\nSee [LICENSE](LICENSE). \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiinsys%2Ffapshi-java-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiinsys%2Ffapshi-java-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiinsys%2Ffapshi-java-sdk/lists"}