{"_id":"@rsc-labs/medusa-square-payment","_rev":"3-391fde4c9716386f9425bf1733e0b6c8","name":"@rsc-labs/medusa-square-payment","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"@rsc-labs/medusa-square-payment","version":"0.0.1","keywords":["medusa-plugin-payment","medusa-plugin-integration","medusa-v2","medusa-square-payment","payment","square"],"author":{"url":"https://rsoftcon.com","name":"RSC Labs"},"license":"MIT","_id":"@rsc-labs/medusa-square-payment@0.0.1","maintainers":[{"name":"szymkiewicz.radoslaw","email":"szymkiewicz.radoslaw@gmail.com"}],"homepage":"https://github.com/RSC-Labs/medusa-square-payment#readme","bugs":{"url":"https://github.com/RSC-Labs/medusa-square-payment/issues"},"dist":{"shasum":"38f2ec642a6972936f5b4a2f8ecb15ebf154f8e9","tarball":"https://registry.npmjs.org/@rsc-labs/medusa-square-payment/-/medusa-square-payment-0.0.1.tgz","fileCount":7,"integrity":"sha512-7FO61Uzd4fl30sp+rrfDAP5qneS8SxEp5OO2hxxuDZQTE/ri6Kfbg2vwfK+OLzHFJXvsUDTJ7H+Rbv9L30K1ng==","signatures":[{"sig":"MEYCIQCAww1tXBTAlwIyPJF/UfoUYZaNsvUhiwjI6+ALk2D5NAIhAIq2o6nXE5AREN8ZmCTQDaG6Ts9iEi94G9AaLEYsSEjO","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15012},"engines":{"node":">=20"},"exports":{"./*":"./.medusa/server/src/*.js","./admin":{"import":"./.medusa/server/src/admin/index.mjs","default":"./.medusa/server/src/admin/index.js","require":"./.medusa/server/src/admin/index.js"},"./modules/*":"./.medusa/server/src/modules/*/index.js","./workflows":"./.medusa/server/src/workflows/index.js","./providers/*":"./.medusa/server/src/providers/*/index.js","./package.json":"./package.json","./.medusa/server/src/modules/*":"./.medusa/server/src/modules/*/index.js"},"gitHead":"b3e18693825dfdf67f9312fa3193a46b067e173a","scripts":{"dev":"medusa plugin:develop","build":"medusa plugin:build","prepublishOnly":"medusa plugin:build"},"_npmUser":{"name":"szymkiewicz.radoslaw","email":"szymkiewicz.radoslaw@gmail.com"},"repository":{"url":"git+https://github.com/RSC-Labs/medusa-square-payment.git","type":"git"},"_npmVersion":"10.5.0","description":"Square payment provider for Medusa","directories":{},"_nodeVersion":"21.7.2","dependencies":{"moment":"^2.30.1","square":"^42.1.0","typeorm":"^0.3.20","@mui/material":"^6.4.1","@emotion/react":"^11.14.0","@emotion/styled":"^11.14.0","react-hook-form":"^7.54.2"},"_hasShrinkwrap":false,"devDependencies":{"pg":"^8.13.0","vite":"^5.2.11","yalc":"^1.0.0-pre.53","react":"^18.2.0","awilix":"^8.0.1","ts-node":"^10.9.2","@swc/core":"1.5.7","react-dom":"^18.2.0","prop-types":"^15.8.1","typescript":"^5.6.2","@types/node":"^20.0.0","@medusajs/ui":"4.0.3","@types/react":"^18.3.2","@medusajs/cli":"2.7.0","@mikro-orm/cli":"6.4.3","@medusajs/icons":"2.7.0","@mikro-orm/core":"6.4.3","@mikro-orm/knex":"6.4.3","@medusajs/medusa":"2.7.0","@types/react-dom":"^18.2.25","@medusajs/admin-sdk":"2.7.0","@medusajs/framework":"2.7.0","@medusajs/test-utils":"2.7.0","@mikro-orm/migrations":"6.4.3","@mikro-orm/postgresql":"6.4.3"},"peerDependencies":{"pg":"^8.13.0","awilix":"^8.0.1","@medusajs/ui":"4.0.3","@medusajs/cli":"2.7.0","@mikro-orm/cli":"6.4.3","@medusajs/icons":"2.7.0","@mikro-orm/core":"6.4.3","@mikro-orm/knex":"6.4.3","@medusajs/medusa":"2.7.0","@medusajs/admin-sdk":"2.7.0","@medusajs/framework":"2.7.0","@medusajs/test-utils":"2.7.0","@mikro-orm/migrations":"6.4.3","@mikro-orm/postgresql":"6.4.3"},"_npmOperationalInternal":{"tmp":"tmp/medusa-square-payment_0.0.1_1745226899939_0.20488975865533465","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@rsc-labs/medusa-square-payment","version":"0.0.2","keywords":["medusa-plugin-payment","medusa-plugin-integration","medusa-v2","medusa-square-payment","payment","square"],"author":{"url":"https://rsoftcon.com","name":"RSC Labs"},"license":"MIT","_id":"@rsc-labs/medusa-square-payment@0.0.2","maintainers":[{"name":"szymkiewicz.radoslaw","email":"szymkiewicz.radoslaw@gmail.com"}],"homepage":"https://github.com/RSC-Labs/medusa-square-payment#readme","bugs":{"url":"https://github.com/RSC-Labs/medusa-square-payment/issues"},"dist":{"shasum":"63843d040acfac84bb0e43867e7aaae993d0f620","tarball":"https://registry.npmjs.org/@rsc-labs/medusa-square-payment/-/medusa-square-payment-0.0.2.tgz","fileCount":7,"integrity":"sha512-yVy3XI4eZ6smLPntACSjty5cMCz7XNazI3OvQP4FAJjUth5KkrNd06ZFU7QNH9Oj8fXFIfL1isfIGvCthtwG6w==","signatures":[{"sig":"MEUCIQCNOP1XlqtUdOO0n3z7ppkeCcD45N8z6lwGICuHzAcAFwIgT0/UIPZTosCi0pua4DLwNK6n90foDJRfOML/Wfmuzrk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15033},"engines":{"node":">=20"},"exports":{"./*":"./.medusa/server/src/*.js","./admin":{"import":"./.medusa/server/src/admin/index.mjs","default":"./.medusa/server/src/admin/index.js","require":"./.medusa/server/src/admin/index.js"},"./modules/*":"./.medusa/server/src/modules/*/index.js","./workflows":"./.medusa/server/src/workflows/index.js","./providers/*":"./.medusa/server/src/providers/*/index.js","./package.json":"./package.json","./.medusa/server/src/modules/*":"./.medusa/server/src/modules/*/index.js"},"gitHead":"9cf74b4b10a6e1ab2f5674b36fd7741c7bc2da94","scripts":{"dev":"medusa plugin:develop","build":"medusa plugin:build","prepublishOnly":"medusa plugin:build"},"_npmUser":{"name":"szymkiewicz.radoslaw","email":"szymkiewicz.radoslaw@gmail.com"},"repository":{"url":"git+https://github.com/RSC-Labs/medusa-square-payment.git","type":"git"},"_npmVersion":"10.5.0","description":"Square payment provider for Medusa","directories":{},"_nodeVersion":"21.7.2","dependencies":{"moment":"^2.30.1","square":"^42.1.0","typeorm":"^0.3.20","@mui/material":"^6.4.1","@emotion/react":"^11.14.0","@emotion/styled":"^11.14.0","react-hook-form":"^7.54.2"},"_hasShrinkwrap":false,"devDependencies":{"pg":"^8.13.0","vite":"^5.2.11","yalc":"^1.0.0-pre.53","react":"^18.2.0","awilix":"^8.0.1","ts-node":"^10.9.2","@swc/core":"1.5.7","react-dom":"^18.2.0","prop-types":"^15.8.1","typescript":"^5.6.2","@types/node":"^20.0.0","@medusajs/ui":"4.0.3","@types/react":"^18.3.2","@medusajs/cli":"^2.7.0","@mikro-orm/cli":"6.4.3","@medusajs/icons":"^2.7.0","@mikro-orm/core":"6.4.3","@mikro-orm/knex":"6.4.3","@medusajs/medusa":"^2.7.0","@types/react-dom":"^18.2.25","@medusajs/admin-sdk":"^2.7.0","@medusajs/framework":"^2.7.0","@medusajs/test-utils":"^2.7.0","@mikro-orm/migrations":"6.4.3","@mikro-orm/postgresql":"6.4.3"},"peerDependencies":{"pg":"^8.13.0","awilix":"^8.0.1","@medusajs/ui":"4.0.3","@medusajs/cli":"^2.7.0","@mikro-orm/cli":"6.4.3","@medusajs/icons":"^2.7.0","@mikro-orm/core":"6.4.3","@mikro-orm/knex":"6.4.3","@medusajs/medusa":"^2.7.0","@medusajs/admin-sdk":"^2.7.0","@medusajs/framework":"^2.7.0","@medusajs/test-utils":"^2.7.0","@mikro-orm/migrations":"6.4.3","@mikro-orm/postgresql":"6.4.3"},"_npmOperationalInternal":{"tmp":"tmp/medusa-square-payment_0.0.2_1746984416310_0.9711100199264271","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@rsc-labs/medusa-square-payment","version":"0.0.3","description":"Square payment provider for Medusa","author":{"name":"RSC Labs","url":"https://rsoftcon.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/RSC-Labs/medusa-square-payment.git"},"keywords":["medusa-plugin-payment","medusa-plugin-integration","medusa-v2","medusa-square-payment","payment","square"],"scripts":{"build":"medusa plugin:build","dev":"medusa plugin:develop","prepublishOnly":"medusa plugin:build"},"dependencies":{"@mui/material":"^6.4.1","typeorm":"^0.3.20","react-hook-form":"^7.54.2","@emotion/react":"^11.14.0","@emotion/styled":"^11.14.0","moment":"^2.30.1","square":"^42.1.0"},"devDependencies":{"@medusajs/admin-sdk":"2.7.0","@medusajs/cli":"2.7.0","@medusajs/framework":"2.7.0","@medusajs/medusa":"2.7.0","@medusajs/test-utils":"2.7.0","@medusajs/ui":"4.0.3","@medusajs/icons":"2.7.0","@mikro-orm/cli":"6.4.3","@mikro-orm/core":"6.4.3","@mikro-orm/knex":"6.4.3","@mikro-orm/migrations":"6.4.3","@mikro-orm/postgresql":"6.4.3","@swc/core":"1.5.7","@types/node":"^20.0.0","@types/react":"^18.3.2","@types/react-dom":"^18.2.25","awilix":"^8.0.1","pg":"^8.13.0","prop-types":"^15.8.1","react":"^18.2.0","react-dom":"^18.2.0","ts-node":"^10.9.2","typescript":"^5.6.2","vite":"^5.2.11","yalc":"^1.0.0-pre.53"},"peerDependencies":{"@medusajs/admin-sdk":"2.7.0","@medusajs/cli":"2.7.0","@medusajs/framework":"2.7.0","@medusajs/test-utils":"2.7.0","@medusajs/medusa":"2.7.0","@medusajs/ui":"4.0.3","@medusajs/icons":"2.7.0","@mikro-orm/cli":"6.4.3","@mikro-orm/core":"6.4.3","@mikro-orm/knex":"6.4.3","@mikro-orm/migrations":"6.4.3","@mikro-orm/postgresql":"6.4.3","awilix":"^8.0.1","pg":"^8.13.0"},"engines":{"node":">=20"},"exports":{"./package.json":"./package.json","./workflows":"./.medusa/server/src/workflows/index.js","./.medusa/server/src/modules/*":"./.medusa/server/src/modules/*/index.js","./modules/*":"./.medusa/server/src/modules/*/index.js","./providers/*":"./.medusa/server/src/providers/*/index.js","./*":"./.medusa/server/src/*.js","./admin":{"import":"./.medusa/server/src/admin/index.mjs","require":"./.medusa/server/src/admin/index.js","default":"./.medusa/server/src/admin/index.js"}},"_id":"@rsc-labs/medusa-square-payment@0.0.3","gitHead":"c77690c3b70e9903ebd453ec45da667149c0a7f4","bugs":{"url":"https://github.com/RSC-Labs/medusa-square-payment/issues"},"homepage":"https://github.com/RSC-Labs/medusa-square-payment#readme","_nodeVersion":"20.14.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-luX/kFHckLOuFUY3TUgeyjgEKoDys1kiS6QH3taHrgxTMo65oYUCJkpo5OShDDGQgKNzsVkljUD1NRdS9QHiNQ==","shasum":"3b5fc4521947f0f6c8e9e053ee8fc53803ee9f6e","tarball":"https://registry.npmjs.org/@rsc-labs/medusa-square-payment/-/medusa-square-payment-0.0.3.tgz","fileCount":7,"unpackedSize":15021,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDKwMsoDNoSBJICEchiZH0ErsRu7dXcaQpLpRs65rpylQIhAOJz8Ovn6dqossr6tAmq0f23drticy1uu5cY5DZeGvAH"}]},"_npmUser":{"name":"szymkiewicz.radoslaw","email":"szymkiewicz.radoslaw@gmail.com"},"directories":{},"maintainers":[{"name":"szymkiewicz.radoslaw","email":"szymkiewicz.radoslaw@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/medusa-square-payment_0.0.3_1748348557324_0.04454826566244452"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-21T09:14:59.867Z","modified":"2025-05-27T12:22:37.716Z","0.0.1":"2025-04-21T09:15:00.131Z","0.0.2":"2025-05-11T17:26:56.493Z","0.0.3":"2025-05-27T12:22:37.517Z"},"bugs":{"url":"https://github.com/RSC-Labs/medusa-square-payment/issues"},"author":{"name":"RSC Labs","url":"https://rsoftcon.com"},"license":"MIT","homepage":"https://github.com/RSC-Labs/medusa-square-payment#readme","keywords":["medusa-plugin-payment","medusa-plugin-integration","medusa-v2","medusa-square-payment","payment","square"],"repository":{"type":"git","url":"git+https://github.com/RSC-Labs/medusa-square-payment.git"},"description":"Square payment provider for Medusa","maintainers":[{"name":"szymkiewicz.radoslaw","email":"szymkiewicz.radoslaw@gmail.com"}],"readme":"# Medusa Square Payment\n\n## What is it?\n\nMedusa Square Payment is a basic integration of payment provider for Square Payment.\n\n## Installation\n\n1. Install plugin by adding to your `package.json`:\n\n**Warning**\n\n```json\n...\n\"@rsc-labs/medusa-square-payment\": \"0.0.1\" // or other available version\n...\n```\nand execute install, e.g. `yarn install`.\n\n2. Add plugin to your `medusa-config.js` (**Note** - please notice that you need to add it to payment plugin):\n\n```js\n...\n  plugins: [\n    {\n      resolve: \"@rsc-labs/medusa-square-payment\",\n      options: {\n        token: <app-token>,\n        environment: <env-definition>,\n      },\n    }\n  ],\n  modules: [\n    {\n      resolve: \"@medusajs/medusa/payment\",\n      options: {\n        providers: [\n          {\n            resolve: \"@rsc-labs/medusa-square-payment/providers/square-payment\",\n            id: \"square-payment\",\n            options: {\n              token: <app-token>,\n              environment: <env-definition>,\n            },\n          }\n        ]\n      },\n    },\n...\n```\n\n## Overview\n\nThe basic implementation of Square payment provider gives the possibility to make a payment in your storefront.\n\n## Configuration\n\nPlugin uses 1 required parameter and 1 optional:\n\n- `token` - required parameter which you can find in your Square Developer Dashboard\n- `environment` - optional parameter - it can be set to `sandbox`, `production` or not set at all. You can use it to test with your `sandbox` environment.\n\n\nAfter above configuration, you can then add the payment provider to your reqion.\n\n## Storefront\n\nWe recommend using `react-square-web-payments-sdk` package on your storefront as it simplifies the implementation a lot.\nHere is the example of using credit card as payment:\n\n```tsx\nimport { PaymentForm, CreditCard as SquareCreditCard } from 'react-square-web-payments-sdk';\n...\n\nconst handleSquareSubmit = async (token: string) => {\n    setIsLoading(true)\n    try {\n      if (!activeSession) {\n        await initiatePaymentSession(cart, \n          {\n            provider_id: selectedPaymentMethod,\n            data: {\n              cartId: cart?.id,\n              token: token\n            }\n          })\n      }\n\n      return router.push(\n        pathname + \"?\" + createQueryString(\"step\", \"review\"),\n        {\n          scroll: false,\n        }\n      )\n    } catch (err: any) {\n      setError(err.message)\n    } finally {\n      setIsLoading(false)\n    }\n  }\n{isSquare(selectedPaymentMethod) &&\n  <div>\n    <PaymentForm\n      applicationId=\"<application-id>\"\n      cardTokenizeResponseReceived={(token, verifiedBuyer) => {\n        handleSquareSubmit(token.token!);\n      }}\n      locationId='XXXXXXXXXX'\n    >\n      <SquareCreditCard/>\n    </PaymentForm>\n  </div>\n}\n```\n\n`<application-id>` - you can retrieve it from your Square Developer Dashboard.\n\n## Limitations\n\nPlugin does not support refunds and cancels. It has been tested using only credit card - when authorized, it captures money automatically.\n\n## License\n\nMIT\n\n---\n\n© 2025 RSC https://rsoftcon.com/\n","readmeFilename":"README.md"}