5

I'm integrating manual card entry using presentPaymentSheet() and have encountered the following issues:

  1. There is no listener or response tracker available to capture payment failures, making it difficult to handle and track failure events.

  2. The payment sheet doesn't close automatically when a payment fails, which is a requirement for our implementation.

Steps to Reproduce:

  1. Enter the card number 4000-0000-0000-9995 into the payment sheet.
  2. Tap the "Pay $amount" button.
  3. Observe the behavior:
  • The payment sheet shows a failure message, which is expected, but it doesn't close automatically. There is no listener available to track the failure transaction or capture detailed failure data.

Expected Behavior:

  • Upon payment failure:
    • The payment sheet should either close automatically or allow for manual closure.
    • A listener or callback should provide detailed information about the failure, such as the payment intent, to facilitate proper tracking and handling.

Environment:

  • Devices: All devices

Additional Information:

  • The inability to close the payment sheet or capture failure details is impacting the user experience and our ability to track failures effectively. This functionality is essential for meeting the requirements of the integration.
3
  • 1
    When the payment failed, the customer will be able to enter the payment method details in the PaymentSheet again. PaymentSheet abstracts away most of the errors and doesn’t return decline error in the result callback. Dismissing the PaymentSheet manually is not supported.
    – yuting
    Commented Dec 4 at 7:13
  • One possible way is to wait for the customer to close the PaymentSheet, then your system will retrieve the PaymentIntent status. Alternatively, you system could also listen to payment_intent.payment_failed event for any failed payments.
    – yuting
    Commented Dec 4 at 7:14
  • @yuting, But what if I want to perform operation on every payment failure! let's assume that the customer has attempt 3 time. 2 failure and 3rd on is success! Now, I want to perform operation on first 2 failures also. How it will be possible?
    – Akshay
    Commented Dec 4 at 7:41

0