{"id":22351587,"url":"https://github.com/morel-tech/square-connect-dart","last_synced_at":"2026-01-11T04:40:28.585Z","repository":{"id":37383684,"uuid":"194140824","full_name":"Morel-Tech/square-connect-dart","owner":"Morel-Tech","description":"A Dart package to help use the Square Connect API","archived":false,"fork":false,"pushed_at":"2024-03-17T06:30:55.000Z","size":1086,"stargazers_count":8,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-25T04:25:23.438Z","etag":null,"topics":["dart","flutter","square","square-connect"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Morel-Tech.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-06-27T17:58:28.000Z","updated_at":"2022-12-14T23:02:20.000Z","dependencies_parsed_at":"2023-10-15T19:00:43.304Z","dependency_job_id":null,"html_url":"https://github.com/Morel-Tech/square-connect-dart","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Morel-Tech%2Fsquare-connect-dart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Morel-Tech%2Fsquare-connect-dart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Morel-Tech%2Fsquare-connect-dart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Morel-Tech%2Fsquare-connect-dart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Morel-Tech","download_url":"https://codeload.github.com/Morel-Tech/square-connect-dart/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228106422,"owners_count":17870437,"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":["dart","flutter","square","square-connect"],"created_at":"2024-12-04T12:14:26.015Z","updated_at":"2026-01-11T04:40:28.555Z","avatar_url":"https://github.com/Morel-Tech.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Pub](https://img.shields.io/pub/v/square_connect.svg?style=flat-square)](https://pub.dev/packages/square_connect)\n[![GitHub](https://img.shields.io/github/license/mtwichel/square-connect-flutter-library.svg?style=flat-square)](https://github.com/mtwichel/square-connect-flutter-library/blob/master/LICENSE)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/mtwichel/square-connect-flutter-library)\n\n# Dart Client for Square APIs\n\nThis package allows Dart developers to easily interact with [Square APIs](https://developer.squareup.com/reference/square).\n\n## NOTE!\n\nDue to the way Square authenticates it's API, **DO NOT** use this package in Flutter apps unless using the [PKCE authentication flow](https://developer.squareup.com/docs/oauth-api/overview#pkce-flow).\n\n## Supported APIs\n\n| API                        | Support Level          |\n| -------------------------- | ---------------------- |\n| Payments                   | ⏳ Partially Supported |\n| Refunds                    | ❌ Not Yet Supported   |\n| Disputes                   | ❌ Not Yet Supported   |\n| Checkout                   | ⏳ Partially Supported |\n| Apple Pay                  | ❌ Not Yet Supported   |\n| Cards                      | ⏳ Partially Supported |\n| Payouts                    | ❌ Not Yet Supported   |\n| Terminal                   | ❌ Not Yet Supported   |\n| Orders                     | ✅ Fully Supported     |\n| Order Custom Attributes    | ❌ Not Yet Supported   |\n| Subscriptions              | ✅ Fully Supported     |\n| Catalog                    | ⏳ Partially Supported |\n| Inventory                  | ❌ Not Yet Supported   |\n| Customers                  | ✅ Fully Supported     |\n| Customer Custom Attributes | ❌ Not Yet Supported   |\n| Customer Groups            | ❌ Not Yet Supported   |\n| Customer Segments          | ❌ Not Yet Supported   |\n| Loyalty                    | ✅ Fully Supported     |\n| Gift Cards                 | ✅ Fully Supported     |\n| Gift Card Activities       | ✅ Fully Supported     |\n| Bookings                   | ❌ Not Yet Supported   |\n| Booking Custom Attributes  | ❌ Not Yet Supported   |\n| Merchants                  | ✅ Fully Supported     |\n| Locations                  | ✅ Fully Supported     |\n| Location Custom Attributes | ❌ Not Yet Supported   |\n| Devices                    | ❌ Not Yet Supported   |\n| Cash Drawers               | ❌ Not Yet Supported   |\n| Vendors                    | ❌ Not Yet Supported   |\n| Team                       | ⏳ Partially Supported |\n| Labor                      | ❌ Not Yet Supported   |\n| Bank Accounts              | ❌ Not Yet Supported   |\n| Sites                      | ❌ Not Yet Supported   |\n| Snippets                   | ❌ Not Yet Supported   |\n| OAuth                      | ✅ Fully Supported     |\n| Mobile Authorization       | ❌ Not Yet Supported   |\n| Webhook Subscriptions      | ❌ Not Yet Supported   |\n\n## Usage\n\n1. Create Square API Client.\n\n```dart\nfinal client = SquareApiClient(\n  accessToken: 'ACCESS_TOKEN', // Make SURE this is kept secret\n  apiVersion: '2021-09-15', // Optional. If omitted latest api will be used.\n);\n```\n\n2. Call Square APIs.\n\n```dart\nfinal locations = await client.listLocations();\n```\n\n### Errors\n\nInstead of throwing errors caused by Square's API, methods return a list of errors returned by Square's API. To check if errors were thrown, you can call .hasErrors on the Response object, or simply check if the errors property is null.\n\n**Example**\n\n```dart\nimport 'package:square_connect/square_connect.dart';\n\nasync listCustomers() {\n  String response = await CustomBackend.listCustomers();\n\n  var responseObj = ListCustomersResponse.fromJson(json.decode(response));\n\n  if (responseObj.hasErrors) {\n    throw new Error(responseObj.errors)\n  } else {\n    return responseObj.customers;\n  }\n}\n```\n\n### Pagination\n\nIf pagination is supported/needed, the response object will contain a cursor string returned by Square's API. To retrieve it, you can call `response.cursor`. If the field is `null`, then no cursor exists and there are no more items to be returned. If it was not null, you can pass it into another call of the specific method.\n\n## Contributions\n\nIf you have any feedback on how to improve the package for usability, or bugs to report, please do so at https://github.com/morel-tech/square-connect-dart/issues.\n\n### Using Mason\n\nThis package uses [mason](https://pub.dev/packages/mason_cli) to generate new files. Run the appropriate command depending on what you want to generate, and be sure to append to the appropriate barrel file when prompted.\n\n**Shared Model**\n\n```bash\nmason make shared_object\n```\n\n**Functions Model**\n\n```bash\nmason make function_object\n```\n\n**Webhook Model**\n\n```bash\nmason make webhook_event\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorel-tech%2Fsquare-connect-dart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmorel-tech%2Fsquare-connect-dart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorel-tech%2Fsquare-connect-dart/lists"}