{"id":19366782,"url":"https://github.com/rsoury/buyte","last_synced_at":"2025-04-23T14:31:40.668Z","repository":{"id":144018428,"uuid":"410493614","full_name":"rsoury/buyte","owner":"rsoury","description":"Apple Pay and Google Pay in a single install. Digital Wallet Payment Orchestration built on a Serverless Stack for AWS using Golang, Node.js, Serverless Framework and AWS Amplify","archived":false,"fork":false,"pushed_at":"2021-10-12T10:48:07.000Z","size":1823,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T16:11:48.728Z","etag":null,"topics":["amplify","applepay","aws","checkout","golang","googlepay","graphql","nodejs","payments","serverless"],"latest_commit_sha":null,"homepage":"https://github.com/rsoury/buyte","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rsoury.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2021-09-26T08:23:31.000Z","updated_at":"2024-08-13T01:52:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"4ee460bb-d05f-4cc5-a5dd-e7379a7ce373","html_url":"https://github.com/rsoury/buyte","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/rsoury%2Fbuyte","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsoury%2Fbuyte/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsoury%2Fbuyte/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsoury%2Fbuyte/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rsoury","download_url":"https://codeload.github.com/rsoury/buyte/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250451793,"owners_count":21432900,"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":["amplify","applepay","aws","checkout","golang","googlepay","graphql","nodejs","payments","serverless"],"created_at":"2024-11-10T07:46:31.953Z","updated_at":"2025-04-23T14:31:40.088Z","avatar_url":"https://github.com/rsoury.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003eBuyte\u003c/h1\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cstrong\u003eDigital wallet payment orchestration on a serverless stack\u003c/strong\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  Accelerate your eCommerce website checkout with an enhanced digital wallet payment orchestration. Integrate native Apple Pay and Google Pay with your Payment Processor(s).\n\u003c/div\u003e\n\u003cbr/\u003e\n\n![Buyte Banner](https://github.com/rsoury/buyte/blob/master/examples/images/banner-1544x500.jpg)\n\n\u003cdiv align=\"center\"\u003e\n   \u003ca href=\"https://www.youtube.com/watch?v=fKnVh8_HLwk\"\u003eDemo\u003c/a\u003e\n   \u003cspan\u003e | \u003c/span\u003e\n   \u003ca href=\"https://github.com/rsoury/buyte/blob/master/examples/images/\"\u003eExample images\u003c/a\u003e\n   \u003cspan\u003e | \u003c/span\u003e\n   \u003ca href=\"https://github.com/rsoury/buyte/blob/master/docs/Buyte-Architecture.jpeg\"\u003eArchitecture\u003c/a\u003e\n   \u003cspan\u003e | \u003c/span\u003e\n   \u003ca href=\"https://github.com/rsoury/buyte/blob/master/docs/Buyte-Checkout-Sequence-Diagram.jpeg\"\u003eSequence diagram\u003c/a\u003e\n\u003c/div\u003e\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Features](#features)\n- [Supported Digital Wallets](#supported-digital-wallets)\n- [Supported Payment Processors](#supported-payment-processors)\n- [Overview](#overview)\n- [Installation Requirements](#installation-requirements)\n- [Supporting Repositories](#supporting-repositories)\n- [Getting Started](#getting-started)\n  - [1. Amplify](#1-amplify)\n  - [2. ApplePay Certificates](#2-applepay-certificates)\n  - [3. Serverless](#3-serverless)\n  - [3. CLI](#3-cli)\n  - [5. Finalise Cognito](#5-finalise-cognito)\n- [Database Set Up](#database-set-up)\n- [(Optional) Update Database Schema](#optional-update-database-schema)\n- [Testing](#testing)\n- [Caveats](#caveats)\n- [Development Endpoints](#development-endpoints)\n- [Contribution](#contribution)\n- [Enterprise Support](#enterprise-support)\n- [Found this repo interesting?](#found-this-repo-interesting)\n\n## Features\n\n- **Frictionless:** Skip passwords, account forms and the standard checkout flow. Minimise time to checkout, maximising conversions. \n- **Familiar:** Allow your users to checkout using the same technology they use in-store.\n- **Secure:** Apple and Google's security infrastructure prevents card/payment details from leaving your user's devices.\n- **Widgetised:** Complete your checkout from anywhere on your website with the [Buyte Checkout](https://github.com/rsoury/buyte-checkout).\n- **Extensible:** Bring your Payment Processor and pass on raw/decrypted payment data.\n- **Serverless:** Scalable by default.\n\n## Supported Digital Wallets\n\n- Apple Pay\n- Google Pay\n\n## Supported Payment Processors\n\n- Stripe\n- Adyen\n- [**Add your own**](#contribution)\n\n## Overview\n\nThis repository responsible for tokenisation of digital wallet payloads before passing on raw/decrypted payment data to the connected Payment Processor.\n\nIt is comprised of the Serverless API, CLI, Scripts, and AWS Amplify Configuration\n\nThe produced Binary is a CLI tool capable of running commands for administrative and development purposes as well as a command for starting the Tokenisation and Payment Processing API.\n\n## Installation Requirements\n\n- Go 1.16.0+\n- Node.js 10.0+\n\n## Supporting Repositories\n\nOnce this codebase has been set up, please visit:\n\n- [Buyte Dashboard](https://github.com/rsoury/buyte-dashboard)\n  - Set up the Administration Portal where Checkouts can be created and connected to different Payment Processors.\n- [Buyte Checkout](https://github.com/rsoury/buyte-checkout)\n  - Configure and then install the Buyte Checkout JS library into your website referencing the Checkout ID produced in your Buyte Dashboard.\n\n## Getting Started\n\n1. Clone the repository `git clone git@github.com:rsoury/buyte.git`\n2. Install Node.js Dependencies: `yarn`\n\n### 1. Amplify\n\n1. Set up your Amplify Configuration\n   1. `amplify configure`\n   2. Make a `dev` directory under the amplify directory. In each directory (`dev` or `prod`), you can manage an environment for your Amplify configurations. We advise committing these configurations to a private repository. These configurations will include references to components in your cloud infrastructure.\n      1. `mkdir -p ./amplify/dev`\n      2. `cd ./amplify/dev`\n   3. `amplify init`\n2. Add a Data Storage (DynamoDB and AppSync GraphQL) to Amplify\n   `amplify api add`\n   1. Select **\"GraphQL\"** for the interface and **\"Amazon Cognito User Pools\"** for authentication\n   2. Select **\"Yes\"** for \"Do you want to configure advanced settings for the GraphQL API\" and provide the path to the GraphQL Schema `../graphql.schema`\n3. Add Auth (Cognito) to Amplify  \n   `amplify add auth`  \n   You should receive a message that Auth has already been added.  \n4. Push your Amplify configuration  \n   `amplify push`\n   Ensure you auto-generate code from GraphQL schema when prompted.\n5. Add the GraphQL Endpoint to your Environment file `.env.development` or `.env.production`\n\n### 2. ApplePay Certificates\n\n[Visit the Certs directory](https://github.com/rsoury/buyte/blob/master/certs/) and follow the guide to produce your Apple Pay Certificates\n\n### 3. Serverless\n\n1. Deploy to AWS\n   For Production - `sls deploy --env production --stage prod`\n   For Development - `sls deploy`\n\nFor development, use `sls offline` to test requests to a locally hosted web server.\n\n### 3. CLI\n\n1. Install Golang dependencies - `go mod download`\n2. Build the binary - `make`\n3. Run the API in Development - `buyte api`\n4. Run the API in Production - `buyte api --production`\n\nFor development, use `make init \u0026\u0026 make watch` to rebuild the binary on file change.\n\n### 5. Finalise Cognito\n\nGo to your AWS Console and visit the Cognito Portal.\n\n1. Add the Serverless Lambda Functions as the Cognito Triggers.\n2. Add a Domain Name to your Hosted UI\n3. Update your `COGNITO_CLIENTID` and `COGNITO_USERPOOLID` your Environment file(s).\n\nFurther configuration for Cognito will continue in the [Buyte Dashboard](https://github.com/rsoury/buyte-dashboard) set up.\n\n## Database Set Up\n\n*We highly advise configuring your `.env.development` or `.env.production` files before proceeding to minimise the number of flags passed to each command.*\n\n1. Create yourself a super user\n   ```\n   buyte create-super-user -e youremail@example.com -p somepassword\n   ```\n   1. Add your `ADMIN_USERNAME` and `ADMIN_PASSWORD` environment variables to your `.env` file\n2. Set up Cognito Custom User Attributes - for [Dashboard](https://github.com/rsoury/buyte-dashboard)\n   ```\n   buyte auth-setup\n   ```\n3. Create your payment options\n   ```\n   buyte payments add --name \"Apple Pay\" --image https://s3.url/to-imaage.png\n   buyte payments add --name \"Google Pay\"\n   ```\n4. Create your payment providers\n   ```\n   buyte providers add --name Adyen\n   buyte providers add --name Stripe\n   ```\n5. Use the List commands to identify the Ids of each Payment and Provider record. ie. `buyte payments list` or `buyte providers list`\n6. Connect your Payment Options to each of your Payment Providers.\n   ```\n   buyte providers connect --provider-id adyen-xxxx-xxxx-xxxx --payment-id applepay-yyyy-yyyy-yyyy\n   buyte providers connect --provider-id stripe-xxxx-xxxx-xxxx --payment-id applepay-yyyy-yyyy-yyyy\n   buyte providers connect --provider-id adyen-xxxx-xxxx-xxxx --payment-id googlepay-yyyy-yyyy-yyyy\n   buyte providers connect --provider-id stripe-xxxx-xxxx-xxxx --payment-id googlepay-yyyy-yyyy-yyyy\n   ```\n7. List your providers to check which payment options are connected - `buyte providers list`\n\nYou should see an output of the Provider details and their associated Payment Options.\n\n## (Optional) Update Database Schema\n\nIn case you have unique storage requirements that fall outside of the schema, here's a simple way to update your schema. \n\n1. Create a symlink to the Amplify backend directory.\n   ```\n   ln -s ./amplify/schema.graphql ./amplify/dev/amplify/backend/api/buytedev/schema.graphql\n   ```\n2. Make modifications to `./amplify/schema.graphql`\n3. `cd ./amplify/dev/`\n4. `amplify api update`\n5. `amplify push`\n\n## Testing\n\n```shell\ngo test -v\n```\n\n## Caveats\n\n- [ApplePay](https://github.com/rsoury/applepay/) dependency has some caveats:\n  - You may need to change your `PKG_CONFIG_PATH` to include OpenSSL. For example, on my Mac I use `PKG_CONFIG_PATH=$(brew --prefix openssl)/lib/pkgconfig go test`.\n- After Serverless Deploy, go to AWS Cognito in AWS console and save the Cognito Triggers page.  \n   **There is a bug here where without saving manually, they will not run when required.**\n\n## Development Endpoints\n\nDevelopment endpoints were made to assist in spinning up a landing page with the appropriate digital wallet.\n\n## Contribution\n\nSimply fork this repo and make it your own, or create a pull request and we can build something awesome together!\n\n## Enterprise Support\n\nWhether you're looking to integrate a Legacy Payment Processor or Banking API, or looking for managed deployment and operation in your cloud, you can contact us at [Web Doodle](https://www.webdoodle.com.au/?ref=github-buyte) to discuss tailored solutions.\n\n## Found this repo interesting?\n\nStar this project ⭐️⭐️⭐️, and feel free to follow me on [Github](https://github.com/rsoury), [Twitter](https://twitter.com/@ryan_soury) or [Medium](https://rsoury.medium.com/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frsoury%2Fbuyte","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frsoury%2Fbuyte","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frsoury%2Fbuyte/lists"}