#one-love_api

1 messages ยท Page 1 of 1 (latest)

finite widgetBOT
#

๐Ÿ‘‹ 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/1217851894639235143

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

rough forgeBOT
#

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.

stone dirge
rough forgeBOT
thick lichen
#

$checkoutSession->id would return the checkout session id

#

That's expected

#

What code are you using

#

What's the context here? I don't have enough info to help you

stone dirge
#

How do I obtain the evt_ that you see above. If that line of code gets the 2nd id below it?

#

I uploaed the beginning of the response.

thick lichen
#

Obtain it from where?

stone dirge
#

The checkout session completed object sent back from webhooks. That I provided above.

thick lichen
#

You haven't shared any code

stone dirge
#

I did. Something must be wrong. I'll add it again.

#

There it is. I've put the event in a vaiable named $checkoutSessionId->id

#

There are two id's

#

my line of code, which I assumed should pull the first, is instead pulling the second.

thick lichen
#

That is only a partial event object

#

I need your webhook handler code

stone dirge
#

Why? I don't understand.

#

I'm just trying to obtain the evt_ you see in the response.

#

Can I not get it.

thick lichen
#

You can

#

I need to see what you're doing in your code

#

It should be straightforward

#

I can't tell you what to do if I don't know what your variable names are, how you are storing the event object, etc

stone dirge
#

That block of code should explain.

#

Do you see it.

thick lichen
#

$checkoutSession = $event->data->object;

#

You set that to object, which is the checkout session

#

You can see this yourself in the event object you shared with me

#

event -> data -> object is the checkout session not the event object

#

If you need event id get it off of the event

#

event -> id

stone dirge
#

Thank you. I appreciate it.

#

Have a great day.

thick lichen
#

Same to you

stone dirge
#

$event_id =$event->id is returning the pmc_ id not the evt_ id

thick lichen
#

What id pmc id?

#

Where did you add that line of code?

#

If it's within case 'checkout.session.completed': it should be the event id

stone dirge
#

I'm sorry. I forgot to refresh the page. it works. Thanks again.

#

Can stripe calculate taxes in Canada automatically for me?

thick lichen
stone dirge
#

The created dates in the response. Do those dates represent seconds or minutes?

thick lichen
#

Neither

#

They're unix timestamps

stone dirge
#

So if my database is column is setup for datetime - will that inserted time format to a readable date. Example 2024-03-13

thick lichen
#

You'd probably have to convert it yourself

#

But just test it out