Stripe Webhook: how to test with metadata?

I’ve been struggling with this for weeks… Would love some help!
I need to test my webhook by doing something with the MetaData that is sent by Stripe.

My set up:

  1. I have a paymentintent where I send an array of product ids as metadata (1) and it’s for stripe connected accounts(2):

  2. This is an example of a webhook that stripe sends:

Now I want to test my server action that I made under Webhooks/stripe/payment_intent.succeeded
But, I can’t use the built-in image webhook testing, because this doesn’t send metadata.

Then I hoped I could simply complete the check-out with test data. But this gives me an error:

Webhook Error: No signatures found matching the expected signature for payload. Are you passing the raw request body you received from Stripe?

I think this error is due to a mismatch of the webhook endpoint secrets.

Ideally I just want to complete the check out in test mode (public test key on client side) using stripe’s test card. And then trigger the webhook on my local or live server.

(@Fred_K any idea perhaps?)

Community Page
Last updated: