Owner payment accounts

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.

POST
https://api.portal.magicdoor.com/company-app/owners/{ownerId}/payment-accounts

Authorization

Authorizationstringrequired
Bearer token — Send your API token in the Authorization header as Bearer <token>. Requests without a valid token are rejected with 401 Unauthorized.

Path parameters

ownerIdstringrequired

The owner whose payment accounts these are. A Snowflake id sent as a decimal string.

example: 1812910038475120640

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.

bankNamestring

The name of the bank. Required when adding an account by bank details. 3 to 100 characters.

routingNumberstring

The 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.

accountNumberstring

The 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.

checkingsavings
stripeSessionIdstring

The 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.

idstring

The payment account. A Snowflake id sent as a decimal string. This is what pay and payout calls name.

namestring

The account's display name.

accountMaskstring

The 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.

plaidstripezellenone
mappedboolean

Whether the account is fully mapped at the provider. An unmapped account cannot send or receive money.

bankInformationobject

The bank details on file, for an account added by routing and account number. Absent for an account added through a provider's own flow.

plaidobject

The account as Plaid sees it. Absent unless accountProvider is plaid.

stripeobject

The card or wallet as Stripe sees it. Absent unless the account was added through Stripe.

400 · Neither bank details nor `stripeSessionId` was given, both were given together, the routing or account number is not a valid bank number, or the provider refused to link the account (`Plaid linking failed` / `Stripe linking failed`).

401 · The access token is missing, expired, or does not belong to a property manager.

404 · No owner with that id exists for the caller's company.

422 · The owner is deactivated.