#Marcel Wolf

1 messages · Page 1 of 1 (latest)

rain fiberBOT
prisma dirge
#

Hi there, can you tell me the problem?

lean dagger
#

Hi Good Morning Jack

#

I want to create for a specific sales channel at our side the option to give a fixed value discount and also a 30day trial

#

it seems that i need to do it in 2 steps, first create subscription with the trial and then add the coupon

#

but this messes up my webhook handling for this

#

is there any way to do it in one step, create the subscription, apply the trial and a coupon for the time after trial?

prisma dirge
#

Sure, it sounds like a use case that subscription schedule can help.

#

So in your case you can start the 1st phase with 30 days trial, and apply the coupon in the 2nd phase .

lean dagger
#

how is the flow of this?

#

i create a subscription and add the phases afterwards or is it during creation

prisma dirge
#

You should just use schedule to create and manage subscription.

lean dagger
#

add the moment it looks like this:

subScriptParams = &stripe.SubscriptionParams{ Customer: stripe.String(req.CustomerID), Items: []*stripe.SubscriptionItemsParams{ { Price: stripe.String(req.PriceID), }, }, TrialPeriodDays: stripe.Int64(30), PaymentBehavior: stripe.String("default_incomplete"), AutomaticTax: &stripe.SubscriptionAutomaticTaxParams{Enabled: stripe.Bool(true)}, }

prisma dirge
#

This is to create a subscription. I'd suggest you to go through the doc that I sent earlier to get started with subscription schedule.

lean dagger
#

ok i will try. many thanks jack

prisma dirge
#

No problem!