#atul
1 messages · Page 1 of 1 (latest)
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
oh soorry
I have requireement, I want to offer trail period to new customer for each product available.
How can it be achieved ?
I have not started with development,
I neeed your input, which API's can help in achieving this
I would suggest starting with https://stripe.com/docs/billing/subscriptions/trials
Can promotion code code be helpful, as i want code to be valid only one time for each product ??
Trail alone cannot meet requirement
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
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
Can you share an example Id?
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,
});
Can you go to https://dashboard.stripe.com/test/logs and find that request id? req_xxx
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Do i need to do anything with my account setting ??
We don't know yet. We need to look at the specific request id or the checkout session url you created