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.

Payment Sheets & Manually Confirmed Intents

See original GitHub issue

Hello! Thanks for the library! Apologies for opening an issue for a question - I would be happy to open a discussion instead but they are not enabled for the repo.

I am finally performing a migration to this lib from tipsi and I am taking advantage of the beautiful payment sheet integration.

I am however hitting a couple roadblocks with what I used to have and what I now have to have.

My previous flow was:

  1. User views checkout page
  2. User selects payment method (card/native)
  3. A payment method or payment method token is created
  4. User’s order is sent to server where a manual intent is created with appropriate fees etc
  5. Server attempts to confirm/charge the intent, and tells the app if further (SCA) auth is required
  6. If approved/not required then another request to the server is made to confirm the intent again
  7. The user’s order is considered “paid” at this point and out-of-scope things happen

Now with the payment sheets setup I am unable to replicate this behaviour and appear to have to rely on webhooks - but I’d like to keep the old behaviour if at all possible (if it ain’t broke, don’t fix it) as this means I can guarantee payment will be taken at the time of purchase and not have to handle sending events from the server back to the app to sync states.

After many hours of combing through code/documentation (some props do not match e.g. presentPaymentSheet does not say that it needs clientSecret second code block L5) I found this PR https://github.com/stripe/stripe-react-native/pull/514 (which, to confuse matters more, removes clientSecret from presentPaymentSheet in the examples).

514 suggests that customFlow must be used if one needs to manually confirm intents - however I cannot figure for the life of me how this can be done whilst retaining the UI journey from a customFlow: false option. The confirmPayment option would appear to do what I need!

I hope this makes sense and please ask if you need some code examples.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
charliecruzan-stripecommented, Jun 27, 2022

Got it, I think if you (or someone else) is trying to do this in the future, they should follow this comment here, but lmk if you have issues or questions!

1reaction
jack828commented, Jun 8, 2022

Hey @charliecruzan-stripe unfortunately the project ended up dying, and it was so long ago I find it hard to remember exactly what I did. I’m pretty sure it never went anywhere since my previous comment.

The ability to do this would be greatly beneficial still though. I appreciate you checking in on this!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Confirm a PaymentIntent – curl - Stripe API reference
Confirm that your customer intends to pay with current or provided payment method. Upon confirmation, the PaymentIntent will attempt to initiate a payment....
Read more >
Confirm a Payment Intent with Stripe API on New ... - Pipedream
Confirm a Payment Intent with Stripe API on New Item from monday.com API. Setup the monday.com API trigger to run a workflow which...
Read more >
Training phrases | Dialogflow ES - Google Cloud
Select Intents in the left sidebar menu. Select an intent. Scroll down to the Training phrases section. If you are building an agent...
Read more >
Integration checklist | Google Pay API
Test your integration ; Confirm that the displayed Google Pay payment button dimensions match similar buttons and elements on the page. Choose an ......
Read more >
Stripe Payment Intents Gateway Guide
Only set confirm to false if you are prepared to manually confirm the intent yourself; when false , Spreedly will create a new...
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