Problem
Stripe, PayPal, and Paystack webhooks are responsible for updating user credits and subscription statuses. These endpoints process raw JSON payloads, compute signatures, and trigger database modifications. They currently lack integration test coverage.
Proposed Solution
Create integration tests that mock external payment gateway requests. Send raw payload signatures to webhook endpoints using Spring's MockMvc and verify that the database correctly updates subscription and transactional records.
User Stories
- As an operator, I want webhook endpoints verified automatically to guarantee that subscriptions update correctly upon receipt of payment events.
Acceptance Criteria
Tasks
Problem
Stripe, PayPal, and Paystack webhooks are responsible for updating user credits and subscription statuses. These endpoints process raw JSON payloads, compute signatures, and trigger database modifications. They currently lack integration test coverage.
Proposed Solution
Create integration tests that mock external payment gateway requests. Send raw payload signatures to webhook endpoints using Spring's
MockMvcand verify that the database correctly updates subscription and transactional records.User Stories
Acceptance Criteria
Tasks
StripeWebhookIntegrationTest.java,PaystackWebhookIntegrationTest.java, andPayPalWebhookIntegrationTest.java.