#jayvir_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1304022811198885899
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi @dull token
Hi, let me help you with this.
const subscription = await stripe.subscriptions.create(
{
customer: customerId,
items: [
{
price: priceId,
},
],
payment_behavior: 'allow_incomplete',
proration_behavior: 'none',
default_payment_method: paymentMethodId,
cancel_at: cancelAtTimestamp,
application_fee_percent: applicationFeePercent,
billing_cycle_anchor: billingCycleAnchor,
collection_method: 'charge_automatically',
payment_settings: {
payment_method_options: {
card: {
request_three_d_secure: 'automatic',
},
},
},
metadata: metadata,
},
{
stripeAccount: connectedAccountId,
},
);
$71.02 Nov 14, 1:30 PM
$71.02 Dec 14, 1:30 PM
$18.33 Jan 14, 2025, 1:30 PM
instead it should be
$71.02 Nov 14, 1:30 PM
$71.02 Dec 14, 1:30 PM
$71.02 Jan 14, 2025, 1:30 PM
why 18.33 deducted
update code & fix
what mistake i am making ?
Could you please share the Subscription ID?
When you created the Subscription you instructed it to be cancelled cancel_at=2025-01-22: https://dashboard.stripe.com/test/logs/req_wYbKmuddqTQhMH
This is why the last period was prorated.
what should i do ?
prorated should not happen
i just want to achieve this
today is 15th nov
set 15 of each month as billing date
start deduction from 15th Nov for 3 months
15 Nov 2024
15 dec 2024
15 jan 2025
expiration date should be 15 Jan + 8 days so 23 Jan
(some grace period if anything happens wrong if last payment fails or something )
Why are you setting the cancel_at parameter to that date?
expiration date should be 15 Jan + 8 days so 23 Jan
(some grace period if anything happens wrong if last payment fails or something )
i just want it for limited time like 3 /4/5/6 months dynamic
@dull token hope u got my concern
What do you mean by "expiration date" exactly?
i want to auto cancel after fix duration
You should then set the cancel_at at the end of the last month billing period. No need to add any extra days.