#atul

1 messages · Page 1 of 1 (latest)

static valveBOT
strong pulsar
#

What do you mean by customer offer customer?

#

If you simply want to offer trial to a customer, specify it when you create a Subscription

alpine stump
#

oh soorry

#

I have requireement, I want to offer trail period to new customer for each product available.
How can it be achieved ?

strong pulsar
#

Can you elaborate a bit more? on an example setup

#

Like what API are you using?

alpine stump
#

I have not started with development,
I neeed your input, which API's can help in achieving this

strong pulsar
alpine stump
#

Can promotion code code be helpful, as i want code to be valid only one time for each product ??

#

Trail alone cannot meet requirement

strong pulsar
#

Ah yes promotion code do that, but keep in mind promotion code can not set the billing cycle freely like trial

#

One possible solution is using trial, and manage the product mapping on your own system so next time within the same product, you don't create trial again

alpine stump
#

As per per docs to have promotion code field on checkout page, I need to have
allow_promotion_codes: true,
But its not working

#

Still I cannot seee field to enter coupon code

strong pulsar
#

Can you share an example Id?

alpine stump
#

const session = await stripeService.createCheckoutSession({
mode: 'subscription',
customer_id: customerDetails.customer_id,
stripe_price_id: planDetails.price_id,
quantity,
trial_period_days: planDetails.trial_period_days,
metadata: {
operation: 'create_subscription',
whitelabel_id: whitelabelId,
account_id: accountId,
product_id: planDetails.product_id,
plan_id,
},
success_url: ${DOMAIN_URL}/admin/settings/billing?success=true&session_id={CHECKOUT_SESSION_ID},
cancel_url: ${DOMAIN_URL}/admin/settings/billing?canceled=true,
allow_promotion_codes: true,
});

strong pulsar
alpine stump
#

Do i need to do anything with my account setting ??

strong pulsar
#

We don't know yet. We need to look at the specific request id or the checkout session url you created

alpine stump
#

AS promocde fied is not showing on checjkout page

#

req_bwk2VoyJ8XVNtF

strong pulsar
#

I don't see allow_promotion_codes in your request body