#hassamsaeed

1 messages ยท Page 1 of 1 (latest)

thin mirageBOT
dim frost
#

Hi there!

#

Probably payment_intent.payment_failed

simple dirge
#

it will cover all type of payment failed?

#

One time charge, subscription charge and many others

#

Why don't you recommend charge.failed event?

dim frost
#

Do you create Charges or PaymentIntents?

simple dirge
#

Charges and Subscriptions

dim frost
#

If you do create Charges, then you should use charge.failed. However note that we don't recommend using charge's as it's an old API. Instead you should create PaymentIntents (that's why I recommneded payment_intent.payment_failed).

simple dirge
#

I need to integrate webhook to an existing application not new one. So Payment_intent.payment_failed will handle charges and subscription?

#

I need a detailed reason why my charge has been failed

dim frost
#

If your integration is directly creating charges, then you have to use charge.failed.

simple dirge
#

Like this one

#

which webhook gives me the detailed description like the screenshot that i sent above?

dim frost
simple dirge
#

Ok Thanks

#

let me check payment intent hook as well

dim frost
#

PaymentIntent has a last_payment_error property. But again, if you directly create a Charge object, then you won't receive a payment_intent.payment_failed event.

simple dirge
#

Lemme check both of these. Basically our app uses two types of charges

  1. Direct charge (One time charge using card)
  2. Subscription based charges
dim frost
#

Direct Charge can be either a PaymentIntent or a Charge, so I don't know. Can you share a specific example so I can check?
Subscription will create invoices that will create PaymentIntent that contain a Charge.

simple dirge
#

We are using this method for one time charge
Stripe.charges.create({})
And for subscription
Stripe.subscriptions.create({})

dim frost
#

Got it, so you are creating Charges and Subscriptions. So if you want to listen to a single event, that would be charge.failed.

simple dirge
#

okay sure thanks. let me check then i will get back to you if i need more help

simple dirge
#

I need to add card to give me the insufficient funds when i create a charge.How may i add the card?

#

It does not allow me to add the card

dim frost
#

Use this card 4000000000000341

simple dirge
#

Sure

timber isle
#

๐Ÿ‘‹ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!

simple dirge
#

Sure

#

Are you there?

#

What is the issue here?

#

it is just a username:password for authorization

timber isle
#

I don't think we accept this kind of URLs

simple dirge
#

got it

timber isle
#

you shouldn't worry about adding basic or any sort of authentication

simple dirge
#

I type : instead of @

timber isle
#

verifying the signature is enough to see if this is a message that was sent by Stripe or not

simple dirge
#

What does this object means?
outcome: {
network_status: 'declined_by_network',
reason: 'generic_decline',
risk_level: 'normal',
risk_score: 12,
seller_message: 'The bank did not return any further details with this decline.',
type: 'issuer_declined'
},

#

inside the charge.failed webhook

timber isle
#

this is a generic decline from the issuing bank

simple dirge
#

I need a detailed message like the screenshot that i sent above. How can i get?

#

Please see my screenshot that i sent to @dim frost

timber isle
simple dirge
#

I need a card which attaches with the customer successfully but while creating a charge it gives me an error about insufficient funds

timber isle
#

then you can use the one that my colleague sent you

simple dirge
#

it gives me an error about general decline

#

outcome object will always be return. Right?

austere goblet
#

Hey! Taking over for my colleague. Let me catch up.

austere goblet
simple dirge
#

then how i will handle the webhook generic case?

austere goblet
simple dirge
#

I want detailed error message from charge.failed webhook

#

why the payment declines

austere goblet
#

for generic_decline => The customer needs to contact their card issuer for more information.

simple dirge
#

How i get this message from webhook?

#

This is the response which i get from webhook

#

I hope you get my point

austere goblet
#

In the webhook you have just the code, you can create a mapping of code=> message from the link I shared above and display that to your customer.. you may need to manage translation in case you have multiple language support ...

simple dirge
#

Okay sure.
What if i get the message from outcome object seller_message property?

austere goblet
#

You can but I can't garantee that for all cases it exists

simple dirge
#

Okay sure. but the code will always be present in the outcome object. Right?

austere goblet
simple dirge
#

But the failure_code is card_decline that is not present in the decline link that you mentioned. How may i redirect user to that page

austere goblet
#

that is not present in the decline link that you mentioned. How may i redirect user to that page
You can't you need to
create a mapping of code=> message from the link I shared above and display that to your customer.. you may need to manage translation in case you have multiple language support ...

simple dirge
#

Okay sure Thanks

austere goblet
#

Welcome!