Skip to main content

Documentation

Subscription Unpaid Webhook

The CUSTOMER_SUBSCRIPTION_UNPAID webhook is sent when an error occurs in the payment for a subscription.

  • CUSTOMER_SUBSCRIPTION_UNPAID Webhook

  • {
        "id": "wh_d55dc29e1bbcdced4ca961570e69e8bc",
        "type": "CUSTOMER_SUBSCRIPTION_UNPAID",
        "data": {
            "id": "sub_af19b8191b2a481d3d37990be60c2e11",
            "type": "payment",
            "status": "unpaid",
            "billing": "pay_automatically",
            "discount": null,
            "ended_at": null,
            "metadata": {},
            "trial_end": null,
            "created_at": 1641822647,
            "canceled_at": null,
            "tax_percent": 0,
            "trial_start": null,
            "payout_fields": null,
            "customer_token": "cus_d3ed65d5091a8398cc3651bcedec1201",
            "days_until_due": null,
            "payment_fields": null,
            "payment_method": "card_85264b18bc1bfb949dbb2d88d3d5c12c",
            "current_period_end": 1642081847,
            "subscription_items": null,
            "billing_cycle_anchor": 1641909047,
            "cancel_at_period_end": false,
            "current_period_start": 1641995447
        },
        "trigger_operation_id": "bbc72b69-f8e0-48c2-be27-83d402d92d55",
        "status": "NEW",
        "created_at": 1641946884,
        "extended_timestamp": 1641946884848
    }