#pilly

1 messages · Page 1 of 1 (latest)

cloud valleyBOT
last burrow
#

If you referred deferred intent to https://stripe.com/docs/payments/accept-a-payment-deferred?platform=web&type=payment, then:

  1. When stripe.confirmPayment is 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 is succeeded, your order status should be completed.
  2. It will remain as requires_action
  3. 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.
  4. 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 the return_url

Build an integration where you can render the Payment Element prior to creating a PaymentIntent or SetupIntent.

grim wolf
#

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?
last burrow
#

OK cool so it looks like creating the order in our system with a pending status makes sense here then?
Before or after stripe.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 be succeeded at this point and you should mark the order status as paid

grim wolf
#

Before, we'll update the status via the webhooks

last burrow
#

I see! In this case, creating order with pending status sounds good, then your system will update according to the webhook event

grim wolf
#

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?

last burrow
#

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

grim wolf
#

We are using cards, paypal, google/apple pay, klarna

last burrow
#

Is there any concern about these payment methods?

grim wolf
#

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

last burrow
#

It works the same for deferred intent flow

grim wolf
#

Oh ok, you meant we can query the intent status after we call stripe.confirmPayment(), on the redirect page

last burrow
#

correct

grim wolf
#

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?

last burrow
#

This looks right to me

grim wolf
#

great

#

thanks for the help