#Kesteris
1 messages · Page 1 of 1 (latest)
Hi there! Pasting your other message in this thread:
var priceCreateOptions = new PriceCreateOptions
{
Product = createdProduct.Id,
UnitAmountDecimal = (decimal)subscription.Price * 100,
Recurring = new()
{
Interval = "day",
IntervalCount = subscription.PeriodDays,
TrialPeriodDays = subscription.DelayDays,
},
Currency = "eur",
};
Can you share the Payment Link ID?
Wondering how can I do that
Can you share the Payment Link here?
Do you need the ID like pi_.....?
If you are using Payment Links, you should have a plink_xxx ID.
But feel free to share the actual Payment Link here if that's simpler for you.
I am using a checkout
Like so
I am creating payment session and then opening a generated link to checkout
You menationed "payment link" in your first message, so I assumed that you were using our Payment Link product. Thanks, having a look!
This is the request were you created the Checkout Session: https://dashboard.stripe.com/test/logs/req_ohzZAiluLpuHeI
But you didn't set any trial (either trial_end or trial_period_days):
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-subscription_data-trial_end
I see.. I set up recurring Price object instead with trial days.. I guess that might a problem
Although, can I mix subscription and product in the same session?
While paying once for the product and having recurring payment for subscription?
I see.. I set up recurring Price object instead with trial days.. I guess that might a problem
When using Checkout Session, you need to set the trial when creating the Checkout Session itself.
Although, can I mix subscription and product in the same session?
Yes Checkout Session work with multiple prices. Note that you'll need to usemode: subscriptionif at least one price is recurring.
Won't customer be charged for the product with recurring payment also if I set mode to subscription?
For recurring prices, then customers will have recurring payments. For one time price, customer will only pay once.
So it depends on the Price object itself: https://stripe.com/docs/api/prices/create#create_price-recurring
Just to be clear, for having a subscription with recurring payment and trial days, I need to create Session with SubscriptionData which includes TrialPeriodDays and also when creating Price, I should define that it's Recurring payment with the same TrialPeriodDays?
You can completely ignore the trial setting on the price. Everything else is correct.
Alright, thanks