#tienbt_api
1 messages ยท Page 1 of 1 (latest)
๐ 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/1217070811316490321
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- tienbt_api, 1 hour ago, 51 messages
hi! hello! how can I help?
I am using 3ds for creating payment intent.
I am developing in php and vuejs
I have one api to create payment intent with param request_three_d_secure = any and create a transaction pending in my system.
When click button checkout FE will call this API and open screen pay now and use payment element to display card input part.
After input card, FE will call confirm payment.
FE use this code.
What does this param mean?
Please help me check this. Thanks/
that param means that if 3D Secure is required, we will not present the popup for it automatically. Instead you would have to call another function to do that.
Overall I wouldn't really recommend using the parameter. What guide are you using, what page is that in the docs from your screenshot, what's the URL?
Can you send me a link for reference?
A link for what exactly?
confirmCardPayment for FE
note that confirmCardPayment is only relevant if you're using the CardElement, but usually we suggest using the PaymentElement component instead.
in any case there's an API reference for confirmCardPayment at https://docs.stripe.com/js/payment_intents/confirm_card_payment
I'm unsure if that answers what you're looking for, I'm still confused by overall how we can help and the issue you're blocked on.
we are using PaymentElement
great! then you would use confirmPayment , not confirmCardPayment
so for example https://docs.stripe.com/payments/save-during-payment is the correct guide to use
Yes, what I'm wondering is that my system's transaction has 3 statuses: success, failure, and pending
I don't know what page this guide is from(I asked but you did not reply) but it seems to be an older guide for CardElement so it's not relevant
do you need to use a manual redirect?
why not just use the default(Stripe will show a popup for 3D Secure for you when you call confirmPayment)?
Is there any link for instructions on this please let me have it.
sorry, instructions on what exactly?
use the default(Stripe will show a popup for 3D Secure for you when you call confirmPayment)
about this
Hey! Taking over for my colleague. Let me catch up.
Hi @sinful bane
The guide you were referring to at the begingin is using confirmPayment:
https://docs.stripe.com/payments/save-during-payment?platform=web#web-submit-payment
What clarficiation are you looking for exactly ? and what limitation are you facing with that integration ?
I use 3ds and still use this link, is that right?
I'm having problems with 3ds processing
What you mean by "use 3ds" ?
3d secure
Could you pleaase share more details? what kind of issue ?
I have one api to create payment intent with param request_three_d_secure = any and create a transaction pending in my system.
No, I meant what you mean by you use 3d secure ? 3d secure is requested by the bank issuer when they judge is required in order to complete the payment
Why you want to create a PaymentIntent with that particular param ?
Because I want it to apply 3d secure to our payment
Nice.
Now what is the issue you are facing when following the guide you were sharing initially
https://docs.stripe.com/payments/save-during-payment?platform=web#web-submit-payment ?
?
After create payment intent, we will this confirm payment intent
After create payment intent, we will confirm this payment intent
and response will have next_action
is it right?
and we use iframe to display this next_action.url
No you don't need to do that.
You can use Stripe Element and confirm the payment_intent using confirmPayment.
You simply need to follow that guide step by step
So how do we use 3D Secure in our payments?
When creating the PaymentIntent you can simply add the param request_three_d_secure = any
Stripe Element will handle the 3Ds for you without any additional action from your side
In this step you can add the parameter you wanted to add previously:
https://docs.stripe.com/payments/save-during-payment?platform=web#web-create-payment-intent
That's the only change you can do, then you follow that guide step by step
You can test your implementation later using Stripe 3ds Test cards:
https://docs.stripe.com/testing#regulatory-cards
stripe.confirmPaymentwill attempt to complete any required actions, such as authenticating your user by displaying a 3DS dialog or redirecting them to a bank authorization page
https://docs.stripe.com/js/payment_intents/confirm_payment#:~:text=stripe.confirmPayment will attempt to complete any required actions%2C such as authenticating your user by displaying a 3DS dialog or redirecting them to a bank authorization page
Yes. I understand.
const {error} = await stripe.confirmPayment({
//Elements instance that was used to create the Payment Element
elements,
confirmParams: {
return_url: 'https://example.com/order/123/complete',
},
});
If I use this then when i click complete it will automatically go to redirect_url is that right?
it will handle for you any 3ds action yes
Yes
if (error) {
// This point will only be reached if there is an immediate error when
// confirming the payment. Show error to your customer (for example, payment
// details incomplete)
const messageContainer = document.querySelector('#error-message');
messageContainer.textContent = error.message;
} else {
// Your customer will be redirected to your return_url. For some payment
// methods like iDEAL, your customer will be redirected to an intermediate
// site first to authorize the payment, then redirected to the return_url.
}
Is it correct that we use this snippet to handle errors?
Yes that sounds reasonable
I will describe my system. I will create a payment intent and at the same time create a transaction with pending status on my system side.
My system's transaction has 3 statuses: success, failure, and pending
Then I should use which cases transaction will be updated to success and which cases will be failed.
Hi @sinful bane
Please don't use mentions, we are monitoring all threads.
sorry for this.
Np!
You can find all the available status of the payment_intent:
https://docs.stripe.com/api/payment_intents/object#payment_intent_object-status
Fell free to make the mapping with your system that you judge is accurate.
succeeded : success ( my system )
canceled : fail ( my system )
processing : pending ( my system )
With requires_payment_method, what status can it be?
You can consider all remaining status as pending in your system (e.g. requires_payment_method, requires_capture, requires_action, requires_confirmation)
But if the user does not continue to retry payment with that payment intent, then we will always have transactions in pending status in my transaction.
and it won't be a failure or success in the long time.
Yes then you can do the cleaning and remove those because PaymentIntent doesn't expire.
If I check in the dashboard, is it incompleled status?
yes
There is no fail status in here, right?
So how many statuses do we have for transactions in this dashboard?
You can filter using the +State filter
In your integration, as you are using the public API you just refer to the payment_intent's status from the public doc
Yes. If a payment intent is always in required_payment_method status for a long time, then it will only stay in this status, right?
And do not update to any status for a period of time afterward.
Hi there ๐ jumping in as my teammate needs to step away soon. That's correct, if you don't make a request to advance a Payment Intent through out of the requires_payment_method state, then it won't advance.
Do we need to use weehook?
Can we update the state of our system through redirect_url callback?
I would recommend using webhooks. Relying on your success page loading and running scripts could lead to missed orders in the case the customer unexpectedly loses network connectivity or if they close their browser to quickly.
Yes, I will check this.
I want to ask about apple pay.
Can you assist me?
About weehook, Which link can I refer to the document? Please help me.
These are some useful guides.
https://docs.stripe.com/payments/handling-payment-events
https://docs.stripe.com/webhooks
Yes, I can likely help, please feel free to just ask your questions rather than asking for permission to do so moving forward. The server is getting a bit busy and it's typically faster if you just ask your questions.
I am applying apple pay to my system, I have displayed the apple pay button in my website. So what is the next step I should take? I use php and vuejs
What's the problem you're running into with what you have so far? (quick heads up that I'm not familiar with the vue framework)
I want to know what we need to do next after getting the apple pay button displayed.
What did you do to show it? Are you integrating using our Payment Request Button or Express Checkout Element?
It is Express Checkout Element
Gotcha, so how far did you get through the guide for setting that up?
https://docs.stripe.com/elements/express-checkout-element/accept-a-payment
With Apple Pay, is there 3D secure?
I'm pretty sure there is not
and does it have weebhooks for apple pay?
Webhooks are emitted yes, but there are not any Apple Pay specific ones.
And when creating payment intent, is there any difference between card payment and apple pay?
No
'automatic_payment_methods' => ['enabled' => true],
What does this transmission mean?
That is used to enable Dynamic Payment Methods, where Stripe determines what payment method types to offer on the intent based on amount, currency, and what you have enabled in your dashboard:
https://docs.stripe.com/api/payment_intents/create#create_payment_intent-automatic_payment_methods-enabled
https://docs.stripe.com/payments/payment-methods/integration-options#using-dynamic-payment-methods
Yes, thank for your support.
Any time!
Hi
I am here
If our desgin, with payment successful, it will show a pop up notification of success and not move the page.
So what should we do?
Huh?
Because currently, after success, the page is automatically redirected to redirect_url
I'm not sure I understand what you're describing. Can you elaborate on that so I can understand what you're seeing currently, so then I can try to understand what you want to happen instead?
After successful payment, will system redirect to return_url param?
const {error} = await stripe.confirmPayment({
//Elements instance that was used to create the Payment Element
elements,
confirmParams: {
return_url: 'https://example.com/order/123/complete',
},
});
Yes, by default, that will lead to your customer being redirected to the return_url when the payment is completed.
If you want to try to avoid that, you'll want to try setting the redirect parameter to if_required:
https://docs.stripe.com/js/payment_intents/confirm_payment#confirm_payment_intent-options-redirect
How do I know which payment method is redirecting and which is not redirecting?
Paypal is currently the only redirect based payment method type supported by the Express Checkout Element.
Yes, If I use master card and visa. then the redirection will not occur.
if redirect : if_required when confirm payment intent
Correct, card payment methods do not perform redirects