Skip to content

Commit

Permalink
stripe: accept 1-year subscriptions as valid
Browse files Browse the repository at this point in the history
  • Loading branch information
spolu committed Jun 23, 2024
1 parent f417366 commit 91a27e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions front/lib/plans/stripe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -421,12 +421,12 @@ export function assertStripeSubscriptionItemIsValid({
}

if (
item.price.recurring.interval !== "month" ||
!["month", "year"].includes(item.price.recurring.interval) ||
item.price.recurring.interval_count !== 1
) {
return new Err({
invalidity_message:
"Subscription recurring price has invalid interval, only 1-month intervals are allowed.",
"Subscription recurring price has invalid interval, only 1-month or 1-year intervals are allowed.",
});
}
}
Expand Down

0 comments on commit 91a27e0

Please sign in to comment.