{"id":27151410,"url":"https://github.com/checkout/checkout-sdk-flutter","last_synced_at":"2025-04-08T14:40:24.464Z","repository":{"id":56826968,"uuid":"472427962","full_name":"checkout/checkout-sdk-flutter","owner":"checkout","description":"Checkout.com SDK for Flutter [Public Beta]","archived":false,"fork":false,"pushed_at":"2023-07-18T16:46:39.000Z","size":132,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2023-08-20T21:31:22.589Z","etag":null,"topics":["applepay","card","googlepay","sdk","tokenization"],"latest_commit_sha":null,"homepage":"https://api-reference.checkout.com/#operation/requestAToken","language":"Dart","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/checkout.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}},"created_at":"2022-03-21T16:46:39.000Z","updated_at":"2022-06-22T11:04:53.000Z","dependencies_parsed_at":"2022-09-20T22:11:50.562Z","dependency_job_id":null,"html_url":"https://github.com/checkout/checkout-sdk-flutter","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/checkout%2Fcheckout-sdk-flutter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/checkout%2Fcheckout-sdk-flutter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/checkout%2Fcheckout-sdk-flutter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/checkout%2Fcheckout-sdk-flutter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/checkout","download_url":"https://codeload.github.com/checkout/checkout-sdk-flutter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247864011,"owners_count":21009018,"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":["applepay","card","googlepay","sdk","tokenization"],"created_at":"2025-04-08T14:40:23.892Z","updated_at":"2025-04-08T14:40:24.458Z","avatar_url":"https://github.com/checkout.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Checkout SKD for Flutter\n\n\u003e :warning: **This SDK is in the Public Beta phase.** \n\nA Flutter plugin that wraps the Checkout.com's [tokenization API](https://api-reference.checkout.com/#operation/requestAToken) in order to allow the tokenization for\ncard details as well as Apple Pay and Google Pay payloads.\n\n## Installation\n\nAdd checkout_sdk_flutter to your `pubspec.yaml` file:\n\n```yaml\ndependencies:\n  ...\n  checkout_sdk_flutter: \u003cversion\u003e\n```\n\n## Usage\n\nIf our team did not create an account for you already, you can create one [here](https://www.checkout.com/get-test-account).\nOnce you have an account you should have access to your public API key.\n\nImport the plugin in your code:\n\n```dart\nimport 'package:johnnysdk_flutter/checkout_sdk_flutter.dart';\n```\n\nInitialize the SDK with your public key:\n\n```dart\nvar cko = new Checkout(publicKey: \"your_key\");\n```\n\n\u003e Note that the SDK will automatically determine what environment to use based on the key you provide.\n\n#### Tokenize a card\n\n```dart\nfinal request = CardTokenizationRequest(\n    number: \"4242424242424242\",\n    expiryMonth: 11,\n    expiryYear: 2029,\n    cvv: \"100\",\n    name: \"John Smith\");\nvar res = await cko.tokenizeCard(request);\n```\n\n#### Tokenize an ApplePay payload\n\n```dart\nfinal request = ApplePayTokenizationRequest(\ntokenData: AppleTokenData(\n    version: 'EC_v1',\n    data: 'XXXXXX',\n    signature: 'XXXXXX',\n    header: AppleHeader(\n        ephemeralPublicKey: 'XXXXXX',\n        publicKeyHash: 'XXXXXX',\n        transactionId: 'XXXXXX')),\n);\n\nvar res = await cko.tokenizeApplePay(request);\n```\n\n#### Tokenize a GooglePay payload\n\n```dart\nfinal request = GooglePayTokenizationRequest(\ntokenData: GoogleTokenData(\n    signature: 'XXX', protocolVersion: 'XXX', signedMessage: \"XXX\"),\n);\n\nvar res = await cko.tokenizeGooglePay(request);\n```\n\n#### Handle exemptions\n\n```dart\ntry {\n  // sdk action\n} on UnauthorizedError catch (exception) {\n // handle UnauthorizedError\n} on InvalidDataError catch (exception) {\n // handle InvalidDataError\n} catch (error) {\n // handle any other exemptions\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheckout%2Fcheckout-sdk-flutter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcheckout%2Fcheckout-sdk-flutter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheckout%2Fcheckout-sdk-flutter/lists"}