{"id":50288320,"url":"https://github.com/sztheory/lattice_stripe","last_synced_at":"2026-05-28T04:01:04.977Z","repository":{"id":349047609,"uuid":"1200894245","full_name":"szTheory/lattice_stripe","owner":"szTheory","description":"A production-grade, idiomatic Elixir SDK for the Stripe API","archived":false,"fork":false,"pushed_at":"2026-05-27T06:06:49.000Z","size":3358,"stargazers_count":0,"open_issues_count":12,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-27T08:06:56.310Z","etag":null,"topics":["elixir","elixir-library","hex-package","payments","sdk","stripe"],"latest_commit_sha":null,"homepage":null,"language":"Elixir","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/szTheory.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-04T00:33:12.000Z","updated_at":"2026-05-27T06:05:42.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/szTheory/lattice_stripe","commit_stats":null,"previous_names":["sztheory/lattice_stripe"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/szTheory/lattice_stripe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szTheory%2Flattice_stripe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szTheory%2Flattice_stripe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szTheory%2Flattice_stripe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szTheory%2Flattice_stripe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/szTheory","download_url":"https://codeload.github.com/szTheory/lattice_stripe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szTheory%2Flattice_stripe/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33593400,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"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":["elixir","elixir-library","hex-package","payments","sdk","stripe"],"created_at":"2026-05-28T04:00:31.662Z","updated_at":"2026-05-28T04:01:04.969Z","avatar_url":"https://github.com/szTheory.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LatticeStripe\n\n[![Hex.pm](https://img.shields.io/hexpm/v/lattice_stripe.svg)](https://hex.pm/packages/lattice_stripe)\n[![CI](https://github.com/szTheory/lattice_stripe/actions/workflows/ci.yml/badge.svg)](https://github.com/szTheory/lattice_stripe/actions/workflows/ci.yml)\n[![Docs](https://img.shields.io/badge/hex-docs-blue.svg)](https://hexdocs.pm/lattice_stripe)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n\n\u003e **Current release:** **`1.7.x`** on [Hex](https://hex.pm/packages/lattice_stripe) — see [CHANGELOG](CHANGELOG.md#170) for what shipped since 1.1.0. Evaluating fit? Start with [User Flows \u0026 JTBD](guides/user-flows-and-jtbd.md).\n\nA production-grade, idiomatic Elixir SDK for the Stripe API.\n\nFull documentation available on [HexDocs](https://hexdocs.pm/lattice_stripe).\n\nIf you are evaluating how this fits into a real SaaS billing architecture, start with\n[Guide: User Flows \u0026 JTBD](guides/user-flows-and-jtbd.md).\n\n## v1.x scope\n\nAs of **1.7.0**, LatticeStripe is **feature-complete for its intended v1.x scope**: mainstream SaaS integrations — payments, billing, Connect, tax on custom flows, webhooks (including thin events), and production operator guides.\n\n**Not in v1.x scope** (maintenance mode; additions only on adopter pull):\n\n- **Specialist Stripe families:** Identity; Treasury; Issuing; Terminal; Financial Connections; Climate; Sigma; Reporting\n- **Tax narrow follow-ups:** Tax Code lookup (`/v1/tax_codes`); Tax Transaction list (if Stripe adds the endpoint)\n\nSee [Scope](guides/scope.md) for boundaries, escape hatches, and how to request coverage.\nSee [API Stability](guides/api_stability.md) for the semver contract.\n\n## Docs Ladder\n\nUse the docs in this order:\n\n- **README** for the repo-level surface map and route-by-intent overview\n- **[Getting Started](guides/getting-started.md)** for first success with a live client and API call\n- **[User Flows \u0026 JTBD](guides/user-flows-and-jtbd.md)** for \"which Stripe path fits my SaaS?\"\n- **[Scope](guides/scope.md)** for v1.x boundaries and deferred families\n- **Canonical guides** for the surface you will actually ship\n- **[Recipes](guides/recipes.md)** for compact job-to-primitive bridges\n- **[Webhooks](guides/webhooks.md)**, **[Production Checklist](guides/production-checklist.md)**, **[Event Debugging](guides/event-debugging.md)**, **[Testing](guides/testing.md)**, and **[Error Handling](guides/error-handling.md)** for runtime truth and support posture\n\n## Choose Your Route\n\n- **I want first success fast**:\n  [Getting Started](guides/getting-started.md), [Payments](guides/payments.md), [Checkout](guides/checkout.md)\n- **I am evaluating recurring billing for a SaaS**:\n  [User Flows \u0026 JTBD](guides/user-flows-and-jtbd.md), [Subscriptions](guides/subscriptions.md), [Customer Portal](guides/customer-portal.md), [Webhooks](guides/webhooks.md)\n- **I need usage-based billing and reconciliation**:\n  [Metering](guides/metering.md), [Webhooks](guides/webhooks.md), [Testing](guides/testing.md)\n- **I calculate tax on custom payment flows (not only Checkout/Invoices)**:\n  [Tax](guides/tax.md), [Payments](guides/payments.md), [Testing](guides/testing.md)\n- **I run a marketplace or platform**:\n  [Connect](guides/connect.md), [Connect Accounts](guides/connect-accounts.md), [Connect Money Movement](guides/connect-money-movement.md)\n- **I am hardening ops and support paths**:\n  [Production Checklist](guides/production-checklist.md), [Error Handling](guides/error-handling.md), [Testing](guides/testing.md), [Webhooks](guides/webhooks.md), [Webhooks: Thin Events](guides/webhooks-thin-events.md), [Event Debugging](guides/event-debugging.md)\n\n## Installation\n\nAdd `lattice_stripe` to your dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:lattice_stripe, \"~\u003e 1.7\"}\n  ]\nend\n```\n\n## Quick Start\n\nLatticeStripe uses [Finch](https://github.com/sneako/finch) for HTTP requests. Add it to your supervision tree in `application.ex`:\n\n```elixir\nchildren = [\n  {Finch, name: MyApp.Finch}\n]\n```\n\nThen create a client and make your first API call:\n\n```elixir\nclient = LatticeStripe.Client.new!(\n  api_key: \"sk_test_...\",\n  finch: MyApp.Finch\n)\n\n{:ok, payment_intent} = LatticeStripe.PaymentIntent.create(client, %{\n  \"amount\" =\u003e 2000,\n  \"currency\" =\u003e \"usd\",\n  \"payment_method\" =\u003e \"pm_card_visa\",\n  \"confirm\" =\u003e true,\n  \"automatic_payment_methods\" =\u003e %{\"enabled\" =\u003e true, \"allow_redirects\" =\u003e \"never\"}\n})\n\nIO.puts(\"PaymentIntent created: #{payment_intent.id}\")\n```\n\n## Features\n\n### Payments\n\n- Customers, PaymentIntents, SetupIntents, PaymentMethods, Refunds, Checkout Sessions (payment / subscription / setup modes)\n- Charge list/search/update/capture for support, audit, and Connect reconciliation — [Charge API](https://hexdocs.pm/lattice_stripe/LatticeStripe.Charge.html) (PI-first; no `create`)\n- Structured, pattern-matchable errors: `:card_error`, `:authentication_error`, `:rate_limit_error`, `:api_error`, and more — [Guide: Error Handling](guides/error-handling.md)\n- Auto-pagination — stream through large result sets lazily with Elixir Streams\n- [Guide: Payments](guides/payments.md)\n\n### Billing\n\n- Invoices — create, finalize, pay, void, send, list, search\n- Credit Notes — preview, create, void, and inspect/stream line items\n- Quotes — create, finalize, accept/cancel, inspect/stream line items, and download PDFs\n- Subscriptions with lifecycle verbs (cancel, resume, pause_collection, trial settings)\n- Subscription Schedules for phased billing with proration guards\n- Billing Metering — usage-based billing with `Meter`, `MeterEvent`, and `MeterEventAdjustment`; two-layer idempotency and pre-flight value guards\n- Customer Portal — `BillingPortal.Session` for self-service portal URLs with 4 flow types (subscription_cancel, subscription_update, subscription_update_confirm, payment_method_update) and Inspect masking\n- [Guide: Subscriptions](guides/subscriptions.md) · [Guide: Credit Notes](guides/credit_notes.md) · [Guide: Metering](guides/metering.md) · [Guide: Tax](guides/tax.md) · [Guide: Customer Portal](guides/customer-portal.md)\n\n### Operations and diagnostics\n\n- Files and FileLinks — upload files to Stripe, manage shareable file links, and download binary content\n- Disputes — retrieve/list, update metadata, stage evidence safely, submit evidence, and close disputes\n- Mandates and SetupAttempts — inspect payment authorization state and SetupIntent failure history\n- Operator playbooks: [Production Checklist](guides/production-checklist.md) · [Event Debugging](guides/event-debugging.md)\n- [Guide: Recipes](guides/recipes.md) · [Guide: Webhooks](guides/webhooks.md) · [Guide: Webhooks: Thin Events](guides/webhooks-thin-events.md) · [Guide: Testing](guides/testing.md)\n- Full ops guide ladder: [Docs Ladder](#docs-ladder) and [User Flows \u0026 JTBD](guides/user-flows-and-jtbd.md) (Job 7)\n\n### Connect\n\n- Connect accounts (Standard, Express, Custom) with onboarding AccountLinks\n- Transfers, TransferReversals, Payouts, External Accounts\n- Balance + BalanceTransactions for platform-fee reconciliation\n- Per-client and per-request `stripe_account` for platform integrations\n- [Guide: Connect](guides/connect.md)\n\n### Platform\n\n- Pluggable `Transport`, `Json`, and `RetryStrategy` behaviours — bring your own HTTP client\n- Automatic retry with exponential backoff, respecting Stripe's `Stripe-Should-Retry` header\n- Automatic idempotency-key generation and safe replay\n- Telemetry events for every request, compatible with any monitoring stack\n- Phoenix-ready `Webhook.Plug` snapshot path + thin-event (`/v2/events`) helpers for fetch-after-verify integration\n- [Guide: Extending LatticeStripe](guides/extending-lattice-stripe.md)\n\n## Compatibility\n\n| Requirement | Version |\n|-------------|---------|\n| Elixir | \u003e= 1.15 |\n| Erlang/OTP | \u003e= 26 |\n| Stripe API | 2026-03-25.dahlia |\n\n## Documentation\n\nFull documentation with guides, examples, and API reference is available on\n[HexDocs](https://hexdocs.pm/lattice_stripe).\n\nStart here on HexDocs:\n\n- [Getting Started](https://hexdocs.pm/lattice_stripe/getting-started.html)\n- [User Flows \u0026 JTBD](https://hexdocs.pm/lattice_stripe/user-flows-and-jtbd.html)\n- [Recipes](https://hexdocs.pm/lattice_stripe/recipes.html)\n\nCanonical guide clusters:\n\n- **Payments and billing primitives**:\n  [Payments](https://hexdocs.pm/lattice_stripe/payments.html), [Checkout](https://hexdocs.pm/lattice_stripe/checkout.html), [Invoices](https://hexdocs.pm/lattice_stripe/invoices.html), [Credit Notes](https://hexdocs.pm/lattice_stripe/credit_notes.html), [Subscriptions](https://hexdocs.pm/lattice_stripe/subscriptions.html), [Customer Portal](https://hexdocs.pm/lattice_stripe/customer-portal.html), [Metering](https://hexdocs.pm/lattice_stripe/metering.html), [Tax](https://hexdocs.pm/lattice_stripe/tax.html), [Charge API](https://hexdocs.pm/lattice_stripe/LatticeStripe.Charge.html)\n- **Connect**:\n  [Connect](https://hexdocs.pm/lattice_stripe/connect.html), [Connect Accounts](https://hexdocs.pm/lattice_stripe/connect-accounts.html), [Connect Money Movement](https://hexdocs.pm/lattice_stripe/connect-money-movement.html)\n- **Operations and DX**:\n  [Webhooks](https://hexdocs.pm/lattice_stripe/webhooks.html), [Webhooks: Thin Events](https://hexdocs.pm/lattice_stripe/webhooks-thin-events.html), [Production Checklist](https://hexdocs.pm/lattice_stripe/production-checklist.html), [Event Debugging](https://hexdocs.pm/lattice_stripe/event-debugging.html), [Testing](https://hexdocs.pm/lattice_stripe/testing.html), [Error Handling](https://hexdocs.pm/lattice_stripe/error-handling.html), [Client Configuration](https://hexdocs.pm/lattice_stripe/client-configuration.html), [Performance](https://hexdocs.pm/lattice_stripe/performance.html), [Circuit Breaker](https://hexdocs.pm/lattice_stripe/circuit-breaker.html), [OpenTelemetry](https://hexdocs.pm/lattice_stripe/opentelemetry.html), [Telemetry](https://hexdocs.pm/lattice_stripe/telemetry.html), [API Stability](https://hexdocs.pm/lattice_stripe/api_stability.html), [Extending LatticeStripe](https://hexdocs.pm/lattice_stripe/extending-lattice-stripe.html), [Cheatsheet](https://hexdocs.pm/lattice_stripe/cheatsheet.html)\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and guidelines.\n\n## License\n\nMIT — see [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsztheory%2Flattice_stripe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsztheory%2Flattice_stripe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsztheory%2Flattice_stripe/lists"}