#edutomesco
1 messages · Page 1 of 1 (latest)
Hi there. Let me help you with this.
stripeEvent.Data.Object["charges.data[0].payment_method"]
i can't access to this object
I'm using golang
You can find an example here, down from line 57: https://stripe.com/docs/webhooks/quickstart?lang=go
don't undestand
What kind of event are you listening to?
payment_intent.succeeeded
And I want the payment method that it is in "charges.data[0].payment_method"
I see, let me check on my side.
another thing this webhook didn't arrive to me but it says it is send with no problem: evt_1M4MSkG1fQyuUuzX4pE2Nu29
This should give you the payment method ID
switch event.Type {
case "payment_intent.succeeded":
var paymentIntent stripe.PaymentIntent
err := json.Unmarshal(event.Data.Raw, &paymentIntent)
if err != nil {
...
}
var paymentMethod := paymentIntent.Charges.Data[0].PaymentMethod
As for the missing webhook request, is this where you're hosting your testing app https://api.bloock.dev/subscriptions/stripe-events?
yes
Maybe you could share some code where you integrate the webhook? I see that your server has responded successfully to the Stripe webhook, so maybe your integration is dropping the event somewhere.
so strange
because it's integrated as all the others
and I received the others
my fault I alreaddy see the mistake
thanks for all
appreciate
Happy to help. Let me know if you have any other questions.