#ARRcade-debitcard
1 messages ยท Page 1 of 1 (latest)
hi there! you'll probably want to use this : https://stripe.dev/stripe-ios/docs/Classes/STPAPIClient.html#/s:10StripeCore12STPAPIClientC0A0E11createToken8withCard10completionyAD13STPCardParamsC_yAD8STPTokenCSg_s5Error_pSgtctF to create the debit card token
Wow, thanks for getting back to me so quickly! So...I'm the backend guy here-- how similar is this to the flow for capturing card data for a customer account? Do I need to send any ephemeral keys or anything like that to the frontend guy for him to be able to call this?
regarding how similar this is to capturing card data for a customer account - i guess it depends if you want to use the mobile payment element or card element only to capture payments. You can take a look at the flow to accept payments in more detail here : https://stripe.com/docs/payments/accept-a-payment?platform=ios&ui=payment-sheet
Right, so we've done all that and gotten it working for the customer accounts. My question is now turning to connect accounts. There doesn't seem to be a similar example in the docs of the back-and-forth flow for adding an external account to a connected account like there is in creating that paymentIntent on the customer account side. So I suppose what I'm really asking is this: can the iOS SDK take in the card info and generate the token with the function you linked to, and then send the token to the backend to attach to a connect account using the API?
Is that all there is to it?
Hi @drifting temple why you do you want to create a token from iOS app instead of from backend?
Hi Jack, I'm trying to avoid having the card info touch my backend so that I don't have to worry about PCI compliance.
We were able to follow the documentation to accomplish that when capturing customer cards, but I would like to do the same with custom connect external account debit cards. Does that make sense?
Ah I see, thanks for the background.
Yup you are right, you can use the iOS SDK to generate the token and use this API to create an external account https://stripe.com/docs/api/external_account_cards/create
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
You don't need to use the customer ephemeral key here, because you are not attaching the card to a customer.
Ok awesome. So then the function that @rapid eagle linked would be the one to do that?
Yes you are right, and don't forget to initialise the iOS SDK with the Stripe-Account , so that the card token will be created on the connected account.
Ok, would that be initialized with the platform account, or the connected account?
The connected account, you can set it here https://stripe.dev/stripe-ios/docs/Classes/STPAPIClient.html#/s:10StripeCore12STPAPIClientC13stripeAccountSSSgvp
So you still use the platform's publishable key, and you just need to set stripeAccount to the connecte account ID
Yup you are right ๐
Sure, let me know if you need any help.