Recurring webform_civicrm contribution fails due to no payment method
Upon submitting a recurring contribution on a Drupal webform, the response is "This customer has no attached payment source or default payment method.".
Viewing the Stripe log, I see four POSTs:
- 400 ERR POST v1/subscriptions 6:05:34 PM
- 200 OK POST v1/customers/cus_[redacted] 6:05:33 PM
- 200 OK POST v1/payment_intents 6:05:31 PM
- 200 OK POST v1/payment_methods 6:05:30 PM
Comparing this to the log entries from a non-recurring contribution, the relevant difference seems to be that the non-recurring submission includes an additional POST:
- 200 OK POST /v1/payment_intents/pi_[redacted]
This POST specifies the payment intent in the URL and the customer in the request body, connecting the two.
Note that this issue only occurs if the contact/customer does not have a existing default payment method in Stripe. Testing must therefore be done with a new contact, or at least a contact which has never made a recurring Stripe contribution via a CiviCRM contribution page.
- CiviCRM 5.47.2
- Stripe Payment Processor 6.7.2
- Payment Shared 1.2.3
- Firewall 1.5.1
- Drupal 7.88
- Webform 7.x-4.24
- Webform CiviCRM Integration 7.x-5.7