#nikivi
1 messages · Page 1 of 1 (latest)
Can you share the request id
Should start with either ppage or cs_
Where are you seeing that unix date from 2021 exactly?
i do one of the payment links
in dev mode
to test my web hook
this webhook updates user table memberUntil
with the date until stripe is active for
i just got 2021 year for it though
which is very odd
test_a1uXY38YlREoCCw7dvCYfFC8sWswhIUEvlEwh37OPPB3zKw6YDYS627Jlg#fidkdWxOYHwnPyd1blpxYHZxWjFJcGJNQmdUMEZBTTRVa0FENHZtQDdGNCcpJ3VpbGtuQH11anZgYUxhJz8ncWB2cVo8RFQ9fVQ8ajdgVl1kMmhhVFQneCUl
Which param specifically has the date from 2021?
I only see 2023 dates attached to that session
const endDateInUnix = subscription.current_period_end
console.log(endDateInUnix, "end date in unix!")
Can you share the subscription id you're looking at then?
That code isn't checking a session object...
im confused
const subscription = await stripe.subscriptions.retrieve(
checkoutSessionCompleted.subscription,
)
const endDateInUnix = subscription.current_period_end
console.log(endDateInUnix, "end date in unix!")
oh i guess you meant this
const unixDate = "1699887786"
const timestamp = 1609459200 // replace with your Unix timestamp
const iso8601_format = new Date(timestamp * 1000).toISOString()
console.log(iso8601_format)
i run this to convert
maybe the code is wrong
seems js code is wrong
how do i get the id
i have payment live link
is everything in its url param
this?
That's an open session
No subscription was created from it
Your code is clearly checking a subscription id
const timestamp = 1699887786
const iso8601_format = new Date(timestamp * 1000).toISOString()
console.log(iso8601_format)
im so confused
checkoutSessionCompleted.subscription,
)```
what is the value of checkoutSessionCompleted.subscription
You're retrieving a subscription
I just need to know what that subscription id is
because there's not one attached to the session id you shared
Using vars defined in .dev.vars
Your worker has access to the following bindings:
- Vars:
- LA_STRIPE_SECRET_KEY: "(hidden)"
- LA_STRIPE_WEBHOOK_SECRET: "(hidden)"
- EDGEDB_DSN: "(hidden)"
- LOCAL: "(hidden)"
⎔ Starting local server...
service core:user:stripe: Uncaught ReferenceError: process is not defined
at index.js:18023:16
✘ [ERROR] MiniflareCoreError [ERR_RUNTIME_FAILURE]: The Workers runtime failed to start. There is likely additional logging output above.
my stripe web hook server started crashing
1 sec
sub_1O0ncx4soP2HpBfdIlWTbFVo
Your code is doing something weird then
current_period_end is 1699890615
On that sub
Which is 2023-11-13 15:50:15 +0000
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
thank you for confirming