Video summary
Golang Microservices Full Course #29 - Stripe Payment Service
Main summary
Key takeaways
Summary
The episode builds a dedicated Payment Service for a Go microservices wallet application and integrates Stripe Checkout in test mode.
Main implementation steps
- Moves the wallet top-up flow out of the Transaction Service and into the new Payment Service. The Transaction Service retains an internal gRPC top-up operation, which the Payment Service calls after a successful payment.
- Adds the Payment Service, including database migrations and components for payment models, repository operations, service logic, and HTTP handlers.
- Implements Stripe Checkout session creation and webhook processing. A payment begins as pending. When Stripe reports a completed checkout, the service verifies the webhook signature, updates the payment status, and asks the Transaction Service to credit the wallet.
- Adds success and cancellation redirect handling.
- Configures Stripe’s secret key and webhook signing secret, a callback/base URL, and the Transaction Service gRPC address through environment configuration.
- Updates Docker Compose and Makefile setup so the new service is built and started with the other services.
Testing walkthrough
The presenter creates a checkout session through the application API, completes it using Stripe’s test checkout flow, and then checks the database and wallet records. The payment changes from pending to completed, the wallet balance increases, and the ledger shows a credit with reconciliation marked true.
Additional note
The presenter also mentions a separate fix for Google login configuration: moving the Google OAuth settings to the appropriate service configuration and adjusting user creation to store the provider ID, avatar, and verification status.
Main speaker and sources
- Main speaker: The video’s presenter, Ikhda Muhammad Wildani.
- Referenced tools and services: Stripe Dashboard and Stripe CLI for test credentials and local webhook forwarding; the application’s database and microservices for verification.
Rate this summary
Your feedback will help improve summaries.
Improve this summary
Reprocess with a stronger model when the summary feels incomplete or inaccurate.
Translate summary in another language
Ask questions to this video
Chat for follow-up questions, clarifications, and source-backed answers.