#akashpatil7596_api

1 messages ¡ Page 1 of 1 (latest)

chilly ingotBOT
#

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

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

swift steppe
#

Hello

#

Hi

#

Anyone there?

twilit rock
#

Hi @swift steppe I'm helping other user at this moment, and I'll be with you shortly.

swift steppe
#

Sure buddy

twilit rock
#

Thanks for waiting!

#

Let me take a look at the subscription

swift steppe
#

suRE

twilit rock
#

Ok, I know the problem.

#

Your webhook endpoint doesn't returend 200 to invoce.created event, and that's why invoices aren't finalized.

swift steppe
#

Ummm

swift steppe
#

You mean if webhook get 200 at the time then the money will cut at the same day?

twilit rock
#

So here's the thing, Stripe expects your webhook endpoint to ack the event by returning 200 so that it can finalize the invoice. Otherwise it will delay the finalization for up to 72 hours.

swift steppe
#

and the webhook gets 200 then the money will get cut at same day?

twilit rock
#

Yes you are right.

swift steppe
#

Otherwise Everything is okk with my code?

twilit rock
#

This will not work if you are using new Stripe API version basil -> latest_invoice.payment_intent

swift steppe
#
return await this.stripe.subscriptions.create({
        customer: customerId,
        items: [{ price: priceId }],
        payment_behavior: 'default_incomplete',
        expand: ['latest_invoice.payment_intent'],
        collection_method: 'charge_automatically',
        ...(coupon ? { discounts: [{ coupon }] } : {}),
      });

I'm using this

twilit rock
#

I believed I've already told you the line of code that doesn't work latest_invoice.payment_intent, and the solution is included in the doc that I shared earlier. Can I suggest you to take a look at it?

swift steppe
#

And I want that time clock forward API which attached to customer and I can forward the time, which API is that?

twilit rock
swift steppe
#

and where is it in stripe dashboard?

#

Ok got it got it

#

Thank you very much

twilit rock
#

Just search "test clock" in Dashboard

#

No problem

swift steppe
#

Hey

#

If the webhook didn't get 200 and I want try earlier than 72 hours, is there any way?

twilit rock
#

You can manually finalize the invoice. Search "finalize a invoice" on the API reference doc

swift steppe
#

Hello

swift steppe
twilit rock
#

Two of the endpoints returned 404

swift steppe
#

and on 24th Apr?

twilit rock
#

That's the event on 24 Apr

swift steppe
#

hmmm

#

thanks

chilly ingotBOT