#Ben Clum-subscription

1 messages ยท Page 1 of 1 (latest)

west raft
#

Hi ๐Ÿ‘‹ I'm not certain off-hand whether this is possible, did you try and encounter an error?

elder olive
#

when we create the subscription with billing_cycle_anchor and proration_behavior=none, the subscription automatically becomes active. this is an issue because we still want to create that manual invoice on the user so we can charge a custom price for that first invoice. so if the customer abandons the checkout flow, they'll have an active subscription that they never signed up for.

west raft
#

Apologies for the delay, doing some testing.

#

Yeah, when setting billing_cycle_anchor to a future date, the returned Subscription is in an active state even if payment_behavior was set to default_incomplete.

elder olive
#

any ideas about another solution? the goal is to give a custom price for that first invoice. and still use the stripe-elements payment intent flow since that's what's recommended.

west raft
#

Hm

#

Can you elaborate on your scenario a bit?

elder olive
#

so we're trying to stick with the payment intent flow as much as possible as that's what's recommended by Stripe. So when a user chooses an anchor date, we support three different "charging behaviors" for the first payment on the subscription.

  1. Do not charge (the first payment is $0)
  2. charge prorated amount (the default. this is what stripe does when you choose "create_proration" on the subscription)
  3. charge full amount (charge the entire amount of the payment plan. ignore any prorations).

so to support scenarios #1 and #3, we set the "proration_behavior" to "none" and create our own invoice manually with whatever amount that we want.

the issue is that we create the subscription with billing_cycle_anchor and proration_behavior=none, the subscription automatically becomes active, even if we create a manual invoice immediately after we create the subscription, even though the customer still hasn't checked out yet.

west raft
#

Hm, so could you flip your process a bit? Create a stand-alone one-off invoice for the initial payment, then when that is paid use a webhook event to trigger the creation of a Subscription.

elder olive
#

I think that might work, but the invoice wouldn't be tied to the subscription, which makes it difficult for reporting and keeping things clean.

west raft
#

Yeah, that is true, you can't tie an invoice to a Subscription.

#

Do you already leverage Subscription trials?

#

If not, you might be able to use them to space back the start of the Subscription, and those Subscriptions will have a status of trialing so you could ignore granting access to your products/services if you see that status.

elder olive
#

we use subscription trials via the payment plan if that's chosen by the creator of the payment plan

#

could you make the subscription trial indefinitely?