#pilly
1 messages · Page 1 of 1 (latest)
If you referred deferred intent to https://stripe.com/docs/payments/accept-a-payment-deferred?platform=web&type=payment, then:
- When
stripe.confirmPaymentis called, the payment method has been collected at this point. When 3DS is required, customer will be asked to perform 3DS and payment intent status of 3DS outcome will be returned. You should check the status of the Payment Intent to decide the order status. If the status issucceeded, your order status should be completed. - It will remain as
requires_action - It's fine to create new payment intents as long as your system can ensure that the customer doesn't get duplicated charge on the same order in different payment intents.
- Only when the action is taken, then the Webhook event will be sent. For direct payment method, you should be able to get the payment intent status immediately in the
stripe.confirmPayment. For redirect payment method, you may make additional Payment Intent retrieval to check the payment intent status after customer redirects back to thereturn_url
Hey
OK cool so it looks like creating the order in our system with a pending status makes sense here then?
I guess we'll need to clear up orders in our system that have the status of pending after a certain amount of time as the intent is probably sitting on requires_action. If we don't store the intent id that might be an issue, can we lookup payment intents based on metadata using the API?
What's the difference between direct payment method vs redirect payment method? This is the code we have at the moment.
elements,
clientSecret: data.clientSecret,
confirmParams: {
return_url: '{{ url('/checkout/confirm') }}',
payment_method_data: {
billing_details: data.billing
}
}
});```
Do we have to confirm on the `return_url` or are the webhooks reliable enough that we'll have one within a few seconds, where we can then broadcast the updated status to the frontend and redirect the user to the next step in our flow?
OK cool so it looks like creating the order in our system with a pending status makes sense here then?
Before or afterstripe.confirmPayment? If it's before, you definitely can set the order status to pending. If it's after, you should check the Payment Intent status to determine the order status. Payment Intent status can besucceededat this point and you should mark the order status as paid
Before, we'll update the status via the webhooks
I see! In this case, creating order with pending status sounds good, then your system will update according to the webhook event
Great
It looks like we can search for payment intents based on metadata so that means we can clear stale orders that did not complete.
What's the difference with direct payment method vs redirect payment method?
And are webhooks reliable enough that the user is shown a loading page whilst we wait for the webhook in the background?
What's the difference with direct payment method vs redirect payment method?
Redirect payment method means that the customer will be redirected to the payment method page to completed the payment instead of staying with your website. Direct payment method means customer will always stay in your website to complete the payment method. Some example of redirect payment method is like iDeal, FTX, Sofort...etc
And are webhooks reliable enough that the user is shown a loading page whilst we wait for the webhook in the background?
If you wish to have more synchronous payment outcome, I'd recommend retrieving Payment Intent to get the latest status. Otherwise, webhook should be sufficient
We are using cards, paypal, google/apple pay, klarna
Is there any concern about these payment methods?
I don't understand the direct/redirect payment method, you said we can get the intent status immediately from stripe.confirmPayment()
But the docs say it just redirects to the return url
Yes! After the customer redirects to return_url, you can make additional Payment Intent retrieval request to get the payment outcome. You may refer to the guide here: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#web-submit-payment
It works the same for deferred intent flow
Oh ok, you meant we can query the intent status after we call stripe.confirmPayment(), on the redirect page
correct
Ok great
Last question
We don't need to email customer if intent is failed, only if the intent transitions from processing to failed?
If the intent is processing we show them a message saying we'll email them when their payment confirms, and if it transitions to failed then we email them a failed payment message?
If the intent is failed on the return url we can just redirect them back to checkout page and ask them to retry?
This looks right to me