#Tony Thomas - connect clone workaround

1 messages · Page 1 of 1 (latest)

sharp magnet
#

Good question, checking in to this

thick comet
#

Thank you.

sharp magnet
#

What library are you on 14.5.0 of?

thick comet
#

Hey @sharp magnet, I'm from Tony's team...so yes 14.5.0 is the library which we are using....here is the library dependency which we are using " implementation "com.stripe:stripe-android:14.5.0" "

sharp magnet
#

What call from the "cloning payment methods" doc are you trying to make at the moment?

#

Checking in to this question in general but I don't se android instructions on that page for me

thick comet
#
RequestOptions requestOptions =
  RequestOptions.builder()
    .setStripeAccount("{{CONNECTED_ACCOUNT_ID}}")
    .build();

This is something we are talking about though

sharp magnet
#

Ah this is in the Java code for your backend?

thick comet
#

No, we were thinking that we would need something like that in the ANdroid client. So our setup is like this:

  1. Customer has saved PaymentMethods P1, P2 with our account.
  2. Backend creates a payment intent on a Connected account and sends the intent to the client to confirm.
  3. Client needs to use P1 to confirm this payment intent. This doesnt work now because P1 is owned by our account.
sharp magnet
#

Ah, are you sending the original ID for P1 that is on the connected account? Or are you sending the new ID that is created on the connected account after the cloning?

#

An app that is using the connected account's key should be able to use the ID from after the cloning

thick comet
#

The thing is that, we are not there yet. Like, we are not able to fix the "cloning" part yet. Or in other terms, we are not able to figure out how to use this *other * AccountId in the cloning.

The client has access to the ConnectedStripeAccountID, btw.

sharp magnet
#

Apologies but I am still a bit unclear on the situation. Is your server able to clone the payment method, but you can't figure out how to specify the connected account ID on Android to actually use it in a payment?

thick comet
#

So in our setup, we wanted the client to do the "clone the payment method" instead. Because, we only create a PaymentIntent at the backend and returns the same to the client to confirm.

sharp magnet
#

Hey apologies the server is very busy so I have been jumping between a lot of threads. Can you send me the full function from your client side code that you are looking to use the stripe account header with?

thick comet
#

So this is what we are using on the client side....it would be nice to have access to old documentation on SDK 14.5.0.

private fun getStripe(accountId: String? = null): Stripe {
return Stripe(stripeCredentials.context, stripeCredentials.publishableKey, accountId)
}

for payment intent:

getStripe(stripeAccountId).confirmPayment(this, ConfirmPaymentIntentParams.createWithPaymentMethodId(paymentMethodId!!, clientSecret!!))

sharp magnet
#

Ah, it looks like in your version, there is only a specific stripeAccountId parameter for specific calls

#

And I actually don't think the Android SDK has a function call for card cloning, you will have to do it on the server unfortunately.

#

But you should just be able to pass the stripeAccountId parameter to your confirmPayment call on the client