collab: Record cancellation reason on billing subscriptions (#22853)
This PR updates the `billing_subscriptions` in the database to record the cancellation reason from Stripe. We're primarily interested in this so we can check for subscriptions that were canceled for being `past_due`. Release Notes: - N/A
This commit is contained in:
parent
69dde8e31d
commit
b78396505f
5 changed files with 43 additions and 8 deletions
|
@ -438,7 +438,8 @@ CREATE TABLE IF NOT EXISTS billing_subscriptions (
|
|||
billing_customer_id INTEGER NOT NULL REFERENCES billing_customers(id),
|
||||
stripe_subscription_id TEXT NOT NULL,
|
||||
stripe_subscription_status TEXT NOT NULL,
|
||||
stripe_cancel_at TIMESTAMP
|
||||
stripe_cancel_at TIMESTAMP,
|
||||
stripe_cancellation_reason TEXT
|
||||
);
|
||||
|
||||
CREATE INDEX "ix_billing_subscriptions_on_billing_customer_id" ON billing_subscriptions (billing_customer_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue