#taviksha-akar_api

1 messages ¡ Page 1 of 1 (latest)

sharp brambleBOT
#

👋 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/1275696158400057417

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

torpid cometBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

broken robin
#

The 2nd onward Invoices will automatically move from draft to open in 1 hour. But you can always call Finalize Invoice API to mark it as Open

#

and call Pay Invoice API to mark it as paid, if you have collected the customer payment method

brave pecan
#

I have collected the customer payment method at time of subscription creation and invoice is created with open status. So can it be created with PAID status immediately?

broken robin
#

Did you create Subscription normally or via SubSchedule?

#

And what is your collection_method? charge_automatically is correct, send_invoice will wait on the Invoice

brave pecan
#

I am creating Subscription using subscription schedule api.

#

I have not passed collection_method as in documentation it is saying - Defaults to charge_automatically on creation

broken robin
#

Ah okie so that's why

#

You would want to call the Finalize Invoice API and mark it as Open

#

then call Pay Invoice API to pay it

brave pecan
#

what is this Finalize Invoice API and Pay Invoice API ? Are they diffrent api then subscription create api? And do you mean I should call these two api after subscription create to make invoice as paid immendiately?

broken robin
#

Yes they are Invoice APIs, and yes to call each of them

#

Please try in Test mode

brave pecan
#

or if I don't call these api so how much time it take to move from draft or open state to paid state?

broken robin
#

Should be right after you call them

brave pecan
#

no i am asking if i dont use these invoice api so how much time it take to move from open to paid status

broken robin
#

It should be 1 hour

#

You can use the Test Clock to test

brave pecan
#

ok let me try the Invoice APIs,

#

I have more more question, i have a one-off product - https://dashboard.stripe.com/test/products/prod_QbNlCpft6VzMQW?edit=prod_QbNlCpft6VzMQW&source=product_detail

and a recurring product - https://dashboard.stripe.com/test/products/prod_QbF0dyUefIwseB?edit=prod_QbF0dyUefIwseB&source=product_detail

So i want to charge the one-off product in first intial invoice only and not in next invoices. So how can I achive this?

I am passing this -

['recurring'] = [
'interval' => $product['period_unit'], // e.g., month
'interval_count' => $product['period'], // Set according to your needs
];

for recurring items and not passing it for non recurring items then subscription create api is giving me this error-

Missing required param: phases[0][items][1][price_data][recurring]

broken robin
#

Can you try this?