#CapitanRex

1 messages · Page 1 of 1 (latest)

trail pollen
#

Hello! Is this in test mode?

worldly warren
#

Yes is in test mode, im using also payment intent and is working good with the webhook, but my problem is with the charge.pending

trail pollen
#

Can you give me the Charge ID so I can take a look?

worldly warren
#

"id": "py_1JZg98JkXDOMSKKM36dJPttg"

trail pollen
#

Looking, hang on...

#

Those look normal to me; what questions do you have about these or how can I help further?

worldly warren
#

im trying to send an email when charge.pending
else if (stripeEvent.Type == Events.ChargePending)
{
//some stuff here
}

#

im using .net core and using this code, with, payment intent works good, but with charge pending or charge succeded do nothing

#

im saving the response in a mongo db collection and nothing is recorded when charge.pending

trail pollen
#

Can you share more of the code you're using? Or add logging earlier (like right after you get the event) to make sure you're getting the event as expected?

worldly warren
#

im logging the event inside the IF and also after
var stripeEvent = EventUtility.ParseEvent(json);

#

log.stripe(stripeEvent.Type);

#

i publish and run again but nothig

#

my collection is empty, but just with ACH

trail pollen
#

To clarify, is your code logging that it received the charge.pending event, or is nothing being logged?

worldly warren
#

nothing is being logged

trail pollen
#

Can you confirm your webhook endpoint is set up correctly and is set to listen for charge.pending events? Are you seeing anything in your web server logs? Maybe the webhook request isn't reaching your server.

worldly warren
#

yeah i can confirm that, because when you configure the webhooks, you choose what events you are going to listen and then stripe gives you the code

#

the webhook request is reaching the server, because if i send a payment intent with credit or debit card it works without any problem

trail pollen
#

Can you share all of your webhook handling code so I can take a look?

worldly warren
trail pollen
#

I'm not seeing any logging code here, did you remove it?

worldly warren
#

yeah im making changes to see if is my logging code but is not that

#

because as i told you, works fine with payment intent

loud flame
#

Sure but adding logs is the first step to debugging any code

#

it's going to be hard to help without understanding what you see, if the code is called, etc. Log the event's raw JSON, it's type upfront, etc.

worldly warren
#

i already add logs in the first step, but as i said

#

ONLY LOGS WITH PAYMENT INTENT AND NOT WITH CHARGE EVENT

#

i can not do anything to log that event just because looks like is not been triggered the webhook

loud flame
#

What happens when you curl your own webhook endpoint and send a fake json with the right type for example?
Ultimately if the entire code isn't called, there isn't much we can do either. Are you sure your account is configured for this event? the only endpoint I see in your account is a Connect webhook endpoint which listens to events on your connected account. The rest are the CLI. Are you using the CLI to test?