#andrei4002-ios-connect
1 messages · Page 1 of 1 (latest)
yeah this is a problem unfortuantely
our UIs like STPCardFormView are intended/designed to create PaymentMethods, which are for pay-ins, and can't be used for creating ExternalAccount card objects for payouts, hence the confusion
build the STPCardParams from the STPPaymentMethodParams for each field?
in theory that works(I'm not entirely clear if you can read the number/exp/CVC fromSTPPaymentMethodParamsbut if you can, then copying them into the STPCardParams constructor so you can then call createToken with that, is the way to go yes)
if the stripe account is based on a country, the card should be only allowed from that country? and if so, is there any way to enforce this in the STPCardFormView?
not really, since you can only know the country after creating the token object (it's a field returned on the Token, based on a lookup done inside the API on the card number). You could check it at that point though before trying to attach it to a connected account and reject/show an error to the user.
and for currency yeah, it's something you have to manually pass into STPCardParams. I could be wrong but I think we only support debit cards for US accounts for payouts, so it would just be usd all the time.
so let me see if i got this correctly
i can use the stripe form to collect card info, build the params, inject the currency, create the token, and reject it if it doesn't match the stripe account's country?
sounds right!
okay. and for currencies, if i need to support multiple countries, is there a list somewhere with what currency the user is allowed to select (per country) ?
as I said i think we only support this in the US so it's all just checking the country is the US and passing usd as the currency https://stripe.com/docs/connect/payouts-bank-accounts#bank-accounts
When using debit cards as a payout destination, the following restrictions apply:
Must be a non-prepaid U.S. Visa, Mastercard, or Discover
could be wrong though, our docs are really not clear on this at all unfortunately