From 6d5f43d8c2ee85426f571da5875fc468e66551ef Mon Sep 17 00:00:00 2001 From: Ruidy Date: Fri, 3 Oct 2025 21:21:38 +0200 Subject: [PATCH] feat(stripe): add Stripe payment sync and webhook support Introduce Stripe integration for automatic payment ingestion and refund tracking. Adds new fields to the payment model for Stripe IDs and status, Stripe client driver, sync service, cron job, manual API endpoint, and public webhook handler for real-time updates. Includes tests and documentation. Manual cash entry remains supported. --- go.mod | 1 + internal/server/handle_stripe_webhook_test.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/go.mod b/go.mod index 93e7008..1a86f9a 100644 --- a/go.mod +++ b/go.mod @@ -17,6 +17,7 @@ require ( require ( github.com/google/go-cmp v0.7.0 // indirect + github.com/stripe/stripe-go/v79 v79.12.0 // indirect github.com/tidwall/gjson v1.18.0 // indirect github.com/tidwall/match v1.2.0 // indirect github.com/tidwall/pretty v1.2.1 // indirect diff --git a/internal/server/handle_stripe_webhook_test.go b/internal/server/handle_stripe_webhook_test.go index 8472bda..9e9f038 100644 --- a/internal/server/handle_stripe_webhook_test.go +++ b/internal/server/handle_stripe_webhook_test.go @@ -2,7 +2,9 @@ package server import ( "context" + "encoding/hex" "encoding/json" + "fmt" "net/http" "net/http/httptest" "strings"