#papiwablo

1 messages ยท Page 1 of 1 (latest)

kindred loomBOT
pastel sable
#

hello! how can I help?

keen bay
#

i need help adding a debt card in iOS for a user's connect account

#

my back end guy is passing me some sort of connectID

#

what is the process on the front end, for iOS once I have the connectID to save a debit card

#

can it accept input from the

 let paymentMethodParams = self.cardTextField.paymentMethodParams
#

and is there a doc or reference for the handler?

clear mason
#

๐Ÿ‘‹ @keen bay could you elaborate on what exactly the Doc you are following? And an example of the connectID? Is it a Connected Account Id?

keen bay
#

honestly im looking for anything promising

#

i want sellers on the platform to save a debit card

#

this debit card will be used to push their funds into their bank accounts

clear mason
#

I get that, but the link about is mostly about the part "collect payments" rather than payout

#

While you seem to want the logic to register the debit card for your connected account for their payout

keen bay
#

then why is the labelled with "then pay out"

#

makes it a tad confusing

#

there ya go

#

yes

#

i have a connected account id

#

i can get that passed from the back end

clear mason
#

Okie, how do you collect the debit card?

keen bay
#

well right now i can collection info with the

lazy var cardTextField: STPPaymentCardTextField = {
        let cardTextField = STPPaymentCardTextField()
        return cardTextField
      }()
#

using

StripePaymentsUI
clear mason
#

Okie so before getting into detail, I would like to quick check the type of the account. Is it Custom or Express? Or you can provide an example account id here

keen bay
#

Custom Account

clear mason
keen bay
#

ok

#

so how do i add the external account information ive collected on the iOS client side

#

bank / account should be sent directly to you guys and never exist on our back end

clear mason
#

Let's ignore "Pre-build web form" and go to "Direct API"

keen bay
#

i have

#

i dont see any ios code for how to handle input

clear mason
#

It has the "Financial Connection" option and the Manual option. Financial Connection has iOS integration code, but I am confirming if it support collecting debit cards or only Bank account

keen bay
#

i dont want to link a bank account

#

i want add a debit card instead of a bank account

clear mason
#

I see, will that be an US debit card?

keen bay
#

yes

clear mason
#

Hey, okie I confirmed that Financial Connection is only for bank accounts. So you were correct that you will need to collect the debit card yourself. And I am seeing you are using STPPaymentCardTextField, correct?

keen bay
#

that is correct

clear mason
keen bay
#

so look stripe gives us a handler

#

and we pass params into it

clear mason
keen bay
#

this way nothing on the front end stores any sensitive information on the backend

#

yes that is correct

#

do i just use STPAccountParams for this?

#

and then pass that into the paymentHandler.confirmSetupIntent

clear mason
keen bay
#

yes

#

thats my suspicion

#

is that setupintent works for regular paying customs and is also what is used for the sellers who want to add a debt card to transfer funds out

clear mason
#

wait a minute

#

Umm the problem with SetupIntent is, after it's confirmed, it's PaymentMethod's card doesn't have the token we want

#

give me a min

keen bay
#

correct the back end passes me tokens for setup intent

#

so i usually couple that token with the payment params

#

and it saves a card

clear mason
#

If you put a breakpoint and examine the paymentMethodParams, do you see the token I mentioned above?

clear mason
#

This way you only collect the token

#

In step 4, instead of using Token to create a Charge, you simply pass it back to your backend and they can continue to add the token as the Payout destination

keen bay
#

you're kind of on the right track

#

i can successfully, save cards, charges cards

#

what i need to be able to understand is how to associate a saved card to a connect account

#

when saving cards

#

you gottta understand stripe saves the card to the account

#

i can pass the cardparams + setupIntent client secret

#

stripe then tokenizes that card, and then the back end can just look it up

#

again, how do i do this process as it pertains to a connectID

#
        let paymentHandler = STPPaymentHandler.shared()
        paymentHandler.confirmSetupIntent(setupIntentParams, with: self) { status, setupIntent, error in
            switch (status) {
            case .failed:
                print("STRIPE: SAVE METHOD FAILED")
                //put an alert and dismiss on the alert
                completion()
                break
            case .canceled:
                print("STRIPE: SAVE METHOD CANCELLED")
                completion()
                break
            case .succeeded:
                print("STRIPE: SAVE METHOD SUCCESS")
                //put a happy check mark animation here!
                completion()
                break
            @unknown default:
                fatalError()
                break
            }
        }
    }
#

this is how you normally save a card

clear mason
#

Yes I get that, but I believe the step in backend will connect/link the token to the connected account, ie

stripe.Account.create_external_account(
  "acct_xxx", # your custom connected account id
  external_account="tok_yyy", # your collected token in frontend
)
keen bay
#

the issue would be that a setup intent needs a stripe customer

#

again trying to associate teh same method with a connectID

#

i shouldnt have to pass back info to the back end

clear mason
#

If you use the flow about, you don't need a customer

#

You simply create a token, that's it. Then you pass it back to backend to use the token

#

Your backend takes care of linking the token to the Custom Connect Account

keen bay
#

oof

#

thats rough

#

reall really rough

#

if im being real

#

this feels hella beta for debit card

#

this flow is awkward

clear mason
#

Sorry for not having a better answer :/

#

I think once you have the token it's mostly done, tho

keen bay
#

you're not alone

#

we're all scratching our heads

#

the BIG thing that needs to understood in the documentation is flow

#

the documentation is very very bad the deeper you get

#

anyway ill tokenize on the device -- but this is very very unusual for your flows

clear mason
#

I will forward your feedback along to internal eng teams!

#

Thanks for reaching out