Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stripe webhook handler is failing #10092

Open
2 tasks done
DiegoRam opened this issue Nov 13, 2024 · 4 comments
Open
2 tasks done

Stripe webhook handler is failing #10092

DiegoRam opened this issue Nov 13, 2024 · 4 comments

Comments

@DiegoRam
Copy link

What Medusa version and documentation are you using?

v2

Preliminary Checks

Issue Summary

I've integrated stripe successfully following through all docs, but I think I missing the happy path.

resolve: "@medusajs/medusa/payment", options: { providers: [ { resolve: "@medusajs/medusa/payment-stripe", id: "stripe", options: { apiKey: process.env.STRIPE_API_KEY, webhookSecret: process.env.STRIPE_WEBHOOK_SECRET }, },
this is my medusa-config.ts entry
But on DB it's created the payment provider with this ID
pp_stripe_stripe

problem im getting into is on handler webhooks actually
When stripe sends me a new event like payment_intent.succesful, logs are reporting me this

{"level":"error","message":"An error occurred while processing payment.webhook_received: Error: Could not find a payment provider with id: pp_stripe","timestamp":"2024-11-13 19:59:05"} do_app_name:starfish-app do_component_name:aec-chile-backend _id:cKobJ5MBaBimwrJera5c _type: - _index:logs _score: -

please notice payment provider id reported: pp_stripe
Where I should keep looking for the issue?

How can this issue be resolved?

...

Are you interested in working on this issue?

  • I would like to fix this issue
@Xarenn
Copy link

Xarenn commented Nov 14, 2024

It's not working for me also...

error: An error occurred while processing payment.webhook_received: Error: Could not find a payment provider with id: pp_stripe http: POST /hooks/payment/stripe ← - (200) - 9.047 ms info: Processing payment.webhook_received which has 1 subscribers error: An error occurred while processing payment.webhook_received: Error: Could not find a payment provider with id: pp_stripe http: POST /hooks/payment/stripe ← - (200) - 2.829 ms http: POST /store/payment-collections/pay_col_01JCKZWWM99YHRAWPHH78JM4NM/payment-sessions ← - (200) - 1158.875 ms http: GET /store/carts/cart_01JCKZW1HPT6FMF4ER5W5WAMRJ ← - (200) - 26.212 ms http: GET /store/products?id%5B0%5D=prod_01JCKXP8ZBWPWN9XK42FQQ81ZN&region_id=reg_01JCKXD5H9X9MGR3TBMJMZPHT0&fields=%2Avariants.calculated_price%2C%2Bvariants.inventory_quantity ← - (200) - 29.818 ms http: GET /store/customers/me ← - (401) - 6.080 ms info: Processing payment.webhook_received which has 1 subscribers error: An error occurred while processing payment.webhook_received: Error: Could not find a payment provider with id: pp_stripe info: Processing payment.webhook_received which has 1 subscribers error: An error occurred while processing payment.webhook_received: Error: Could not find a payment provider with id: pp_stripe

@sradevski
Copy link
Member

Thanks for opening a ticket, we'll have a look into it.

@DiegoRam
Copy link
Author

@sradevski I forgot to mention that when I've integrated stripe, pp_stripe_stripe provider id was created, that's why webhook is not finding that provider id

@olivermrbl
Copy link
Contributor

Hey @DiegoRam, could you please update your issue to follow our bug report template? Would make it a whole lot easier for us to help out 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants