Stripe PHP 3D secure payment without Stripe.JS?

Viewed 536

I'm not using Stripe.JS because I need custom UI. I have collected card information from my customer. I'm using the PHP SDK. My workflow is

  create customer
  add/attach payment method to customer
  create payment intent

  

Every works fine. Now the issue that is if the end user uses a 3D secure card, I get a next_action in the response

"next_action": {
    "type": "use_stripe_sdk",
    "use_stripe_sdk": {
      "type": "three_d_secure_redirect",
      "stripe_js": "https://hooks.stripe.com/redirect/authenticate/xxxxxx?client_secret=src_client_secret_xxxxxxx",
      "source": "src_xxxxxx"
    }
  },
  "next_source_action": {
    "type": "use_stripe_sdk",
    "use_stripe_sdk": {
      "type": "three_d_secure_redirect",
      "stripe_js": "https://hooks.stripe.com/redirect/authenticate/src_xxxxxx?client_secret=src_client_secret_xxxxxx",
      "source": "src_xxxxxx"
    }
  },

The documentation then relies on Stripe.JS for this step to open a verification popup. I'm not using Stripe.JS for the first part of the implementation due to custom UI. Can I use Stripe.JS for this part only? Or how do I do this part WITHOUT using Stripe.JS ? How do I know if this next step is successful so I can confirm the payment? I also see in my dev dashboard that the payment so successful (confusing). But the documentation says I still need to confirm that payment intent?

1 Answers
Related