{"id":25926851,"url":"https://github.com/clojurestream/stripe-clojure","last_synced_at":"2025-07-26T06:02:58.297Z","repository":{"id":277434047,"uuid":"929123467","full_name":"clojurestream/stripe-clojure","owner":"clojurestream","description":"Clojure (JVM) SDK library for the Stripe API.","archived":false,"fork":false,"pushed_at":"2025-02-16T12:41:55.000Z","size":218,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-02-25T16:56:50.681Z","etag":null,"topics":["clojure","sdk","stripe"],"latest_commit_sha":null,"homepage":"","language":"Clojure","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/clojurestream.png","metadata":{"files":{"readme":"docs/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":"2025-02-07T21:09:37.000Z","updated_at":"2025-02-16T12:41:58.000Z","dependencies_parsed_at":"2025-02-13T23:35:24.513Z","dependency_job_id":null,"html_url":"https://github.com/clojurestream/stripe-clojure","commit_stats":null,"previous_names":["clojurestream/stripe-clojure"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clojurestream%2Fstripe-clojure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clojurestream%2Fstripe-clojure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clojurestream%2Fstripe-clojure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clojurestream%2Fstripe-clojure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clojurestream","download_url":"https://codeload.github.com/clojurestream/stripe-clojure/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241731744,"owners_count":20010781,"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":["clojure","sdk","stripe"],"created_at":"2025-03-03T20:03:31.916Z","updated_at":"2025-03-03T20:03:32.603Z","avatar_url":"https://github.com/clojurestream.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stripe Clojure SDK\n\nThe Stripe Clojure (JVM) library provides convenient access to the Stripe API from applications written in the Clojure language. It provides a seamless and idiomatic way for Clojure developers to integrate with Stripe's powerful payment and financial services. It abstracts the complexities of Stripe's API into a well-structured, functional interface, making it easier to process payments, manage subscriptions, and interact with Stripe’s extensive feature set.\n\nThis library is automatically generated using Stripe's OpenAPI specification, ensuring up-to-date compatibility with the latest Stripe API features.\n\n\u003e [!CAUTION]\n\u003e Alpha (α) : This library is in an early-stage development phase. Names, structures, and functionalities may change as the project evolves. Expect breaking changes before a stable release.\n\n## Rationale \n\nWhile Stripe provides a Java SDK, it is designed for object-oriented workflows, requiring developers to write wrappers and modify objects constantly to fit Clojure’s functional programming paradigm. This leads to:\n\n- Unnecessary Complexity – The Java SDK enforces mutability and builder patterns, which are at odds with idiomatic Clojure development.\n\n- Verbose Interop Code – Constant conversions between Java objects and Clojure data structures slow down development and introduce boilerplate.\n\n- Inefficient Workflows – The imperative style of Java SDKs makes composition and data transformation harder in Clojure.\n\n- Missed Opportunities for Idiomatic Clojure Design – A native Clojure SDK allows for seamless integration.\n\nThis library follows a similar approach to [Cognitect’s AWS API](https://github.com/cognitect-labs/aws-api), in that it is automatically generated from Stripe’s OpenAPI specification. This ensures that it stays up to date with Stripe’s evolving API, reduces maintenance overhead, and provides a dynamic, data-driven interface for developers.\n\n## Getting Started\n\nThis SDK is an auto-generated Clojure library for interacting with the Stripe API. It organizes functions by resource (e.g. customers, coupons, subscriptions, bank accounts, etc.) so you can work with a high-level, idiomatic API without worrying about low-level HTTP calls.\n\n### Installation\n\nAdd the dependency to your `deps.edn` (or your preferred build tool) once the artifact is published to Clojars. For example:\n\n```clojure\n{:deps {io.github.clojurestream/stripe-clojure {:git/tag \"TAG\" :git/sha \"SHA\"}}}\n```\n\n### Configuring Your API Key\n\nThe SDK uses a dynamic var to hold your Stripe API key. To avoid having to wrap every call in `binding`, you can set the API key globally at startup using the provided `set-api-key` function.\n\nIn your project, require the `api` namespace and call `set-api-key`:\n\n```clojure\n(ns playground\n  (:require [stream.clojure.stripe.api :as stripe]))\n\n;; Set the API key once at startup:\n(stripe/set-api-key \"sk_live_your_production_key\")\n```\n\nThis ensures that all subsequent calls to the SDK will automatically use your configured API key.\n\n### Example Usage\n\nThe SDK organizes functions into resource-specific namespaces. Each function accepts a single map argument using destructuring for required path and query parameters. For example, to work with customers:\n\n```clojure\n(ns playground\n  (:require\n    [stream.clojure.stripe.api :as stripe]\n    [stream.clojure.stripe.api.customers :as customers]\n    ))\n\n;; Set your API key globally (you can do this in your main entry point)\n(stripe/set-api-key \"sk_live_your_production_key\")\n\n;; List all cards for a customer:\n(customers/list-all-customer-cards \n  {:customer-id example-customer-id \n   :query-params {:limit 10}})\n\n;; List all customers:\n(customers/list-all\n  {:query-params {:limit 10}})\n```\n\nSimilarly, to work with coupons, subscriptions, or bank accounts, require the respective namespace and call the functions with a map containing the necessary parameters.\n\n## Versioning\n\nOur versioning scheme is designed to clearly communicate both the underlying Stripe API version and the version of our Clojure SDK. Each published artifact is named using the following pattern:\n\n```\nstripe-YYYY-MM-DD.\u003ccodename\u003e/clojure-sdk-X.Y.Z\n```\n\nFor example, consider the artifact:\n\n```\nstripe-2025-02-24.acacia/clojure-sdk-0.0.6\n```\n\nThis breaks down as follows:\n\n- **Stripe API Version:**  \n  `stripe-2025-02-24.acacia`\n  - `2025-02-24` indicates the date/version of the Stripe API used to generate the SDK.\n  - `acacia` is a codename that can help identify significant releases or milestones.\n    \n  Learn more about [Stripe Versioning](https://stripe.com/blog/introducing-stripes-new-api-release-process)\n\n\n- **SDK Version:**  \n  `clojure-sdk-0.0.6`\n  - This follows standard semantic versioning (X.Y.Z) for our Clojure SDK.\n  - Changes to this version reflect updates, bug fixes, or potential breaking changes in our client library, independent of the underlying API.\n\n## Roadmap:\n\n### Phase 1: Prototype\nEstablish the core architecture and foundational components for API interaction.\n- [x] Adopt OpenAPI Specification – Automatically generate API functions to keep up with Stripe’s evolving features.\n- [x] Base HTTP Client Implementation – Moved from clj-http.client to Java 11's HttpClient for reliability.\n\n### Phase 2: Alpha (Current Stage)\n- [x] Standardized Function Naming – Ensured consistency and idiomatic Clojure practices.\n- [x] Improve Developer Experience – Add comprehensive docstrings and REPL-friendly usage guidance.\n- [x] Split Functions by Resource - Add ns fod different resource for easier exploration.\n- [ ] Error Handling \u0026 Logging – Provide structured logging and clear error messages for debugging.\n- [x] Configuration - Centralized client configuration that holds :api-key etc.\n- [x] Versioning - ensures targeting the correct version of the Stripe API while also tracking the evolution of the Clojure SDK\n\n### Phase 3: Beta \nFeature-complete but may contain bugs; users can provide feedback.\n- [ ] Automated Testing \u0026 CI/CD Pipelines – Ensure continuous validation of API functionality.\n- [ ] Automated Deployment \u0026 Distribution – Set up Clojars, GitHub releases, and workflow automation.\n\n#### Early Adopter Phase (Pre-1.0)\nThe project remains publicly available on GitHub, but this phase marks:\n- [ ] A **wider call for contributors** to test and improve the library.\n- [ ] **Encouraging community feedback** on API design and usability.\n- [ ] The first **stable API draft**, though still subject to refinement.\n- [ ] Parameter validation with clojure.spec\n\n#### Release Candidate (RC)\nA stable version with a clear versioning scheme to align with Stripe for ease of use.\n\n### Phase 4: Production \u0026 Maintenance\n- [ ] **General Availability (GA)** – Fully stable, recommended for production use. Continuous monitoring and incremental improvements.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclojurestream%2Fstripe-clojure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclojurestream%2Fstripe-clojure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclojurestream%2Fstripe-clojure/lists"}