Contribution stuck in pending (payment says "Completed"); Stripe.ipn api has no effect
This is an intermittent problem that affects some contributions but not all, despite their apparent similarities.
Possibly related or duplicate issues:
- "Contribution status remains pending - line item is completed" #274
- "Recurring Contribution marked as 'Pending (Incomplete Transaction)'" #308
Details: This issue is affecting several contributions, some which are payments triggered by Stripe.com on existing subscriptions, others which are one-time contributions.
I present here a single case: a payment triggered by Stripe.com on an existing subscription.
I see that some payments of this type (e.g. one from Jones https://example.org/civicrm/contact/view/contribution?reset=1&id=167309&cid=15251&action=view) have this problem, while others (e.g. one from Smith https://example.org/civicrm/contact/view/contribution?reset=1&id=167315&cid=34975&action=view) do not.
Both contributions have a single payment record (this is normal) but:
- for Jones, the payment record has a status of Completed while the contribution itself still says 'Pending : Incomplete Transaction'.
- for Smit, both the payment and the contribution have a status of Completed.
Both payments are virtually identical:
- Stripe triggered a payment on an existing subscription and notified civicrm via a 'customer.subscription.updated' event.
- The webhook was received by civicrm in a timely fashion (no failures on stripe webhook log, and civicrm log shows the webhook was received immediately).
- Webhook payloads are meaningfully identical (differing only in amount, created date, etc.)
I can provide the webhook payloads for both upon request.
In similar situations (stripe payment processed but civicrm extension stuck in pending), the recommendation has been to replay the webhook for Jones using the Stripe.ipn api, but this has no visible effect on Jones's contribution:
cv api Stripe.ipn suppressreceipt=1 id=627786
Anyone have a recommendation?
Otherwise, we could proceed with a deeper debugging process, which is labor-intensive — but at least we have a clear question about a specific case: "Why is the stripe.ipn api not correcting the status on Jones's contribution?"