question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

use_stripe_sdk. when creating a paymenintent

See original GitHub issue

hello.
having a connect platform with node js backend and iOS in front.

actually I’m asking customer account and cards object in my db. I’m migrating to new payment intents. So the iOS app call the function that create the payment intents as destination charge and putting on the fee and passing the confirm = true as parameter.

return await stripe.paymentIntents.create({
  payment_method_types: ['card'],
  amount: 1000,
  currency: 'eur',
  application_fee_amount: 10,
  customer: customer,
  payment_method: card,
  confirmation_method: 'automatic',
  confirm:true,
  transfer_data: {
    destination: 'acct_11111111111111111111',
  }
})

I then pass back the payment intent to the app who gonna open the page to confirm the payment.

PROBLEM

the payment intent always report next action as "use_stripe_sdk:

 "use_stripe_sdk" =         {
            "stripe_js" = "https://hooks.stripe.com/3d_secure_2_eap/begin_test/src_1Ega3MJBBAFk3hwIOEIala6t/src_client_secret_FAvvQ1UDEOtEDucophApwOG6";
            type = "three_d_secure_redirect";

this way, when creating the redirect context I’ always getting NIL.
it then a way to force with url instead of “use stripe SDK” so I can finish the authentication on the app?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Gior80commented, Jun 24, 2019

Hello Oliver , yes solved that , think we can close 😃

Thanks !

0reactions
aliriaz-stripecommented, Jun 13, 2019

Hi @ir-fuel , @giorgio80

Since you’re planning on confirming the PaymentIntent client-side and passing confirm: true on PaymentIntent creation, you would also need to specify the return_url [0] to the PaymentIntent at creation/confirmation time.

Since you are confirming on the client-side, you should not pass confirm: true on the server-side, and then confirm on the client-side (your iOS app) and pass the returnURL on STPPaymentIntentParams [1] instead.

[0] https://stripe.com/docs/api/payment_intents/confirm#confirm_payment_intent-return_url [1] https://stripe.com/docs/payments/payment-intents/ios#handle-card-payment

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use Payment Intent and Setup Intents with Stripe in iOS
When using manual confirmation, create the PaymentIntent after collecting payment information from the customer using Elements or our iOS ...
Read more >
Create a PaymentIntent – curl - Stripe API reference
Creates a PaymentIntent object. After the PaymentIntent is created, attach a payment method and confirm to continue the payment. You can read more...
Read more >
How to get PaymentIntent next_action.type = redirect_to_url ...
After the subscription is created on Stripe side, I have got the answer like in documentation above: { "id": "sub_XXXXXXXXXXXXXXXXXXX", "object" ...
Read more >
How to use Payment Intent and Setup Intents with Stripe in iOS
When using manual confirmation, create the PaymentIntent after collecting payment information from the customer using Elements or our iOS ...
Read more >
STPSetupIntentConfirmParams Class Reference
Provide a supported STPPaymentMethodParams object, and Stripe will create a PaymentMethod during PaymentIntent confirmation.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found