If you sell both products on the same website, it is recommended to use a single Stripe webhook.
You can differentiate between the two products by implementing one of these options:
- Store the unique payment id after initiating the checkout process together with what the user buys in your backend. Retrieve this again when you receive the payment confirmation with the webhook.
- Add metadata to the stripe payment which specifies what the user buys when you initiate the checkout. The metadata is sent back with the payment confirmation webhook.
- Register your products with Stripes product API and link them to the payment when initiating the checkout process. Retrieve them again when you receive the payment confirmation with the webhook.