#saitamaoo7_webhooks

1 messages Β· Page 1 of 1 (latest)

hoary prairieBOT
#

πŸ‘‹ Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always 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/1430805282237321236

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

light osprey
#

hey teddy

polar wasp
#

Hey! do give me some time to take a look at this

#

Do you have an example event where they are not being delivered/received? The prefix should look like (evt_xxx)

light osprey
#

the documentation mentions events that will be thrown when the checkout session is cancelled or expired, or if the checkout session is completed

When a session expires:

checkout.session.expired - Sent after 24 hours (by default) if the customer doesn't complete the checkout
When a session is completed:

checkout.session.completed - Sent when a customer successfully completes the checkout process
For asynchronous payment methods (like ACH):

checkout.session.async_payment_succeeded - Sent when a delayed payment method finally succeeds
checkout.session.async_payment_failed - Sent when a delayed payment method fails
Note: There is no specific webhook event for when a customer manually cancels a Checkout Session. Cancellations are typically captured as:

The customer closing the browser tab (no specific event)
The session eventually expiring (triggering checkout.session.expired)
For payment methods with redirects, you might see payment-specific failures

none of these are being triggered on my webhook

#

payment completed events are being triggered

#

but those are from the payment Intent events I think

#

"id": "evt_3SLHTlIQpVe63aeV1Y3yN6Gp",
"type": "charge.succeeded"

light osprey
polar wasp
#

Taking a look at this now!

#

Ah just to check, is https://demo-my.orthofx.com/smylio1/patient/v1/notifyEvent the webhook endpoint you are referring to?

#

Its receiving 405 errors as seen on your dashboard here. 405 errors typically happen when the endpoint (in this case /v1/notifyEvent) isnt configured correctly

#

Could you send me a code snippetsof your webhook endpoint implementation? I believe it could have been configured as a GET endpoint rather than a POST endpoint

light osprey
#

I will share the snippet

polar wasp
#

I see, yes maybe having a code snippet would help

light osprey
#

@PostMapping(path = "/notifyEvent") public ResponseEntity<EmptyJsonResponse> handleStripeSubscriptionWebHook(HttpServletRequest httpServletRequest,HttpServletResponse response, @RequestBody final String request, @RequestHeader(value="Stripe-Signature", required = false)String sigHeader ) throws StripeException { orderService.handleStripeSubscriptionWebHook(request,sigHeader, response); return new ResponseEntity<>(new EmptyJsonResponse(), HttpStatus.OK); }

light osprey
#

I think my webhook was not configured to include checkout events as well

#

If those are included this should work i guess

#

I will try this out and let you know

#

I also had a doubt with affirm flow testing, should that be asked here or in a seperate thread or directly on the support portal?

polar wasp
#

Apologies, what do you mean by Affirm flow testing?

light osprey
#

I am creating a checkout session so that a user can pay, but the payment method is limited only to Affirm

#

The checkout session works as expected, and when the payment is completed the flow throws a success event via webhook

#

But the only issue I am having is that, I need to simulate a failure and an error flow as well, so that our QA can test those scenarios as well

#

i tried multiple methods that the AI chatbot suggested but they do not throw a payment failed event unfortunately

hoary prairieBOT
bright iron
#

πŸ‘‹ taking over for my colleague. Let me catch up.

light osprey
#

sure no problems

bright iron
#

sorry I haven't been able to look into your issue yet.

#

I asked my colleague to step in and help you out

light osprey
celest kelp
#

do you have the ID of any example test payments where you've tried to simulate a failure?

#

ah sorry, I see what you mean now

light osprey
#

so I created a test stripe account to test this initially,
on that account whenever I would create a checkout session with only Affirm enabled, it would redirect me to a page like this

celest kelp
#

just tried a test and I can see that we redirect you to Affirm's sandbox mode rather than the normal Stripe-maintained, page

light osprey
#

but now on my company's official stripe account (sandbox -- not live mode) it redirects to this;

light osprey
#

not sure how to test payment failures when we do this

#

there are checkout events for this maybe, that i came across when configuring the webhook just now

celest kelp
#

Affirm isn't considered an 'async' payment method (i.e. like bank transfers), so the success/fail events in that screenshot aren't relevant here. The event type that would be relevant for a payment failure is payment_intent.payment_failed.

#

Still looking into how to simulate a failure in the sandbox though

light osprey
#

so just to confirm, to handle payment success would be payment_intent.payment_success and for failure payment_intent.payment_failed right?

#

we should not look at checkout events for handling payment completion right? only the paymentIntent events?

celest kelp
light osprey
#

okay yes makes sense

#

also is there any scenario where I should check the health of Stripe or Affirm, before creating the checkout session, if one or both are down for some reason?

celest kelp
#

but you shouldn't generally need to check this before creating a Checkout Session

light osprey
#

okay

#

did you get a chance to look into simulating failure/error in the affirm sandbox?

celest kelp
#

yes but I'm afraid this is something we'll need to confirm asynchronously with our product team

#

I'll send a link to create a case with our team directly, and then once we have confirmation, we'll follow up with you via email if that's ok

hoary prairieBOT
#

Hello @light osprey, we tried to send you a direct message, but couldn't

  • πŸ”— We would like to send you a message that has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.
  • Please enable direct messages from members of this Discord server (please see the instructions here) and let us know so we can try again!
light osprey
#

can you try sending the link again?

#

I had the DM setting off on discord

hoary prairieBOT
#

Hello @light osprey, we have sent you a direct message, please check it at https://discord.com/channels/@me/1430847855429550181

  • πŸ”—The message has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.
light osprey
#

alright thank you @celest kelp @bright iron @polar wasp for your help, means a lot!
have a good day!