#thomas-android-paymentsheet
1 messages ยท Page 1 of 1 (latest)
Hello again! We were just talking about this recently, correct?
No, I haven't messaged in several months.
Isn't that same video the one shared over here? #1117910137810726952 message
Is that your teammate in the other thread?
Yes, I'm the team mate
I think the answer to your question is in that other thread; I recommend you read through it and then if you have any additional questions after that let me know!
Ah, my bad! Missed that message.
@gaunt pasture I read through the thread, but you don't seem to explain how this edit payment sheet is powered for the sample project.
Can you please elaborate?
cc @pine cove
For which sample project?
It's in the Android repo, correct. The run configuration is called paymentsheet-example
The source code for that entire example is at the link above.
thomas-android-paymentsheet
I understand where the source code is. After forking the repo, I'm having trouble getting the edit payment sheet to display again and I was wondering if you could help explain how that sheet is powered?
I think the first step here would be to look at the logs and figuring out what error(s) you get exactly
No errors, I'm just unable to get the existing payments up again like in the video. Can you reproduce on your end?
I'm going to need a lot more details from you to help you though
The android app requires a running server/back-end that provides the right information. Do you have that up and running? What exact part of the app is working already?
I sat that up awhile ago, but maybe it's broken now. Can you link the docs for setting that up?
Here's what works:
- Tap "Playground"
- Tap "Reload Paymentsheet"
- Tap Checkout
When I do that, I'm able to add a payment method successfully. Then, unlike in the video, I'm unable to see the payment I just added.
Are you using CustomerSheet?
I'm using a PaymentSheet
paymentSheet.presentWithSetupIntent(
setupIntentClientSecret = clientSecret,
configuration = makeConfiguration()
)
Oh I got it to display using these options
So in the sample project, I've just confirmed that you can view existing payments, edit and delete them using:
paymentSheet.presentWithSetupIntent(
setupIntentClientSecret = clientSecret,
configuration = makeConfiguration()
)
This is the same thing that is used to add a payment for the first time. Does this make sense?
I'm sorry I don't really understand what you're asking at all right now ๐
๐ hopping in here to help
@warm iris Are you still having issues getting this to work with presentWithPaymentIntent? You're just working off the sample app, right?
Sorry for the confusion, I'm just trying to get definitive guidance about opening a payment sheet for setting up deferred payments. We won't a user to be able to add, edit, and delete payment methods.
In another thread with my colleague, it was suggested that you have two use different sheets for creating and editing, but it seems you don't have to do that using the above code.
This was the advice in the other thread with my colleague. This seems wrong based on the sample project.
Is my query clear?
You're just trying to use SetupIntents to save payment methods to be charged later, right? I believe you should be able to do that with the PaymentSheet + SetupIntents as long as you're creating ephemeral keys and have customer set when you create the SetupIntent
That's right! So to be absolutely clear, we shouldn't have two open different sheets depending on whether or not they've already added a payment method, correct?
correct!
But you would need two different calls depend on whether you were using a paymentIntent vs a setupIntent (but they'd both be using the PaymentSheet)
For deferred payment, shouldn't we always use setupIntent?
(To be clear, we only want to save payment methods to be charged later.)
Yeah if you didn't want to collect payment immediately you'd just be using setup intents
Also give me a minute - I wasnt to check something about the ability to edit existing payment methods
Thank you!
When you say "edit" a PaymentMethod - what specific functionality are you hoping for?
Selecting a primary payment method and deleting payment methods. Ideally, they wouldn't be able to delete their last payment method, but that's a nice to have.
So we allow you to delete payment methods, but not "select a primary" from the payment sheet
Okay gotcha, so they can add N number of payment methods, but there's no concept of a primary method. Is that correct?
That concept does exist within stripe (it's invoice_settings.default_payment_method on the Customer), it's just not something you can manage through the PaymentSheet
Okay, thank you! You've been so helpful. One last question: Can I confirm there's no built-in way of preventing them from deleting their last payment method?
checking on that piece now (I'm pretty sure the answer is no, but doesnt hurt to check)
yeah as far as I can tell there's no way to to prevent them from deleting the last one