#hitesh1995_code

1 messages · Page 1 of 1 (latest)

alpine nacelleBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always 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/1294255748972417046

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

frigid kraken
#

All outlined on the guide above

viral harness
#

how can i use saved card with payment sheet to make user payment without entering card details each time?

frigid kraken
#

Did you follow the guide/details I linked above?

viral harness
#

I tried iOS setup as mentioned, but payment sheet always gets presented with fields to enter card details.

frigid kraken
#

And what's the cus_xxx ID of the customer you're using

viral harness
#

cus_R0hqxBRJ5ysxmc

frigid kraken
viral harness
#

Yes, i did that. but one thing i am not getting is that how can i continue to make payment once card is saved in customer sheet

frigid kraken
#

How do you expect a saved card to be surfaced for a customer if they have no saved cards?

#

Sorry unclear what the issue is

viral harness
#

I just saved a new card with same customer, and how can i continue to make payment when i select this card as i am not getting any callback on selection of card

frigid kraken
viral harness
#

Yes, but is is there any way we can present payment sheet with saved cards?

frigid kraken
#

That is the sheet with saved cards

#

In your screenshot. Sorry it's unclear what is not working as you expect

viral harness
#

i need payment method id when saved card is selected from customer sheet

frigid kraken
#

That's not supported AFAIK

viral harness
#

as per our requirements we need to save card with customer and to be used with different connect account to make payment without entring card details each time,

frigid kraken
#

Then you'll need to get the pm_xxx ID via another means, probably a webhook or similar and then clone it to the conncted account(s)

rose smelt
#

Hi ynnoj.. I am a backend developer and working with Hitesh1995

We had previous discussion with other guy who told us to use this way to able to reuse platform card and clone into connect account and then create a payment intent to open payment sheet

frigid kraken
#

Yep, that works. But you can't get the pm_xxx ID via a CustomerSheet callback I don't think

#

So you need to listen for an event when the card is saved and then make the API calls to clone it

rose smelt
#

Problem is not with cloning card.. Because for the first time when we save card using customer sheet we can get the pm_xxx ID and will be able to clone it but when user opens customer sheet second time that card is already presend and however we are not able to fetch that selected card pm_xxx

frigid kraken
#

Because you don't use the Customer Sheet in payment flows, I already explained this. Assuming the PM/card is cloned to the correct connected account and attached to a customer it will automatically surface in the Payment Sheet

#

You're going to need to provide some request IDs and/or object IDs for things that are not working as you expect because right now you've not really provided any details

rose smelt
#

Yeah that's correct but when customer is paying for other connected account then ? that same card will be displayed on payment sheet ? because we cloned card in other connect account

frigid kraken
#

No, you'll need to clone it from the platform to each conncted account

rose smelt
#

That's not possible.. We will have minimum 500-1000 or more than that connect accounts

viral harness
#

@frigid kraken is it possible that we can attach customer with payment sheet to fetch cards attached to that customer within payment sheet as following?

var configuration = PaymentSheet.Configuration()
configuration.customer = .init(id: stripeCustomerCode, ephemeralKeySecret: ephemeralKeySecret)
configuration.merchantDisplayName = appName
configuration.applePay = .init(merchantId: appleMerchantID, merchantCountryCode: countryCode)
configuration.returnURL = “app://stripe-redirect"
configuration.allowsDelayedPaymentMethods = true

rose smelt
#

Is there any stripe api from which we get list of cards by customer on platform which includes pm_xxx ?

frigid kraken
alpine nacelleBOT
frigid kraken
frigid kraken
#

This is the doc you need for cloning: https://docs.stripe.com/connect/direct-charges-multiple-accounts#clone-and-create-direct-charges

As I said, you will need to clone the card/pm_xxx object to each connected account you want to process a direct charge on. You cannot reuse cards across conncted accounts in that Connect scenario

Save payment details on your platform and clone them to connected accounts for making direct charges.

rose smelt
#

What will happen if we clone same card twise in same connect account ? does that create any issue or not ?

hard junco
#

hi! I'm taking over this thread.

#

you mean you have a card saved to a customer on the platform account, and clone it twice on the connected account? if so, that should just work.

rose smelt
#

Okay.. And what about Google Pay Apple Pay option in our scenario ?

hard junco
#

can you clarify your question? what about Google/Apple Pay?

rose smelt
#

What we are thinking is

We want to reuse customer card in different connect account.. We come up with a solution to use custom api for card list -> when user choose any card app will request to clone that card to connect account and then create intent

To add new card there will be custom api or customer sheet and same flow goes here as well for clone card

We also want to provide option for google pay & apple pay

hard junco
#

yep, that should just work. Apple/Google Pay are just treated as a card Payment Method.

viral harness
#

what our concern is if we follow custom setup/UI to reuse saved cards (use payment_methods API to list cards) in that case how can we provide way to initiate Apple/Google Pay?

hard junco
#

I don't understand. first you collect a payment method with the payment sheet, then you list all payment method to the user, and finally clone the payment method on the connected account. the fact that it's Apple/Goole Pay or not doesn't change anything.

viral harness
#

Yes, but with custom setup we will be sending selected payment method to backend to handle next process. in that case how Apple/Google Pay can be managed.

hard junco
#

I'm sorry I don't understand. a Payment Method is a pm_xxx object. what would be the difference if it comes from a card or Google/Apple Pay?

#

like I said above, Apple/Google Pay are a Payment Method with type: card

#

so there's no difference

viral harness
#

Yes, that i understood but in case of not using PaymentSheet how an Apple Pay can be initiated as it gets managed by PaymentSheet internally if i am not wrong.

hard junco
#

in case of not using PaymentSheet
then what are you using to collect a payment method?

viral harness
#

let's say we use CustomerSheet to save card details. and to fetch all cards we use payment_methods API and show card list with custom UI in app.

hard junco
#

yes, so what's your question in this case?

viral harness
#

if we show saved card with custom UI, how we can provide an option to make payment with Apple/Google Pay?

#

specifically is there any way to tell stripe SDK to initiate Apple Pay by any chance?

hard junco
#

oh, you mean showing just the Google/Apple Pay buttons (so without the PaymentSheet/CustomerSheet), in order to collect a new payment method?

viral harness
#

yes

hard junco
#

I thought you meant displaying existing Apple/Google Pay payment methods to the user.

viral harness
#

no, not like that

viral harness
hard junco
viral harness
#

ok, that is useful.

#

I also have another question is that if we do not use PaymentSheet to make payments (and manage things using API and backend support as discussed above) does it considered basic integration as we already have received an email from stripe to upgrade our basic integration setup.

hard junco
#

does it considered basic integration as we already have received an email from stripe to upgrade our basic integration setup.
I'm not sure what that means. what email are you talking about?

viral harness
#

thats an email we've received.

hard junco
#

the email just means that the next version of the Stripe iOS SDK won't support the basic integration

#

so as long as you don't update the version of the Stripe SDK, you can keep using that integration.

#

but I would recommend to consider upgrading to a newer integration at some point

alpine nacelleBOT
viral harness
#

can you tell me what can be the latest version of supporting basic integration for iOS and Android SDK

blazing zenith
#

Hi taking over here

#

Our current latest supports it

#

It will be removed in future versions

viral harness
#

so you means SDKs released after 4th Nov. will not have support for basic integration?

blazing zenith
#

Yes that's what that email says