#michael_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/1253247672887021569
đ Have more to share? Add details, code, screenshots, videos, etc. below.
Hi, taking a look here
Hi @tropic spear I don't think the Mobile SDK have API binding support for twint, but you can use Mobile PaymentSheet to offer twint to your customers https://docs.stripe.com/payments/payment-methods/integration-options#support-bank-redirects
Thanks, but we would like to keep our fully customized payment flow for now. Do you know when the API support for Twint will be added to the Android SDK? It already works for the ios SDK as well.
How did you do it with iOS? I don't see STPPaymentMethodParams has a paramsWith(twint:
I'm not the iOS developer, but as far as I know they do something like this:
let paymentIntentParams = STPPaymentIntentParams(clientSecret: clientSecret)
let paymentMethodParams = STPPaymentMethodParams()
paymentMethodParams.type = STPPaymentMethodType.twint
paymentIntentParams.paymentMethodParams = paymentMethodParams
Hey! Taking over for my colleague. In Android there is no such an option:
https://stripe.dev/stripe-android/payments-core/com.stripe.android.model/-payment-method-create-params/index.html
let paymentIntentParams = STPPaymentIntentParams(clientSecret: clientSecret)
let paymentMethodParams = STPPaymentMethodParams()
paymentMethodParams.type = STPPaymentMethodType.twint
paymentIntentParams.paymentMethodParams = paymentMethodParams
You can do the same with Android, usePaymentMethod.Type.Twint
Between, why you are creating the PaymentIntent from the frontend (Mobile)?
You should have a backend on which you create the PaymentIntents:
https://docs.stripe.com/payments/accept-a-payment
I cannot access the PaymentMethodCreateParams.type from my Java code.
I've tried this: ConfirmPaymentIntentParams paymentIntentParams = ConfirmPaymentIntentParams.create(paymentIntent.getClient_secret(), PaymentMethod.Type.Twint);
But it throws an error when I try to call paymentLauncher.confirm(paymentIntentParams);
"You cannot confirm this PaymentIntent because it's missing a payment method."
We do create the PaymentIntent on the backend. On the fronted I still need to confirm it with ConfirmPaymentIntentParams right?
On the fronted I still need to confirm it with ConfirmPaymentIntentParams right?
How are you collecting the Payment Method? What Stripe product are you using ? PaymentSheet ?
For credit cards we use the CardElement for all other payment methods we collect the necessary infos in our own custom UI. We send the selected payment method type to the server. Server creates paymentIntent and we confirm the payment intent on the client (stripe redirect happens eg. to banking app or website)
For credit cards we use the CardElement for all other payment methods we collect the necessary infos in our own custom UI.
Are you PCI DSS compliant merchant ?
After you collect tthe payment info how are you passing these details to the ConfirmPayment function ?
If you aren't PCI Dss compliant, then you should use PaymentSheet (Stripe mobile Elements)
This is what we do for Klarna for example after we receive the paymentIntent from our backend:
PaymentMethod.BillingDetails billingDetails =
new PaymentMethod.BillingDetails.Builder()
.setEmail(email)
.setAddress(new Address.Builder().setCountry(selectedPaymentType.getCountry().getCode()).build())
.build();
PaymentMethodCreateParams paymentMethodCreateParams = PaymentMethodCreateParams.createKlarna(billingDetails);
ConfirmPaymentIntentParams paymentIntentParams = ConfirmPaymentIntentParams
.createWithPaymentMethodCreateParams(
paymentMethodCreateParams,
paymentIntent.getClient_secret()
);
paymentIntentParams.setReturnUrl("xxx");
paymentLauncher.confirm(paymentIntentParams);
As I said it works for all other payment methods, so I was wondering if it's possible for Twint as well.
We would like to use the new PaymentSheet soon, but resources are limited right now, so we were trying to implement twint faster.
But I will take a look at the PaymentSheet, thanks for all your help!
I see, thanks for sharing these details
You can't achieve the same thing with Twint, here are all the available PaymentMethods that supports that integration:
https://stripe.dev/stripe-android/payments-core/com.stripe.android.model/-payment-method-create-params/-companion/index.html
Yes I strongly encourage you to use PaymentSheet, so that you have a unifed experience for all Payment Method types.