#phant

1 messages · Page 1 of 1 (latest)

still canopyBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

  • phant, 16 hours ago, 13 messages
  • phant, 1 day ago, 17 messages
  • phant, 1 day ago, 12 messages
  • phant, 1 day ago, 90 messages
  • phant, 2 days ago, 102 messages
  • phant, 2 days ago, 31 messages
    and 1 more
native lodge
#

They are both event to notify your when a payment is unsuccessful. The difference is the object type that you receive in the webhook event

deft maple
#

yeah so when a subcription is cancelled which one is called?

#

sorry

#

not cancelled but failed

native lodge
#

invoice.payment_failed gives you an invoice object, whereas payment_intent.payment_failed gives you a payment intent object

deft maple
#

yeah so when a subcription renewal has failed which one is called?

native lodge
deft maple
#

i mean for failed

native lodge
deft maple
#

got it thanks

#

but if the subcription fails on first attempt will it go to this event payment_intent.payment_failed

#

cause when i tried it did not

native lodge
#

What's the subscription ID?

deft maple
#

i was using test clock

#

sub_1OkHLPCqhyxGoBc4V4AOj2bx

#

but if the subcription payment fails on first attempt will it go to this event payment_intent.payment_failed ??

native lodge
#

The invoice was paid successfully

deft maple
#

dude previously it failed

#

after it i made it successful

native lodge
#

Ok, I know where the confusion is

deft maple
#

one first failed attempt it did not call this event payment_intent.payment_failed

native lodge
#

For backward compatibility reason, when invoice.payment_action_required happens, another invoice.payment_failed will also be fired at the same time.

deft maple
#

but when first time subcription payment fails on first attempt will it go to this event payment_intent.payment_failed

native lodge
#

What's the subscription ID?

deft maple
#

sub_1OkHLPCqhyxGoBc4V4AOj2bx

native lodge
#

and what's the payment intent ID?

deft maple
#

not sure about that

native lodge
#

You said you received a payment_intent.payment_failed, so what's the event ID?

deft maple
#

no i did not receive

#

this event got triggered invoice.payment_failed

#

one first new subcription

native lodge
#

Ok, I believe I already explained invoice.payment_failed
->
For backward compatibility reason, when invoice.payment_action_required happens, another invoice.payment_failed will also be fired at the same time.

deft maple
#

will this also be fired, payment_intent.payment_failed ?

native lodge
#

No

deft maple
#

what does this mean > For backward compatibility reason

native lodge
#

There are some old integrations that reply on invoice.payment_failed for payments that requires 3DS.

deft maple
#

so can you tell me this which event to use whenever a subscription fails

#

first attempt or second atempt or any failures

native lodge
#

Still listen to invoice.payment_failed, and check whether the underlying payment_intent status is requires_payment_method

deft maple
#

so if this is called invoice.payment_failed, it will be on first just like said here?

native lodge
#

Yup, check if it's requires_action

deft maple
#

so after first payment starting from second payment this invoice.payment_failed wont be called?

#

there?

#

helloo??

#

can you please respond

#

helloooo?

native lodge
#

It depends, when a payment requires 3DS, the same invoice.payment_failed will be fired.

still canopyBOT
deft maple
#

heyy orakaro

#

can u tell me this: if the subcription fails on first attempt will it go to this event payment_intent.payment_failed ??

bleak robin
#

Hi there, taking over here

#

Yes it should. You can test it in Test mode 🙂

deft maple
#

i did test, but it did not🤧

#

thats what i got concerned about

#

at subcrition start when faled it did not trigger payment_intent.payment_failed

#

instead this got triggered invoice.payment_failed

bleak robin
#

Okie can you give the Subscription Id?

#

Let me take a look

deft maple
#

sub_1OkHLPCqhyxGoBc4V4AOj2bx

bleak robin
#

Ah I see, so the first Payment Intent was requires_action

deft maple
#

so why didnt this get triggered on the first failure?payment_intent.payment_failed

#

basically ran this command

#

with failure card

bleak robin
#

Because that's not actually a failure, but more of a requires_action. The PaymentIntent is is requires_action state

deft maple
#

ohh so the customer will have to retry it or strip will retry the payment?

bleak robin
#

The customer will have to retry (and you would need to notify them and present them some UI to retry). It's how to handle the requires_action status

deft maple
#

oh got it thanks

#

where will this status be present?

#

is it subscription status?

bleak robin
#

It's the Payment Intent status

deft maple
#

got it thanks

#

do it listen to both events payment_intent.payment_failed && invoice.payment_failed

#

or any one, what do u suggest

bleak robin
#

Um it's up to what you want to do. Keep in mind those are 2 different objects. Which mean ie. if you have a PaymentIntent standalone, without Invoice, you will only receive payment_intent.payment_failed

deft maple
#

and if invoice is there both events should hit right?