Add a payment account for a owner
Puts a bank account or card on file for a owner, either from bank details you supply or from a completed Stripe checkout session. The account is stored with the provider; MagicDoor keeps only the last four digits.
Authorization
AuthorizationstringrequiredPath parameters
ownerIdstringrequiredThe owner whose payment accounts these are. A Snowflake id sent as a decimal string.
Body
application/json
Add the account one of two ways, never both: give bankName, routingNumber, accountNumber and accountType together, or give stripeSessionId on its own. Bank numbers are left out of the example below on purpose.
bankNamestringThe name of the bank. Required when adding an account by bank details. 3 to 100 characters.
routingNumberstringThe bank's nine-digit ABA routing number. Required when adding an account by bank details. Stored but never returned in full — reads give the last four digits.
accountNumberstringThe account number at the bank, 4 to 17 digits. Required when adding an account by bank details. Stored but never returned in full.
accountTypeenum<string>What kind of account it is at the bank. Required when adding an account by bank details.
stripeSessionIdstringThe id of a completed Stripe checkout session, which carries the card or bank details the payer entered at Stripe. Give this instead of the four bank fields, never alongside them. An opaque Stripe token — do not parse it.
Response
200 · The payment account that was added.
idstringThe payment account. A Snowflake id sent as a decimal string. This is what pay and payout calls name.
namestringThe account's display name.
accountMaskstringThe last few digits of the account number, for display. Absent when the provider reported none.
accountProviderenum<string>Who holds the account. ACH payouts can only be sent to a plaid account.
mappedbooleanWhether the account is fully mapped at the provider. An unmapped account cannot send or receive money.
bankInformationobjectThe bank details on file, for an account added by routing and account number. Absent for an account added through a provider's own flow.
plaidobjectThe account as Plaid sees it. Absent unless accountProvider is plaid.
stripeobjectThe card or wallet as Stripe sees it. Absent unless the account was added through Stripe.