#captainnoyaux_docs

1 messages ยท Page 1 of 1 (latest)

tight lynxBOT
rancid pecanBOT
#

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.

tight lynxBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1259824797811085416

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

honest wharf
#

Hey sorry to bother you, I'm using stripe-java and following this video https://www.youtube.com/watch?v=7z8mncrjq24 but I find it difficult to map JS to Java, is there a documentation. For instance how to get the subscription id from the event and stuff like that

tight lynxBOT
honest wharf
#

getObject is deprecated but the sdk doesn't tell us what we should use instead

#

event.getData.getObject()

cosmic yoke
honest wharf
#

Oh thanks that's what I was looking for

#

it's the typing of events

#

in my case it's a checkout session, how do I find what type is the correct type to cast it to ?

#

and in my case .getObject() returns null even though I can see all the infos inside the rawJsonObject field

cosmic yoke
honest wharf
#

Thanks for the link but I'm having trouble finding this info myself

cosmic yoke
#

What exactly are you trying to do?

honest wharf
#

Implementing a commitment period by using Subscription Schedulers

#

when a customer want to unsubscribe I intend to intercept it and create a phase with the number of iteration left

#

and after that cancel his subscription automatically

cosmic yoke
#

If you've correctly costructed the event as per the code/link I shared, then this will work for the Checkout Sesison related events:

Session checkoutSession = (Session) stripeObject;
honest wharf
#

yeah I'll try to do that, but I dislike having to come here to ask for help to navigate the doc ๐Ÿ˜ฉ

#

But I thank you for your time and your expertise

#

it's extremely valuable

cosmic yoke
#

Navigate which doc?

honest wharf
#

stripe in general

#

I'll go and try implementing that, I believe I have nearly everything now

#

have a great day

#

well except I'll have to find the correct model from when the user tries to cancel

cosmic yoke
#

Well generally the event types map to a specific API object so you derive it from the event type in your switch statemement (e.g. checkout.session.completed is Session)