#krishnaKanabar - subscription

1 messages · Page 1 of 1 (latest)

still sequoia
#

I recommend reading that first. Let me know if that helps

shell orbit
#

I have read this already

#

but not getting how to actually implement it

#

and also how to setup $1 paid trial...and take $24($25 actual amount - $1 trial period amount)

still sequoia
#

I think you could do it by having the first phase charge $1 and then end right after. Then, the second phase will be a 1 month long and start after that with a 14 day trial and a price of $24 dollars. Then, the third phase will just be the normal $25/month subscription

shell orbit
#

My 14 days trial start when user pays $1. $24 should be deducted after trial period only....then why "second phase will be a 1 month long and start after that with a 14 day trial and a price of $24 dollars"??

still sequoia
#

Ok I don't think I was clear. Here's a better way to do it actually:
Phase 1: Charge $1 on Aug 1st (set the end date to Aug 15)
Phase 2: Charge $24 (set the end date to Sep 15)
Phase 3: Charge $25 per month every month

shell orbit
#

okay let me try

#

this could solve my use-case

#

So I need to create 3 prices in One product right?

#
  1. $1 - one time
  2. $24 - one time
  3. $25 - recurring
still sequoia
shell orbit
#

in this what is 'plan_JiX4v6L7JY0Vyt' where it is configured

still sequoia
#

Looks like you shared your secret key in here

#

I deleted the message

#

Be sure to roll it now

#

As it's been compromised

shell orbit
#

I was thinking to create product with 3 prices

#

okay My mistake

still sequoia
#

All good!

#

Just be sure to roll it

#

Taking a look at your ask now

#

But yeah you can pass a plan id where you pass a price id. Plans are just the older version of prices

shell orbit
#

okay

still sequoia
shell orbit
#

is there way to add 14 days to current date

#

in parameter end_date??

#

curl https://api.stripe.com/v1/subscription_schedules
-u 'secret key':
-d customer='my customer id'
-d start_date=now
-d end_date=now + 14
-d end_behavior=release
-d "phases[0][items][0][price]"=plan_id
-d "phases[0][items][0][quantity]"=1 \

still sequoia
#

What language are you coding in? Or are you doing everything in curl

#

Your language should be able to add dates

shell orbit
#

I am using php but right now first testing in curl

#

it's fine for now but if you know then do let me know

still sequoia
#

If you're only testing in curl, just manually add

shell orbit
#

I am getting this error
{
"error": {
"message": "All phase items prices must be recurring.",
"type": "invalid_request_error"
}
}

curl https://api.stripe.com/v1/subscription_schedules
-u secret_key
-d customer=customer_id
-d start_date=now
-d end_behavior=release
-d "phases[0][items][0][price]"=price_id_for_$1
-d "phases[0][end_date]"=1660003200
-d "phases[0][items][0][quantity]"=1
-d "phases[1][items][0][price]"=price_id_for_$24
-d "phases[1][end_date]"=1662681600
-d "phases[1][items][0][quantity]"=1
-d "phases[2][items][0][price]"=price_id_for $25
-d "phases[2][end_date]"=1665273600
-d "phases[2][items][0][quantity]"=1

frail zinc
#

👋 I'm hopping in since @still sequoia has to head out - let me take a look

#

Do you mind sharing the request ID of the failing request?

shell orbit
#

how do I find it?

shell orbit
#

req_OFNgu4YaHDkB2L

frail zinc
#

You're getting this error because Price price_1LPp9eSJsXH2azWQ9DyDOzYW and price_1LPp9eSJsXH2azWQDSVf2oyl are not recurring - is there a specific reason you're using these one-time prices with subscription schedules?

still sequoia
#

Lurking back real quick. Sorry I might have caused some confusion there. Even though the user will just be charged 1 time for $1 and one time for $24, the prices will still need to be recurring since it is a subscription schedule. The end dates will just take care of the fact that the customer is only charged once

shell orbit
#

okay

#

$1 susbscription schedule is generating fine

#

but upcoming invoice is showing AUG 9 - AUG 26, 2022
rather than AUG 9 - SEP 9 and amount is $11.99
(Consider my main amount is $9(instead of $25) and $1 will be trial and rest $8 should be deducted on Aug-9 to SEP 9)

frail zinc
#

Can you share the subscription ID you're looking at?

shell orbit
#

sub_1LPqI0SJsXH2azWQ9bkfbyMp

#

@still sequoia @frail zinc ??

frail zinc
#

Thanks! Let me take a look now

#

Ah, I see the issue - in your second phase you need to set billing_cycle_anchor: phase_start

shell orbit
#

In 3rd phase also this parameter required or only in second phase

frail zinc
#

I belive you'd only need it in the second p hase

shell orbit
#

I am getting values fine

#

where can I see my invoice SEP 9 - OCT 9 which will be my third phase

frail zinc
#

The only way for you to preview that would be to either wait until it's the next phase, or use test clocks to advance time and get to the next phase

shell orbit
#

I am able to see Upcoming invoice AUG 9 - SEP 9? ....In that also some price value is being deducted
"Unused time on LinkJoy MRR Plan after 09 Aug 2022" - $0.57
So second phase invoice is $8-$0.57 = $7.43 but I want $8 only

frail zinc
shell orbit
#

where do I find it?

#

call it

worn marlin
#

How was the test clock created?

shell orbit
#

from dashboard

worn marlin
#

You can get it from the url of the test clock view in the dashboard: https://dashboard.stripe.com/test/test-clocks/clock_abc123

shell orbit
#

I followed above steps of subscription schedule

#

All working fine but initial invoice is of JUL 26 - AUG 26, 2022
but Ideally it should be JUL 26 - AUG 9 because first phase of schedule is 14 days

worn marlin
#

Can you post the ID of the Clock?

shell orbit
#

clock_1LPrbqSJsXH2azWQGpz64D6u

worn marlin
#

And have you created a Subscription Schedule with a Phase for the customer you're testing?

shell orbit
#

yes

#

@worn marlin ??

worn marlin
#

Apologies for the wait, the server is very busy.

#

It doesn't look like you've advanced the clock yet. I believe the initial invoice is going to be created as though there were no phase, until you advance the clock and a new invoice is created. Can you try advancing the clock and seeing if that has the default behavior you're expecting?

analog hemlock
#

@shell orbit 👋

#

Do you have new questions or you would like to follow up here?

shell orbit
#

My issue is not solved yet

#

So I created subscription schedule

#

with 3 phases

#
  1. JULY 26 - 9 AUG( $ 1 charge - this is my 14 days trial with $1 fee)
  2. 9 AUG - 9 SEP ( $8 charge - Main price is $9 - $1 = $8 as user as already paid for 14 days trial)
  3. 9 SEP- 9 OCT - (recurring for every next month)
#

I used time clock to test

#

All working fine but initial invoice is of JUL 26 - AUG 26, 2022
but Ideally it should be JUL 26 - AUG 9 because first phase of schedule is 14 days

analog hemlock
#

Okie. It's a long chat log so could you provide again your request id to create above Subscription, and the clock id if possible?

#

I want to start fresh

shell orbit
#

give me some time

shell orbit
#

Invoice Id -in_1LQ40GSJsXH2azWQWzRV1T3N

#

this is generating for JUL 27 - AUG 27, 2022

#

but first phase for subscription is from JUL 27 - AUG 9, 2022

#

Subscription Id - sub_1LQ40GSJsXH2azWQkGE0ICxn

#

what i want is that when user sign ups he need to paid $1 for 14 days trial. When trial ends he will be charged $8($9 main amount - $1 ). For example user sign up on JUL-26 then JULY 26- AUG 9 will be first phase where he will pay $1 and $1 invoice should be generated for time period JULY 26- AUG 9. Again on 9th AUG - 9th SEP , $8 invoice should be generated. And after that SEP 9- OCT 9, OCT 9- NOV 9,so on $9 invoice should be generated

analog hemlock
#

Gimme some times to get through it

analog hemlock
shell orbit
#

in invoice description....also when invoice is getting downloaded ...that pdf file also shows Jul 26 -> Aug 26

analog hemlock
#

Ah right!...

#

Hmm looks like a bug to me

#

Gimme sometimes

shell orbit
#

okay

analog hemlock
#

btw it's still a draft Invoice. Have you tried finalized it and see the PDF after that?

shell orbit
#

So I am getting why it's showing for 1 month....because subscription schedules requires phases to be recurring price only
so yesterday I tried $1 and $8 to be one time and $9 price to be recurring but api shows error

shell orbit
#

price Ids -

#

price_1LQ3b2SJsXH2azWQa2LY3ev2

#

price_1LQ3b2SJsXH2azWQ5NYlwGT6

#

price_1LQ3b2SJsXH2azWQrQC4UT6m

analog hemlock
#

You can do it in Dashboard, or use the finalize API

#

The price should be recurring yes, otherwise api will error. I checked your setup at req_mpzdLHG186zqX5 and think you are doing it correctly

#

It's just the initial Invoice, while in darft mode, PDF displayed Jul 26-Aug 26 instead of Jul 26 - Aug 9

#

Could you try to finalize it and see if the finalized verseion's PDF displays correctly?

shell orbit
#

from dashboard I am not finding option

#

and API shows error

#

"error": {
"message": "As per Indian regulations, export transactions require a customer name and address. More info here: https://stripe.com/docs/india-exports",
"type": "invalid_request_error"
}

analog hemlock
#

Hmm looks like a different error. Can you update the Customer, adding a name and address as the error suggested?

shell orbit
#

I have fianlized

#

still time period is Jul 26 -> Aug 26

analog hemlock
#

I see. This looks like a bug on our end. Sorry for the inconvenience. Gimme some time to reproduce it

shell orbit
#

okay

#

How much time it will take approx??

analog hemlock
#

Hey, sorry the server is busy. Please bear with me. I might be able to test it in 5-10 mins ish

#

But generally I think this is a bug on our end, so you can write to Support to initialize an email thread, and we can track it from there

shell orbit
#

should i write mail to this emailid?

analog hemlock
shell orbit
#

I am building a Monthly recurring plan of $9. Now when user sign-up I want to charge $1 and start 14 days trial. After trial ends, it should automatically deduct pending amount ($8).

For example, User does signup on 1st Aug. He will be asked to pay $1. After succesful payment, 14 days of trial will get start. On 15th Aug, $8 should be deducted from his card . Again on 15th Sep he will be charged $9, so on and on...How to achieve this in stripe?...As stripe only provides free trial. I saw online not but not getting exactly how to do it.

#

is there any other way I can fulfill this scenario other than subscription schedules?

analog hemlock
shell orbit
#

okay

#

I have sent an email

old bough
#

Perfect! We'll take a look a respond to you there via email

thin condorBOT
#

This thread has been archived. If you need help with anything else please ask in #dev-help or contact Stripe Support: https://support.stripe.com/contact

brazen geyser
#

@shell orbit how may I help you?

shell orbit
#

hi

#

I have raised a issue on support

shell orbit
#

but didn't received reply

#

It's little bit urgent can you verify whether it's a bug or mistake from my side

#

.........................Use-case..........................
I am building a Monthly recurring plan of $9. Now when user sign-up I want to charge $1 and start 14 days trial. After trial ends, it should automatically deduct pending amount ($8).

For example, User does signup on 1st Aug. He will be asked to pay $1. After succesful payment, 14 days of trial will get start. On 15th Aug, $8 should be deducted from his card . Again on 15th Sep he will be charged $9, so on and on...How to achieve this in stripe?...As stripe only provides free trial. I saw online not but not getting exactly how to do it.
....................................................................

brazen geyser
#

what's the email address that you sent the email from?

shell orbit
brazen geyser
#

you can delete it if you want to

#

Someone is working on your ticket and they will be in contact with you shortly

shell orbit
#

okay

#

Issue will get fixed right?

#

So according to that I start building my product

#

Approx how much time it will take?

brazen geyser
#

I'm not the one working on that ticket unfortunately so I'm not sure what the context is. Please wait for a reply on your ticket.

brazen geyser
#

we will reply asap. in the meantime I would have to close this thread now that someone is working on your ticket and ask you to be patient and we will attend to your case asap.