#Themax1 - Payment Status

1 messages · Page 1 of 1 (latest)

dapper mulch
#

Hello again! What's up?

bold kindle
#

hello

#

just simple questions, if my payment pass through to confirm and succeed, can he fail later on or not?

dapper mulch
#

If a Payment Intent has a status of succeeded that means you got paid and it cannot fail after that.

bold kindle
#

he can not fail for any other reasons right?

dapper mulch
#

What do you mean?

bold kindle
#

Like, if a payment pass through confirm and the status is charge.succeeded, that means the payment already is done and can not fail right?

dapper mulch
#

Yes.

bold kindle
#

And other thing, I saw that some errors have a special comment about, like this error code: payment_intent_authentication_failure, he says that:

The provided PaymentMethod has failed authentication. You can provide payment_method_data or a new PaymentMethod to attempt to fulfill this PaymentIntent again.

That means I can get this payment intent and try to make the user pay again? or is better to create a new transaction intent?

dapper mulch
#

Yep, you would use the same Payment Intent and have them attempt payment again. You should not create a new Payment Intent.

bold kindle
#

ohh gotcha

#

but lets say the payment failed because of expired credit card, I create another payment intent because that one already failed right or not?

#

I only maintain the same if the error is something like the above? the one that I listed

dapper mulch
#

No, you would not create a new Payment Intent. A Payment Intent represents a Customer's intent to pay you for something specific. If someone intends to pay you $10 and they get declines three times and succeed on the fourth try that's all one Payment Intent.

bold kindle
#

oh gotcha, so if first time paying, I create the intention and if fails for any reasons, I maintain that payment intention and keeps modify until gets accepted?

dapper mulch
#

Yep.

#

That' exactly right!

bold kindle
#

that's interesting, I was creating other payment intent if a payment fails

#

so I going to follow this schema know

#

and play a little with this things to understand better

dapper mulch
#

Sounds good!

bold kindle
#

Can i ask one more thing?

dapper mulch
#

Sure!

bold kindle
#

I'm working with Expo RN building a mobile application, I try to use the 3D secure authentication to test out this feature in case of needs authentication for payments, I saw that of them doesn't return to my app, the webview one, he goes to my Expo GO app instead of my app running, I trying to pass a URLScheme on StriperProvider but nothing too

bold kindle
#

Yep

#

I trying to do the first one on github

#

but didn't fixed for me

dapper mulch
#

Are you getting an error or unexpected behavior?

bold kindle
#

no errors, just keep going for Expo Go app instead of my app

dapper mulch
#

What about the second link?

bold kindle
#

tried too, same thing, unless I'm actually doing something wrong

dapper mulch
#

Can you share specific details about what you're trying that's not working? Like the code you're using for everything related to the redirects and URL schemes?

bold kindle
#

sorry for delay

#

I was afk

#

i have a different question, going to hold that for later

#

I have a question about the react native SDK, I doing confirmPayment method provided by the SDK, how can I pass the ID from a existing payment intent that I only need to confirm?

#

I doing something like this:

        const response = await paymentOrder({ orderId: order?.id }); -> return client secret after create payment intent
        // Confirm the payment with the card details
        const { paymentIntent, error } = await confirmPayment(response.data.secret, {
            type: 'Card',
            billingDetails,
        });

But let's say that the payment failed, and I have to try to confirm that payment intent with another card, so I'm going only to execute the confirmPayment, but how can relate him to a payment ID?

#

Does my question sounds confuse?

round spoke
#

@bold kindle The method takes the PaymentIntent's client_secret already as the first parameter, it already does what you need

bold kindle
#

but what if the payment intent failed after first time

#

how do I generate other client secret?

#

from that payment intent

#

again

round spoke
#

you don't, it's the exact same secret

bold kindle
#

but I cannot store that client secret right?

#

The client secret can be used to complete a payment from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer.

#

but I going to need that store if the payment failed

#

so the customer can try again

#

later on if he needs to

round spoke
bold kindle
#

Ohhh gotcha

#

I retrieve than I use the client secret there do confirm it

#

ohh nice

#

going to try out now

#

ty