#jayvir_api

1 messages ¡ Page 1 of 1 (latest)

nova nexusBOT
#

👋 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.

rough helm
#

hi @dull token

dull token
#

Hi, let me help you with this.

rough helm
#

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 ?

dull token
#

Could you please share the Subscription ID?

rough helm
#

sub_1QIRS4JRoJfA1S16mdpsybZf

#

@dull token sub_1QIRS4JRoJfA1S16mdpsybZf

dull token
rough helm
#

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 )

dull token
#

Why are you setting the cancel_at parameter to that date?

rough helm
#

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

dull token
#

What do you mean by "expiration date" exactly?

rough helm
#

i want to auto cancel after fix duration

dull token
#

You should then set the cancel_at at the end of the last month billing period. No need to add any extra days.