Once the Stripe account is ready, configure a practice's payment settings:
https://test-client.gp.veripath.co.uk/admin/| Field | Value |
|---|---|
| Practice | Select the practice |
| Is active | ✅ |
| Default currency | gbp |
| Stripe publishable key | pk_test_... or pk_live_... |
| Stripe secret key | sk_test_... or sk_live_... (encrypted at rest) |
| Stripe webhook secret | whsec_... (see Step 2) |
| Stripe Connect account ID | acct_... (for Stripe Connect, optional) |
⚠️ Secret keys are encrypted at rest using Django's
encrypted_model_fieldsand theENCRYPTION_KEYenvironment variable.
The app exposes a webhook endpoint at:
POST https://test-client.gp.veripath.co.uk/webhooks/stripe/
To set this up in Stripe:
payment_intent.succeededpayment_intent.payment_failedwhsec_...)| Event Type | What Happens |
|---|---|
payment_intent.succeeded |
Transaction → COMPLETED, appointment → PAID/DEPOSIT_PAID, stripe_reference populated |
payment_intent.payment_failed |
Transaction → FAILED |
The webhook iterates all active PaymentConfigs and tries each webhook secret. This supports multi-tenant Stripe Connect.
PaymentTransaction, auto-updates appointment payment_statusPaymentIntent via server, confirms via client-side JSINV-YYYY-NNNNN