Description
Description
When going to a Stripe Checkout form, via the Checkout Twig Tag, and using a coupon which gives the user 100% discount – upon successful return to the Craft site, the plugin has not processed the subscription. This means it appears the user has not subscribed in Craft, when they have on Stripe.
Looking at the logs, the error is coming from the createCartOrder()
function in the PaymentIntents
service: "Unable to find the paymentIntentId or subscriptionId related to the cart".
Non-coupon transactions are working fine. Whether there is a coupon or not, Stripe is sending a subscription
value and no payment_intent
value in the webhook. So it doesn't seem the problem is there.
It looks like the function is looking for a subscription and invoice to get the payment_intent
and failing.
Any help would be greatly appreciated.
Steps to reproduce
- Create a subscription plan and a coupon/code which gives the user 100% discount on the plan.
- Set up a form for the subscription plan using the Checkout Twig Tag.
- Sign up to the subscription and apply the discount (so total payment is 0).
- When you return to the Craft, the order/membership is not processed.
Additional info
- Craft version: Craft Pro 4.7.4
- PHP version: 8.0.30
- Database driver & version: MariaDB 10.11.5
- Plugin version: 5.5.1
- Is SCA and Stripe Checkout enabled?: Yes