{"id":32303934,"url":"https://github.com/ezet/stripe-sdk","last_synced_at":"2026-02-21T02:39:46.579Z","repository":{"id":35103091,"uuid":"205471643","full_name":"ezet/stripe-sdk","owner":"ezet","description":"A simple and flexible Stripe library for Flutter with complete support for SCA and PSD2.","archived":false,"fork":false,"pushed_at":"2023-07-31T17:57:19.000Z","size":944,"stargazers_count":139,"open_issues_count":7,"forks_count":137,"subscribers_count":9,"default_branch":"master","last_synced_at":"2026-02-15T12:41:33.683Z","etag":null,"topics":["api","dart","dart2","flutter","library","psd2","stripe"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/stripe_sdk","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ezet.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2019-08-30T23:52:22.000Z","updated_at":"2026-01-11T13:00:27.000Z","dependencies_parsed_at":"2024-06-20T22:09:47.982Z","dependency_job_id":null,"html_url":"https://github.com/ezet/stripe-sdk","commit_stats":null,"previous_names":["ezet/stripe_sdk"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ezet/stripe-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezet%2Fstripe-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezet%2Fstripe-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezet%2Fstripe-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezet%2Fstripe-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ezet","download_url":"https://codeload.github.com/ezet/stripe-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezet%2Fstripe-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29671794,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T00:11:43.526Z","status":"online","status_checked_at":"2026-02-21T02:00:07.432Z","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":["api","dart","dart2","flutter","library","psd2","stripe"],"created_at":"2025-10-23T06:13:32.853Z","updated_at":"2026-02-21T02:39:46.571Z","avatar_url":"https://github.com/ezet.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![pub package](https://img.shields.io/pub/v/stripe_sdk.svg)](https://pub.dev/packages/stripe_sdk)\n\n# Flutter Stripe SDK\n\nA native dart package for Stripe. There are various other flutter plugins that wrap existing Stripe libraries,\nbut this package uses a different approach.\nIt does not wrap existing Stripe libraries, but instead accesses the Stripe API directly.\n\nFlutter support:\n* [x] iOS\n* [x] Android\n* [x] Web\n\nSee *example/main.dart* for additional short examples.\n\nSee \u003chttps://github.com/ezet/stripe-sdk/tree/master/example\u003e for a complete demo application,\nwith a working example backend.\n\nDemo backend: \u003chttps://github.com/ezet/stripe-sdk-demo-api\u003e\n\n## Features\n\n* Supports all types of SCA, including 3DS, 3DS2, BankID and others.\n* Handle payments with complete SCA support.\n* Add, remove and update payment methods, sources and cards, optionally with SCA.\n* Manage customer information.\n* Create all types of Stripe tokens.\n\n### Supported APIs\n\n- PaymentIntent, with SCA\n- SetupIntent, with SCA\n- PaymentMethod\n- Customer\n- Cards\n- Sources\n- Tokens\n\n\n## Demo application\n\nThere is a complete demo application available at \u003chttps://github.com/ezet/stripe-sdk/tree/master/example/app\u003e.\n\n\u003cimg src=\"https://raw.githubusercontent.com/ezet/stripe-sdk/master/doc/demo.png\" width=\"300\"\u003e\n\n\n## Overview\n\n- The return type for each function is `Future\u003cMap\u003cString, dynamic\u003e\u003e`, where the value depends on the stripe API version.\n\nThe library has three classes to access the Stripe API:\n\n- `Stripe` for generic, non-customer specific APIs, using publishable keys.\n- `CustomerSession` for customer-specific APIs, using stripe ephemeral keys.\n- `StripeApi` enables raw REST calls against the Stripe API.\n\n\n### Stripe\n\n- \u003chttps://stripe.dev/stripe-android/index.html?com/stripe/android/Stripe.html\u003e\n\nAims to provide high-level functionality similar to the official mobile Stripe SDKs.\n\n### CustomerSession\n\n_Requires a Stripe ephemeral key._\n\n- \u003chttps://stripe.com/docs/mobile/android/customer-information#customer-session-no-ui\u003e\n- \u003chttps://stripe.com/docs/mobile/android/standard#creating-ephemeral-keys\u003e\n\nProvides functionality similar to CustomerSession in the Stripe Android SDK.\n\n### StripeApi\n\n- \u003chttps://stripe.com/docs/api\u003e\n\nProvides basic low-level methods to access the Stripe REST API. \n\n- Limited to the APIs that can be used with a public key or ephemeral key.\n- Library methods map to a Stripe API call with the same name.\n- Additional parameters can be provided as an optional argument.\n\n\n _`Stripe` and `CustomerSession` use this internally._\n\n## Initialization\n\nAll classes offer a singleton instance that can be initiated by calling the `init(...)` methods and then accessed through `.instance`.\nRegular instances can also be created using the constructor, which allows them to be managed by e.g. dependency injection instead.\n\n### Stripe\n\n```dart\nStripe.init('pk_xxx');\n// or, to manage your own instance, or multiple instances\nfinal stripe = Stripe('pk_xxx');\n```\n\n### CustomerSession\n\nThe function that retrieves the ephemeral key must return the JSON response as a plain string.\n\n```dart\nCustomerSession.init((apiVersion) =\u003e server.getEphemeralKeyFromServer(apiVersion));\n// or, to manage your own instances\nfinal session = CustomerSession((apiVersion) =\u003e server.getEphemeralKeyFromServer(apiVersion));\n```\n\n### StripeApi\n\n```dart\nStripeApi.init('pk_xxx');\n// or, to manage your own instances\nfinal stripeApi = StripeApi('pk_xxx');\n```\n\n## SCA/PSD2\n\nThe library offers complete support for SCA on iOS and Android.\nIt handles all types of SCA, including 3DS, 3DS2, BankID and others.\nIt handles SCA by launching the authentication flow in a web browser, and returns the result to the app.\nThe `returnUrlForSca` parameter must match the configuration of your `AndroidManifest.xml` and `Info.plist` as shown in the next steps.\n\n```dart\nStripe.init('pk_xxx', returnUrlForSca: 'stripesdk://3ds.stripesdk.io');\nfinal clientSecret = await server.createPaymentIntent(Stripe.instance.getReturnUrlForSca());\nfinal paymentIntent = await Stripe.instance.confirmPayment(clientSecret, paymentMethodId: 'pm_card_visa');\n```\n\n### Android\n\nYou need to declare the following intent filter in `android/app/src/main/AndroidManifest.xml`.\nThis example is for the url `stripesdk://3ds.stripesdk.io`:\n\n```xml\n\u003cmanifest ...\u003e\n  \u003c!-- ... other tags --\u003e\n  \u003capplication ...\u003e\n    \u003cactivity ...\u003e\n    \n      \u003c!-- The launchMode should be singleTop or singleTask,\n        to avoid launching a new instance of the app when SCA has been completed. --\u003e\n      android:launchMode=\"singleTop\"\n\n      \n      \u003c!-- ... other tags --\u003e\n\n      \u003c!-- Deep Links --\u003e\n      \u003cintent-filter\u003e\n        \u003caction android:name=\"android.intent.action.VIEW\" /\u003e\n        \u003ccategory android:name=\"android.intent.category.DEFAULT\" /\u003e\n        \u003ccategory android:name=\"android.intent.category.BROWSABLE\" /\u003e\n        \u003cdata\n          android:scheme=\"stripesdk\"\n          android:host=\"3ds.stripesdk.io\" /\u003e\n      \u003c/intent-filter\u003e\n    \u003c/activity\u003e\n  \u003c/application\u003e\n\u003c/manifest\u003e\n```\n\n### IOS\n\nFor iOS you need to declare the scheme in `ios/Runner/Info.plist` (or through Xcode's Target Info editor,\nunder URL Types). This example is for the url `stripesdk://3ds.stripesdk.io`:\n\n```xml\n\u003c!-- ... other tags --\u003e\n\u003cplist\u003e\n    \u003cdict\u003e\n    \u003c!-- ... other tags --\u003e\n    \u003ckey\u003eCFBundleURLTypes\u003c/key\u003e\n    \u003carray\u003e\n        \u003cdict\u003e\n        \u003ckey\u003eCFBundleTypeRole\u003c/key\u003e\n        \u003cstring\u003eEditor\u003c/string\u003e\n        \u003ckey\u003eCFBundleURLName\u003c/key\u003e\n        \u003cstring\u003e3ds.stripesdk.io\u003c/string\u003e\n        \u003ckey\u003eCFBundleURLSchemes\u003c/key\u003e\n        \u003carray\u003e\n            \u003cstring\u003estripesdk\u003c/string\u003e\n        \u003c/array\u003e\n        \u003c/dict\u003e\n    \u003c/array\u003e\n    \u003c!-- ... other tags --\u003e\n    \u003c/dict\u003e\n\u003c/plist\u003e\n```\n\n## Experimental\n\nExperimental features are marked as `deprecated` and the API is subject to change until it is deemed stable.\nFeel free to use these features but be aware that breaking changes might be introduced in minor updates.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fezet%2Fstripe-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fezet%2Fstripe-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fezet%2Fstripe-sdk/lists"}