#ZakMcKraken

1 messages · Page 1 of 1 (latest)

royal cragBOT
sonic mango
#

another thought I add was to update the coupon on the fly, prior to creating the subscription, and restrict it to the specific price, but alas the update coupon API doesn't allow it

sharp robin
#

Can you detail more explicitly each of the steps of your desired flow? I feel like this could be solved by creating separate Subscription Items, but I'm not entirely sure without more context.

sonic mango
#

It's a hybrid situation.

#

Customers are allowed to purchase a one time product and a subscription at the same time.

#

And sometimes there is a promo code, but the way the system was designed, the equivalent Stripe Coupon cannot be restricted.

#

When there is a promo code for a subscription, I need to apply it only to the subscription.

#

Currently because when I create the subscription I pass the param "coupon" and the invoice is immediately finalized, the promo is applied to the invoice, including the one time purchase, which is not the behavior we want

#

That's why I wanted to not use the coupon param anymore and update the invoice line manually and then finalize the invoice manually

#

so to be clear, if they are only buying a subscription it's a non issue because the coupon will apply only to it

#

but if they have a pending "one time purchase" then it's a problem because it gets discounted as well

sharp robin
sonic mango
#

yep that's what I was thinking too

#

thanks for confirming

#

is there any gotcha?

#

our subscription are usually pretty simple with: customer, application_fee_percent, items.price and trial_end params

#

looks like that would all be in one phase?

sharp robin
#

yep, exactly. The next Phase could then be used to update the amount and trial or whatever other mechanisms you have in place to determine the behavior of the Subscription

sonic mango
#

yeah i don't think we actually need a next phase

#

I would just create the schedule

#

modify the invoice

#

and then call pay invoice

#

and if I understand correctly then it becomes the same as a sub created with the subscription API