Reputation: 229
I’m working on a scenario where I need to allow users to make advance payments for the renewal of their subscriptions, but I want to ensure that the billing cycle remains unchanged.
Scenario:
Subscription Details: Monthly subscription set to renew on the 27th of each month.
User Action: The user renews their subscription in advance on the 24th of August.
Expected Behavior: The subscription should still renew on the 27th of August, extending the billing cycle from 27th August to 27th September. The user should not be auto-charged again on the 27th, as they've already paid.
Issue: When trying to implement this using Stripe, I’m facing difficulties in maintaining the original billing cycle. If I set the billing_cycle_anchor to a future date, Stripe reduces the immediate charge or sets it to $0, which is not the intended behavior. I need to collect the full payment in advance while keeping the subscription's renewal date unchanged.
What I've Tried:
Immediate Payment: I created a subscription with an immediate charge.
Attempted to Update billing_cycle_anchor: Tried updating the subscription’s billing_cycle_anchor to a future date after the payment was made. However, this approach led to errors like StripeInvalidRequestError: When updating an existing subscription, billing_cycle_anchor must be either unset, 'now', or 'unchanged'.
Considered Using customer_balance: Thought about using the customer's balance to handle the next payment, but this approach seems to complicate the workflow and may not cover all edge cases.
Question: How can I handle advance payments in Stripe for subscription renewals without altering the existing billing cycle? Specifically, I need to ensure that if a user pays on the 24th, the subscription still renews on the 27th without charging the user again on the 27th, and the billing cycle remains from the 27th to the 27th of the following month.
Any insights or solutions would be greatly appreciated!
Upvotes: 0
Views: 58
Reputation: 846
How exactly is the customer "renewing" the subscription in advance? I assume these are one-time payments. There's no way to associate them with the subscription invoice directly.
One option is - when the user "renews" in advance, you can issue credit balance to the customer which then gets automatically applied on the next finalized invoice (meaning the customer won't have to pay for the next invoice).
Upvotes: 0