Skip to main content

API: Stripe Payment Synthetic Testing

non-critical   Property: ChurchWiseAI   Category: API / Integration Tier: all Persona: payments-engineer Touchpoint: /api/stripe/*, Stripe API

Preconditions

  • Stripe test mode configured
  • Test API keys available

Steps

#ActionExpected Result
1Test successful payment (test card 4242 4242 4242 4242)Payment succeeds. Stripe returns successful status. Webhook fired.
2Test declined card (4000 0000 0000 0002)Payment fails. Checkout shows error to user. No duplicate charges.
3Verify webhook delivery on successcheckout.session.completed webhook received within 2 seconds. Processed correctly.
4Test webhook retry (simulate missed webhook)Resending webhook is processed correctly. No duplicate provisioning.
5Test customer subscription creationStripe customer created. Initial payment charged. Subscription active.
6Test subscription renewalAt renewal date, customer charged. New billing cycle starts.
7Test customer cancellationSubscription canceled. No further charges. Chatbot disabled.
8Verify payment amounts match pricingStarter Chat $14.95, Pro Both $79.95 in test payments. No mismatches.

Known Failure Modes

  • Successful payment doesn't trigger webhook — business logic skipped
  • Webhook processed twice — duplicate provisioning
  • Wrong amount charged — billing error
  • Subscription renewal fails silently — customer churn

References

Notes

Synthetic payment testing using Stripe test cards. Tests both success and failure paths. Critical for catching revenue leaks (missed webhooks, duplicate charges, wrong amounts). Run before each release that touches checkout or subscription logic. Must verify webhook delivery and idempotency.