#CapitanRex
1 messages · Page 1 of 1 (latest)
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
Can you give me the Charge ID so I can take a look?
"id": "py_1JZg98JkXDOMSKKM36dJPttg"
Looking, hang on...
It looks like this Charge has two events associated with it, a charge.pending here: https://dashboard.stripe.com/test/events/evt_1JZg99JkXDOMSKKMcedaja3o
And a charge.succeeded here: https://dashboard.stripe.com/test/events/evt_1JZg99JkXDOMSKKMwNuVem9a
Those look normal to me; what questions do you have about these or how can I help further?
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
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?
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
To clarify, is your code logging that it received the charge.pending event, or is nothing being logged?
nothing is being logged
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.
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
Can you share all of your webhook handling code so I can take a look?
I'm not seeing any logging code here, did you remove it?
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
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.
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
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?