Subscription that stripe determines is "unpaid" is not updated in CiviCRM to be cancelled
It seems that stripe will send a notice that a subscription is "unpaid" when it gives up trying to collect on it.
I'm wondering if this is a bug or a feature request? I think it's a bug, but if this is not yet implemented let me know. We'd be happy to help get this working.
I'm seeing the payment processor web hook reports:
Payment Processor: Stripe (Live ID: 1)
Status: This event was successfully processed.
Identifier: :::sub_xxxxxxx Type: customer.subscription.updated
Full message:
doCustomerSubscriptionUpdated: ignoring - not implemented
The JSON data provided by stripe includes:
Stripe\StripeObject JSON: {
"object": {
"id": "sub_xxxxxxx",
"object": "subscription",
"application": null,
"application_fee_percent": null,
"automatic_tax": {
"enabled": false,
"liability": null
},
"billing_cycle_anchor": 1626378828,
"billing_cycle_anchor_config": null,
"billing_thresholds": null,
"cancel_at": null,
"cancel_at_period_end": false,
"canceled_at": null,
"cancellation_details": {
"comment": null,
"feedback": null,
"reason": null
},
"collection_method": "charge_automatically",
"created": 1626378828,
"currency": "usd",
"current_period_end": 1708026828,
"current_period_start": 1705348428,
"customer": "cus_xxxxxE",
"days_until_due": null,
"default_payment_method": "pm_xxxxx",
"default_source": null,
"default_tax_rates": [],
"description": null,
"discount": null,
"ended_at": null,
"invoice_settings": {
"account_tax_ids": null,
"issuer": {
"type": "self"
}
},
"items": {
"object": "list",
"data": [
{
"id": "si_xxxxx",
"object": "subscription_item",
"billing_thresholds": null,
"created": 1626378828,
"metadata": [],
"plan": {
"id": "every-1-month-2500-usd",
"object": "plan",
"active": true,
"aggregate_usage": null,
"amount": 2500,
"amount_decimal": "2500",
"billing_scheme": "per_unit",
"created": 1559605475,
"currency": "usd",
"interval": "month",
"interval_count": 1,
"livemode": true,
"metadata": [],
"nickname": null,
"product": "prod_xxxxxx",
"tiers": null,
"tiers_mode": null,
"transform_usage": null,
"trial_period_days": null,
"usage_type": "licensed"
},
"price": {
"id": "every-1-month-2500-usd",
"object": "price",
"active": true,
"billing_scheme": "per_unit",
"created": 1559605475,
"currency": "usd",
"custom_unit_amount": null,
"livemode": true,
"lookup_key": null,
"metadata": [],
"nickname": null,
"product": "prod_xxxxxx",
"recurring": {
"aggregate_usage": null,
"interval": "month",
"interval_count": 1,
"trial_period_days": null,
"usage_type": "licensed"
},
"tax_behavior": "unspecified",
"tiers_mode": null,
"transform_quantity": null,
"type": "recurring",
"unit_amount": 2500,
"unit_amount_decimal": "2500"
},
"quantity": 1,
"subscription": "sub_xxxxx",
"tax_rates": []
}
],
"has_more": false,
"total_count": 1,
"url": "\/v1\/subscription_items?subscription=sub_xxxxxx"
},
"latest_invoice": "in_xxxxx",
"livemode": true,
"metadata": {
"Description": "Join xxxxx Solidarity Circle"
},
"next_pending_invoice_item_invoice": null,
"on_behalf_of": null,
"pause_collection": null,
"payment_settings": {
"payment_method_options": null,
"payment_method_types": null,
"save_default_payment_method": null
},
"pending_invoice_item_interval": null,
"pending_setup_intent": null,
"pending_update": null,
"plan": {
"id": "every-1-month-2500-usd",
"object": "plan",
"active": true,
"aggregate_usage": null,
"amount": 2500,
"amount_decimal": "2500",
"billing_scheme": "per_unit",
"created": 1559605475,
"currency": "usd",
"interval": "month",
"interval_count": 1,
"livemode": true,
"metadata": [],
"nickname": null,
"product": "prod_xxxxx",
"tiers": null,
"tiers_mode": null,
"transform_usage": null,
"trial_period_days": null,
"usage_type": "licensed"
},
"quantity": 1,
"schedule": null,
"start_date": 1626378828,
"status": "unpaid",
"tax_percent": null,
"test_clock": null,
"transfer_data": null,
"trial_end": null,
"trial_settings": {
"end_behavior": {
"missing_payment_method": "create_invoice"
}
},
"trial_start": null
},
"previous_attributes": {
"status": "past_due"
}
}