#Themax1 - Payment Status
1 messages · Page 1 of 1 (latest)
hello
just simple questions, if my payment pass through to confirm and succeed, can he fail later on or not?
If a Payment Intent has a status of succeeded that means you got paid and it cannot fail after that.
he can not fail for any other reasons right?
What do you mean?
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?
Yes.
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?
Yep, you would use the same Payment Intent and have them attempt payment again. You should not create a new Payment Intent.
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
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.
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?
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
Sounds good!
Can i ask one more thing?
Sure!
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
It sounds like you're running into this: https://github.com/stripe/stripe-react-native/issues/370
Are you getting an error or unexpected behavior?
no errors, just keep going for Expo Go app instead of my app
What about the second link?
tried too, same thing, unless I'm actually doing something wrong
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?
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?
@bold kindle The method takes the PaymentIntent's client_secret already as the first parameter, it already does what you need
but what if the payment intent failed after first time
how do I generate other client secret?
from that payment intent
again
you don't, it's the exact same secret
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
it's on the PaymentIntent, you just retrieve the PI server-side and read it: https://stripe.com/docs/api/payment_intents/retrieve