{"id":32331221,"url":"https://github.com/siarheidudko/stripe-js","last_synced_at":"2026-02-06T03:09:53.053Z","repository":{"id":65177451,"uuid":"585141068","full_name":"siarheidudko/stripe-js","owner":"siarheidudko","description":"Additional methods for working with stripe-js","archived":false,"fork":false,"pushed_at":"2026-02-02T01:41:05.000Z","size":1922,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-02T11:05:37.831Z","etag":null,"topics":["angular","javascript","payments","react","react-native","reactjs","stripe","stripe-api","stripe-js","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@sergdudko/stripe-js","language":"TypeScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"remedyproduct/stripe-js","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/siarheidudko.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":"FUNDING.yml","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"patreon":"dudko_dev","custom":["http://dudko.dev/donate","https://paypal.me/dudkodev","https://www.buymeacoffee.com/dudko.dev"]}},"created_at":"2023-01-04T12:26:54.000Z","updated_at":"2026-02-02T01:41:08.000Z","dependencies_parsed_at":"2023-10-11T23:51:51.702Z","dependency_job_id":"3b9b7ab3-0f71-47e8-9576-136bcb73fdf2","html_url":"https://github.com/siarheidudko/stripe-js","commit_stats":null,"previous_names":[],"tags_count":486,"template":false,"template_full_name":null,"purl":"pkg:github/siarheidudko/stripe-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siarheidudko%2Fstripe-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siarheidudko%2Fstripe-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siarheidudko%2Fstripe-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siarheidudko%2Fstripe-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/siarheidudko","download_url":"https://codeload.github.com/siarheidudko/stripe-js/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siarheidudko%2Fstripe-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29147517,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T02:39:25.012Z","status":"ssl_error","status_checked_at":"2026-02-06T02:37:22.784Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["angular","javascript","payments","react","react-native","reactjs","stripe","stripe-api","stripe-js","typescript"],"created_at":"2025-10-23T19:05:49.884Z","updated_at":"2026-02-06T03:09:53.035Z","avatar_url":"https://github.com/siarheidudko.png","language":"TypeScript","funding_links":["https://patreon.com/dudko_dev","http://dudko.dev/donate","https://paypal.me/dudkodev","https://www.buymeacoffee.com/dudko.dev"],"categories":[],"sub_categories":[],"readme":"# @sergdudko/stripe-js\n\nSupercharge Your Stripe Integration with Enhanced Methods for stripe-js: Take Full Control of Customer Card Management Right from Your Frontend! Elevate Your Payment Processing Capabilities with Ease and Efficiency.\n\n[![npm](https://img.shields.io/npm/v/@sergdudko/stripe-js.svg)](https://www.npmjs.com/package/@sergdudko/stripe-js)\n[![npm](https://img.shields.io/npm/dy/@sergdudko/stripe-js.svg)](https://www.npmjs.com/package/@sergdudko/stripe-js)\n[![NpmLicense](https://img.shields.io/npm/l/@sergdudko/stripe-js.svg)](https://www.npmjs.com/package/@sergdudko/stripe-js)\n![GitHub last commit](https://img.shields.io/github/last-commit/siarheidudko/stripe-js.svg)\n![GitHub release](https://img.shields.io/github/release/siarheidudko/stripe-js.svg)\n\n## 🚀 What's New in v2.0.0\n\n- ✅ **Dual Package**: Full support for both CommonJS and ES Modules\n- ✅ **TypeScript**: Complete type definitions and TypeScript source\n- ✅ **Optimized Types**: Shared type definitions for smaller bundle size\n- ✅ **TypeScript Tests**: All tests converted to TypeScript with `node --test --import tsx`\n- ✅ **Better Tree-shaking**: Optimized module structure for better bundling\n\n## Usage\n\n### ES Modules (Recommended)\n\n```typescript\nimport { loadStripe } from \"@sergdudko/stripe-js\";\n\nconst stripe = await loadStripe(\"pk_test_TYooMQauvdEDq54NiTphI7jx\");\n```\n\n### CommonJS\n\n```javascript\nconst { loadStripe } = require(\"@sergdudko/stripe-js\");\n\nconst stripe = await loadStripe(\"pk_test_TYooMQauvdEDq54NiTphI7jx\");\n```\n\n## Stripe.js Documentation\n\n- [Stripe.js Docs](https://stripe.com/docs/stripe-js)\n- [Stripe.js Reference](https://stripe.com/docs/js)\n- [React Stripe.js Docs](https://stripe.com/docs/stripe-js/react)\n\n## Additional Methods\n\n| Method                              | Arguments                                           | Description                                                                  |\n| ----------------------------------- | --------------------------------------------------- | ---------------------------------------------------------------------------- |\n| getCustomer                         | [customer_id], [ephemeral_key]                      | Get customer.                                                                |\n| confirmPaymentIntentByCard          | [client_secret], [card_id], [returnUrl]             | Confirm payment intent with the user's payment card (sources api).           |\n| addSourceToCustomer                 | [source or token], [customer_id], [ephemeral_key]   | Add payment card to customer (from source or token, sources api).            |\n| deleteSourceFromCustomer            | [source_id], [customer_id], [ephemeral_key]         | Delete payment card from customer (sources api).                             |\n| getAllCards                         | [customer_id], [ephemeral_key]                      | Get all cards from customer (sources api).                                   |\n| setDefaultCard                      | [defaultCardId], [customer_id], [ephemeral_key]     | Set default card (sources api).                                              |\n| getDefaultCard                      | [customer_id], [ephemeral_key]                      | Get customer default payment card (sources api).                             |\n| confirmPaymentIntentByPaymentMethod | [client_secret], [payment_method_id], [returnUrl]   | Confirm payment intent with the user's payment method (payment methods api). |\n| addPaymentMethodToCustomer          | [payment_method_id], [customer_id], [ephemeral_key] | Attach payment method to customer (payment methods api).                     |\n| deletePaymentMethodFromCustomer     | [payment_method_id], [ephemeral_key]                | Detach payment method from customer (payment methods api).                   |\n| getAllPaymentMethods                | [customer_id], [ephemeral_key]                      | Get all payment methods from customer (payment methods api).                 |\n| setDefaultPaymentMethod             | [payment_method_id], [customer_id], [ephemeral_key] | Set customer default payment method (payment methods api).                   |\n\n## Examples\n\n```\nstripe.getCustomer(\n  'cus_KO9SkBdMeHoMXR',\n  'ek_test_YWNjdF8xSFhSd0xIZGxNYVpsZTNlLENrVUxKWWNjZExxSDJDb1VKa1YwaXU5VDZVcmVmQXQ_00drAg7pBQ'\n);\n\nstripe.confirmPaymentIntentByCard(\n  'pi_3Jrk80HdlMaZle3e1tGtSxiH_secret_mWdWNlqJfkYEoYOml1GqRPyPm',\n  'card_1JrMi8HdlMaZle3eSPPOvapJ',\n  'https://stripe.com/'\n);\n\nstripe.addSourceToCustomer(\n  'tok_visa',\n  'cus_KO9SkBdMeHoMXR',\n  'ek_test_YWNjdF8xSFhSd0xIZGxNYVpsZTNlLENrVUxKWWNjZExxSDJDb1VKa1YwaXU5VDZVcmVmQXQ_00drAg7pBQ'\n);\n\nstripe.deleteSourceFromCustomer(\n  'card_1JroRSHdlMaZle3e4EIGOZuv',\n  'cus_KO9SkBdMeHoMXR',\n  'ek_test_YWNjdF8xSFhSd0xIZGxNYVpsZTNlLENrVUxKWWNjZExxSDJDb1VKa1YwaXU5VDZVcmVmQXQ_00drAg7pBQ'\n);\n\nstripe.getAllCards(\n  'cus_KO9SkBdMeHoMXR',\n  'ek_test_YWNjdF8xSFhSd0xIZGxNYVpsZTNlLENrVUxKWWNjZExxSDJDb1VKa1YwaXU5VDZVcmVmQXQ_00drAg7pBQ'\n);\n\nstripe.setDefaultCard(\n  'card_1JrMi8HdlMaZle3eSPPOvapJ',\n  'cus_KO9SkBdMeHoMXR',\n  'ek_test_YWNjdF8xSFhSd0xIZGxNYVpsZTNlLENrVUxKWWNjZExxSDJDb1VKa1YwaXU5VDZVcmVmQXQ_00drAg7pBQ'\n);\n\nstripe.getDefaultCard(\n  'cus_KO9SkBdMeHoMXR',\n  'ek_test_YWNjdF8xSFhSd0xIZGxNYVpsZTNlLENrVUxKWWNjZExxSDJDb1VKa1YwaXU5VDZVcmVmQXQ_00drAg7pBQ'\n);\n\nstripe.confirmPaymentIntentByPaymentMethod(\n  'pi_3Jrk80HdlMaZle3e1tGtSxiH_secret_mWdWNlqJfkYEoYOml1GqRPyPm',\n  'pm_1JrMi8HdlMaZle3eSPPOvapJ',\n  'https://stripe.com/'\n);\n\nstripe.addPaymentMethodToCustomer(\n  'pm_1JrMi8HdlMaZle3eSPPOvapJ',\n  'cus_KO9SkBdMeHoMXR',\n  'ek_test_YWNjdF8xSFhSd0xIZGxNYVpsZTNlLENrVUxKWWNjZExxSDJDb1VKa1YwaXU5VDZVcmVmQXQ_00drAg7pBQ'\n);\n\nstripe.deletePaymentMethodFromCustomer(\n  'pm_1JrMi8HdlMaZle3eSPPOvapJ',\n  'ek_test_YWNjdF8xSFhSd0xIZGxNYVpsZTNlLENrVUxKWWNjZExxSDJDb1VKa1YwaXU5VDZVcmVmQXQ_00drAg7pBQ'\n);\n\nstripe.getAllPaymentMethods(\n  'cus_KO9SkBdMeHoMXR',\n  'ek_test_YWNjdF8xSFhSd0xIZGxNYVpsZTNlLENrVUxKWWNjZExxSDJDb1VKa1YwaXU5VDZVcmVmQXQ_00drAg7pBQ'\n);\n\nstripe.setDefaultPaymentMethod(\n  'pm_1JrMi8HdlMaZle3eSPPOvapJ',\n  'cus_KO9SkBdMeHoMXR',\n  'ek_test_YWNjdF8xSFhSd0xIZGxNYVpsZTNlLENrVUxKWWNjZExxSDJDb1VKa1YwaXU5VDZVcmVmQXQ_00drAg7pBQ'\n);\n```\n\n## Scripts\n\n- To run linting `npm run lint`.\n- To run build `npm run build`.\n- To run testing `npm run test`.\n- To create docs `npm run doc`.\n\n## 📄 License\n\nMIT License - see [LICENSE](./LICENSE) file for details.\n\n## 🆘 Support\n\n- 📝 **Issues**: [GitHub Issues](https://github.com/siarheidudko/stripe-js/issues)\n- 💬 **Discussions**: [GitHub Discussions](https://github.com/siarheidudko/stripe-js/discussions)\n- 📧 **Email**: [siarhei@dudko.dev](mailto:siarhei@dudko.dev)\n\n## 💝 Support This Project\n\nIf my Stripe JS Extension helps you build amazing applications, consider supporting its development:\n\n- ☕ **[Buy me a coffee](https://www.buymeacoffee.com/dudko.dev)**\n- 💳 **[PayPal](https://paypal.me/dudkodev)**\n- 🎯 **[Patreon](https://patreon.com/dudko_dev)**\n- 🌐 **[More options](http://dudko.dev/donate)**\n\nYour support helps maintain and improve Redux Cluster for the entire community!\n\n---\n\n**Made with ❤️ by [Siarhei Dudko](https://github.com/siarheidudko)**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiarheidudko%2Fstripe-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsiarheidudko%2Fstripe-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiarheidudko%2Fstripe-js/lists"}