#st4b_code
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1258068260419670028
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
The sheet will show whatever payment method types are specified by the payment intent. So if they are enabled on your dashboard and elligible for the specific payment, they will show up in your sheet. There isn't a way to manually filter beyond that that I am aware of
I am not sure if i understood. The intent is used to open the sheet?
Good point, that depends on your flow. Can you show me your code for how you currently display the sheet?
i do something like that
val paymentSheet = rememberPaymentSheet({})
paymentSheet.presentWithPaymentIntent()
but i am open to other options if there is a way to open the sheet with some methods filtered out
I more meant code like this
https://docs.stripe.com/payments/accept-a-payment-deferred?platform=android&type=payment#present-paymentsheet
How do you actually set your payment sheet up before calling that method?
Ok! I got it! I need to have something like that
val paymentSheet = rememberPaymentSheet(paymentResultCallback = {})
val intentConfig = PaymentSheet.IntentConfiguration(
mode = PaymentSheet.IntentConfiguration.Mode.Payment(
amount = 1099,
currency = "usd",
),
paymentMethodTypes = listOf(),
// Other configuration options...
)
paymentSheet.presentWithIntentConfiguration(intentConfig)
Where i can find the values that i can pass in paymentMethodTypes? I see that it is a list of strings
Here is a list of valid strings for that parameter https://docs.stripe.com/api/payment_methods/object#payment_method_object-type
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Of course, happy to help