#Sargis

1 messages · Page 1 of 1 (latest)

rotund cedarBOT
red raven
#

Hi, could you summarise the issue for me please?

stable nimbus
#

hey, I am using properties that i mentioned, and want to test my web hook in test mode from dashboard

#

I have created https url with ngrok to which will forward webhook calls to my localhost on specific port

#

issue 1) // event = Webhook.constructEvent(payload, sigHeader, endpointSecret);
when using this i am getting signiture validation failer
2) event = GSON.fromJson(payload, Event.class);
when using this , and event.getDataObjectDeserializer().getObject is null, should it be null or what?
i am recieveing this events (payment_method.attached
payment_method.automatically_updated
payment_method.card_automatically_updated
payment_method.detached
payment_method.updated
subscription_schedule.aborted
subscription_schedule.canceled
subscription_schedule.completed
subscription_schedule.created
subscription_schedule.expiring
subscription_schedule.released
subscription_schedule.updated)

#

i dont know how but what i mentioned in 2nd issue, is no more like that, event.getDataObjectDeserializer().getObject this no return not null any more)

#

but what about the fist one

red raven
#

I see. Let me check

#

Are you sure you're using the correct endpoint secret?

stable nimbus
#

yeah what I am sure about is the correct endpoint secret, and test mode Secret key(from stripe dashboard) for my StripeClient @ornate nymph in java,
what i am not sure about , i run my ngrok command like this
"ngrok http 5000" which gives me url with https calls to which will be redirected to my localhost, but
ther is option i guess --verify-webhook and ---verify-webhook-secret , maybe this is the problem?

red raven
#

Are these options on the ngrok?

stable nimbus
#

yes

#

how should i properly test my webhooks with ngrok? is this something you can help with?

red raven
stable nimbus
#

i got this

#

thanks

#

but

#

i guess there is someting more

#

using stripe CLI can i make web hooks for specific event, with specific body?

red raven
stable nimbus
#

yes , so my api server will accept an HTTP request, but with what body?

#

i need my specific body, smth like one for my stripe customers payment method event, witch its card info

red raven
rotund cedarBOT
stable nimbus
#

how to perform this not with test body, but the real body with one of my stripe customers?

inland heron
#

👋 taking over for my colleague. Let me catch up.

stable nimbus
#

thanks

#

so the problem is the following: i have Stripe integration with my app, and want to test my web hooks with its specific events, so how to test this in my localhost to make sure everything works fine with the real data i have in my stripe dashboard like customers, payments, invoices, paymentMethods etc.

inland heron
#

are we talking about test mode data? or live mode data?

#

basically live mode and test mode have totally separate pools of data

stable nimbus
#

test mode

inland heron
#

ok

#

so I think what you're interested in is triggering an event but instead of let's say create a new customer you want to use an existing customer, right?

stable nimbus
#

yeah, existing customer from my test mode

#

lets say i have already created customer in test mode, and now want to listen payment method add event web hook , how to do this in my local

stable nimbus
#

ok thanks a lot , really appreciate!!

inland heron
#

let me know if you need any more help