{"id":27380105,"url":"https://github.com/frostbreker/process-payments","last_synced_at":"2025-04-13T14:19:04.125Z","repository":{"id":287464390,"uuid":"964820552","full_name":"FrostBreker/process-payments","owner":"FrostBreker","description":"This is a Go backend service that handles payment processing using Stripe. The service provides a RESTful API built with Gin framework and uses MongoDB for data storage.","archived":false,"fork":false,"pushed_at":"2025-04-11T21:24:42.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-11T22:22:06.351Z","etag":null,"topics":["api","backend","go","handle","payment","stripe"],"latest_commit_sha":null,"homepage":"https://youtu.be/f_8q6UwH2u8","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FrostBreker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2025-04-11T21:00:08.000Z","updated_at":"2025-04-11T22:02:21.000Z","dependencies_parsed_at":"2025-04-11T22:22:10.805Z","dependency_job_id":"685e9992-3f31-470d-9e13-39ee9ab735c7","html_url":"https://github.com/FrostBreker/process-payments","commit_stats":null,"previous_names":["frostbreker/process-payments"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FrostBreker%2Fprocess-payments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FrostBreker%2Fprocess-payments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FrostBreker%2Fprocess-payments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FrostBreker%2Fprocess-payments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FrostBreker","download_url":"https://codeload.github.com/FrostBreker/process-payments/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248724627,"owners_count":21151561,"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":["api","backend","go","handle","payment","stripe"],"created_at":"2025-04-13T14:19:03.441Z","updated_at":"2025-04-13T14:19:04.104Z","avatar_url":"https://github.com/FrostBreker.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Process Payments with Stripe\n\nThis is a Go backend service that handles payment processing using Stripe. The service provides a RESTful API built with Gin framework and uses MongoDB for data storage.\n\nThis project was created as part of a YouTube tutorial series. You can follow along with the video to understand the implementation details and concepts behind the payment processing system.\n\n🎥 [Watch the Tutorial on YouTube](https://youtu.be/f_8q6UwH2u8) \u003c!-- Add your YouTube video link here --\u003e\n\n## Prerequisites\n\n- Go 1.23 or later\n- MongoDB installed and running\n- Stripe account with API keys\n- Git (for version control)\n\n## Installation\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/FrostBreker/process-payments\ncd process-payments\n```\n\n2. Install dependencies:\n```bash\ngo mod download\n```\n\n## Environment Setup\n\n1. Copy the example environment file:\n```bash\ncp .env.example .env\n```\n\n2. Fill in the environment variables in `.env`:\n- `STRIPE_WEBHOOK_SECRET_KEY`: Your Stripe webhook secret key\n- `STRIPE_SECRET_KEY`: Your Stripe secret key\n- `PORT`: Server port (default: 8080)\n- `MONGO_URI`: MongoDB connection string (default: \"mongodb://127.0.0.1:27017/\")\n- `PRODUCTION`: Set to \"true\" in production environment\n- `CLIENT_URL`: Frontend application URL\n\n## Project Dependencies\n\nMain dependencies used in this project:\n\n- `github.com/gin-gonic/gin`: Web framework\n- `github.com/stripe/stripe-go/v82`: Stripe Go client\n- `go.mongodb.org/mongo-driver`: MongoDB driver\n- `github.com/joho/godotenv`: Environment variable management\n- `github.com/gin-contrib/cors`: CORS middleware\n- `github.com/gin-contrib/secure`: Security middleware\n\n## Running the Application\n\n1. Make sure MongoDB is running locally or accessible via the configured URI.\n\n2. Start the server:\n```bash\ngo run cmd/server/main.go\n```\n\nThe server will start on the configured port (default: 8080).\n\n## Project Structure\n\n```\n.\n├── cmd/server/    # Application entrypoint\n├── internal/      # Private application code\n├── pkg/           # Public library code\n├── .env           # Environment variables\n├── .env.example   # Example environment variables\n├── go.mod         # Go module definition\n└── go.sum         # Go module checksums\n```\n\n## API Documentation\n\n- api/stripe/webhooks [POST]: Where the webhooks will be send from stripe.\n- api/stripe/          [GET]: Call this request with a productId query params to get a checkout URL.\n\n## Development\n\nTo run the project in development mode:\n\n1. Ensure MongoDB is running locally\n2. Set up your Stripe account and get API keys\n3. Configure the `.env` file with your credentials\n4. Run the application using `go run cmd/server/main.go`\n\n## Production Deployment\n\nFor production deployment:\n\n1. Set `PRODUCTION=true` in your environment\n2. Update `CLIENT_URL` to your production frontend URL\n3. Use a secure MongoDB instance\n4. Configure Stripe webhook endpoints\n5. Use HTTPS in production\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrostbreker%2Fprocess-payments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrostbreker%2Fprocess-payments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrostbreker%2Fprocess-payments/lists"}