{"id":21277654,"url":"https://github.com/weareseeed/react-square-web-payments-sdk","last_synced_at":"2025-03-31T10:07:06.027Z","repository":{"id":38311957,"uuid":"376930812","full_name":"weareseeed/react-square-web-payments-sdk","owner":"weareseeed","description":"Easily create PCI-compliant inputs to accept payments online with the Square Payments API. It supports the following payment methods: credit and debit cards, ACH bank transfers, Apple Pay, Google Pay, Gift Cards and Afterpay/Clearpay.","archived":false,"fork":false,"pushed_at":"2025-03-17T21:32:56.000Z","size":4129,"stargazers_count":41,"open_issues_count":21,"forks_count":44,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-24T06:08:38.691Z","etag":null,"topics":["nextjs","nextjs-payments","nextjs-saas","payment","payments","react","react-pyaments","sdk","typescript"],"latest_commit_sha":null,"homepage":"https://react-square-payments.weareseeed.com/","language":"TypeScript","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/weareseeed.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE-OF-CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-14T19:13:29.000Z","updated_at":"2025-03-17T15:34:23.000Z","dependencies_parsed_at":"2024-02-06T18:43:45.657Z","dependency_job_id":"7940cbd6-a599-4b13-af9a-b756ce070f4e","html_url":"https://github.com/weareseeed/react-square-web-payments-sdk","commit_stats":{"total_commits":408,"total_committers":15,"mean_commits":27.2,"dds":0.6225490196078431,"last_synced_commit":"b97a80f1cc2071ff660b46ac743429dab1d59317"},"previous_names":[],"tags_count":76,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weareseeed%2Freact-square-web-payments-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weareseeed%2Freact-square-web-payments-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weareseeed%2Freact-square-web-payments-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weareseeed%2Freact-square-web-payments-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weareseeed","download_url":"https://codeload.github.com/weareseeed/react-square-web-payments-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246174448,"owners_count":20735407,"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":["nextjs","nextjs-payments","nextjs-saas","payment","payments","react","react-pyaments","sdk","typescript"],"created_at":"2024-11-21T10:06:38.455Z","updated_at":"2025-03-31T10:07:06.008Z","avatar_url":"https://github.com/weareseeed.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-square-web-payments-sdk\n\n`react-square-web-payments-sdk` lets you easily create PCI-compliant inputs to accept payments online with the Square Payments API. It supports the following payment methods: credit and debit cards, ACH bank transfers, Apple Pay, Google Pay, and Gift Cards.\n\n\u003cdiv style={{ textAlign: 'center' }}\u003e\n\nA react wrapper for [Square\u0026apos;s Web Payments SDK](https://developer.squareup.com/docs/web-payments/overview)\n\n[![NPM Version](https://flat.badgen.net/npm/v/react-square-web-payments-sdk)](https://www.npmjs.com/package/react-square-web-payments-sdk)\n[![NPM Downloads](https://flat.badgen.net/npm/dm/react-square-web-payments-sdk)](https://www.npmjs.com/package/react-square-web-payments-sdk)\n[![NPM Dependents](https://flat.badgen.net/npm/dependents/react-square-web-payments-sdk)](https://www.npmjs.com/package/react-square-web-payments-sdk)\n[![Build](https://img.shields.io/github/workflow/status/weareseeed/react-square-web-payments-sdk/CI?style=flat-square)](https://github.com/weareseeed/react-square-web-payments-sdk/actions)\n[![Coverage](https://flat.badgen.net/codecov/c/github/react-hookz/web)](https://app.codecov.io/gh/react-hookz/web)\n[![Types](https://flat.badgen.net/npm/types/react-square-web-payments-sdk)](https://www.npmjs.com/package/react-square-web-payments-sdk)\n[![Tree Shaking](https://flat.badgen.net/bundlephobia/tree-shaking/react-square-web-payments-sdk)](https://bundlephobia.com/result?p=react-square-web-payments-sdk)\n\n\u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n\n[![All Contributors](https://img.shields.io/badge/all_contributors-3-blue.svg?style=flat-square)](#contributors-)\n\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n\n📄 **[DOCS](https://react-square-payments.weareseeed.com/)**\n• ✨ **[CHANGELOG](https://github.com/weareseeed/react-square-web-payments-sdk/releases)**\n\n\u003c/div\u003e\n\n## Install\n\nThis one is pretty simple, everyone knows what to do:\n\n##### NPM\n\n```shell\nnpm install react-square-web-payments-sdk\n```\n\n##### Yarn\n\n```shell\nyarn add react-square-web-payments-sdk\n```\n\n## Usage\n\n```tsx\n// Dependencies\nimport * as React from 'react';\nimport { CreditCard, PaymentForm } from 'react-square-web-payments-sdk';\n\nconst MyPaymentForm = () =\u003e (\n  \u003cPaymentForm\n    /**\n     * Identifies the calling form with a verified application ID generated from\n     * the Square Application Dashboard.\n     */\n    applicationId=\"sq0idp-Y0QZQ-Xx-Xx-Xx-Xx\"\n    /**\n     * Invoked when payment form receives the result of a tokenize generation\n     * request. The result will be a valid credit card or wallet token, or an error.\n     */\n    cardTokenizeResponseReceived={(token, buyer) =\u003e {\n      console.info({ token, buyer });\n    }}\n    /**\n     * This function enable the Strong Customer Authentication (SCA) flow\n     *\n     * We strongly recommend use this function to verify the buyer and reduce\n     * the chance of fraudulent transactions.\n     */\n    createVerificationDetails={() =\u003e ({\n      amount: '1.00',\n      /* collected from the buyer */\n      billingContact: {\n        addressLines: ['123 Main Street', 'Apartment 1'],\n        familyName: 'Doe',\n        givenName: 'John',\n        countryCode: 'GB',\n        city: 'London',\n      },\n      currencyCode: 'GBP',\n      intent: 'CHARGE',\n    })}\n    /**\n     * Identifies the location of the merchant that is taking the payment.\n     * Obtained from the Square Application Dashboard - Locations tab.\n     */\n    locationId=\"LID\"\n  \u003e\n    \u003cCreditCard /\u003e\n  \u003c/PaymentForm\u003e\n);\n\nexport default MyPaymentForm;\n```\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\nPlease make sure to update tests as appropriate.\n\n## Contributors ✨\n\nContributions, issues and feature requests are welcome!\u003cbr /\u003eFeel free to check [issues page](https://github.com/weareseeed/react-square-web-payments-sdk/issues). You can also take a look at the [contributing guide](https://github.com/weareseeed/react-square-web-payments-sdk/blob/main/CONTRIBUTING.md).\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://danestves.com/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/31737273?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eDaniel Esteves\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/weareseeed/react-square-web-payments-sdk/commits?author=danestves\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/weareseeed/react-square-web-payments-sdk/commits?author=danestves\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"https://react-square-web-payments-sdk.weareseeed.com/\" title=\"Examples\"\u003e💡\u003c/a\u003e \u003ca href=\"https://github.com/weareseeed/react-square-web-payments-sdk/commits?author=danestves\" title=\"Tests\"\u003e⚠️\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/rsaer\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/38730951?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eRowland Saer\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/weareseeed/react-square-web-payments-sdk/commits?author=rsaer\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/WinglessFrame\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/68775653?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eHleb Siamionau\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/weareseeed/react-square-web-payments-sdk/commits?author=WinglessFrame\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/gabrielelpidio\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/30420087?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eGabriel De Andrade\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/weareseeed/react-square-web-payments-sdk/commits?author=danestves\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/weareseeed/react-square-web-payments-sdk/commits?author=danestves\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"https://react-square-web-payments-sdk.weareseeed.com/\" title=\"Examples\"\u003e💡\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweareseeed%2Freact-square-web-payments-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweareseeed%2Freact-square-web-payments-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweareseeed%2Freact-square-web-payments-sdk/lists"}