I've got a test subscription set up that is active. I'm trying to test what happens when the payment fails. I need to be able to pass some metadata (cognito user ID) to the webhook endpoint, I think I know how to do this but can't work out how to test it.
Using the test webhook doesn't work because it sends a fake charge ID. I've tried using the payment failure card but not having much luck as it doesn't seem to be triggering my endpoint.
Here is what I've been reading already:
https://stripe.com/docs/billing/testing
Stripe charge after subscription, get metadata from subscription
Stripe subscription webhooks missing metadata and client_reference_id