#hitesh1995_code
1 messages · Page 1 of 1 (latest)
👋 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.
Correct, Customer Sheet is for managing existing payments methods. Payment Sheet should surfaces saved cards by default assuming you're setting it up correctly. You'll need to generate an Ephemeral Key and pass that to the Payment Sheet config: https://docs.stripe.com/payments/accept-a-payment?platform=ios#ios-collect-payment-details
All outlined on the guide above
how can i use saved card with payment sheet to make user payment without entering card details each time?
Did you follow the guide/details I linked above?
I tried iOS setup as mentioned, but payment sheet always gets presented with fields to enter card details.
And what's the cus_xxx ID of the customer you're using
cus_R0hqxBRJ5ysxmc
That customer has no saved payment methods. Looks like you detached one recently: https://dashboard.stripe.com/test/logs/req_v3eQl3sczYWI19
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
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
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
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
Hmm, my understanding is that the regular callbacks should be invoked by the Payment Sheet? https://stripe.dev/stripe-ios/stripepaymentsheet/documentation/stripepaymentsheet/paymentsheetresult
Yes, but is is there any way we can present payment sheet with saved cards?
That is the sheet with saved cards
In your screenshot. Sorry it's unclear what is not working as you expect
i need payment method id when saved card is selected from customer sheet
That's not supported AFAIK
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,
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)
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
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
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
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
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
No, you'll need to clone it from the platform to each conncted account
That's not possible.. We will have minimum 500-1000 or more than that connect accounts
@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
Is there any stripe api from which we get list of cards by customer on platform which includes pm_xxx ?
I'm afraid that is what is required in Connect scenarios doing direct charges
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
That's exactly how it works, yes. But it's scoped to the Customer object on the connected account you're processing the direct charge for
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
What will happen if we clone same card twise in same connect account ? does that create any issue or not ?
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.
Okay.. And what about Google Pay Apple Pay option in our scenario ?
can you clarify your question? what about Google/Apple Pay?
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
yep, that should just work. Apple/Google Pay are just treated as a card Payment Method.
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?
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.
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.
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
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.
in case of not using PaymentSheet
then what are you using to collect a payment method?
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.
yes, so what's your question in this case?
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?
oh, you mean showing just the Google/Apple Pay buttons (so without the PaymentSheet/CustomerSheet), in order to collect a new payment method?
yes
I thought you meant displaying existing Apple/Google Pay payment methods to the user.
no, not like that
This is we have to consider
Here's how to display the Apple Pay button by itself on mobile: https://docs.stripe.com/apple-pay?platform=ios
and for Google Pay: https://docs.stripe.com/google-pay
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.
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?
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
can you tell me what can be the latest version of supporting basic integration for iOS and Android SDK
Hi taking over here
Our current latest supports it
It will be removed in future versions
so you means SDKs released after 4th Nov. will not have support for basic integration?
Yes that's what that email says