borderless Docs

borderless Docs

  • Account Setup
  • Account Services
  • Verification
  • Payments
  • Refunds
  • Developer Tools

›Mutations

Account Setup

    Queries

    • accountIdentificationTypes
    • accountSetupSession
    • allCountries
    • businessTypes
    • isValidBusinessTaxId
    • isValidPersonalTaxId
    • isValidSlug
    • jobTitles
    • naics
    • supportedCountries
    • zoneCodes

    Mutations

    • addAccountToPerson
    • addCompanyOfficerToAccount
    • createAccountSetupSession
    • createLoginPersonAndAccount
    • deactivateAccount
    • resendEmailVerification
    • submitAccountSetupSession
    • submitCompanyOfficers
    • updateAccountSetupSession

Account Services

    Queries

    • account
    • accounts
    • bankAccounts
    • companyOfficers
    • person
    • publicAccountBySlug

    Mutations

    • addBankAccount
    • changePassword
    • changePreferredBankAccount
    • login
    • logout
    • requestPasswordReset
    • sendInvitationEmail
    • sendInvitedRegisterEmail
    • switchAccounts
    • updateAccount
    • updatePerson

Verification

    Mutations

    • addOnfidoDocumentToPerson
    • embedOnfido

Payments

    Queries

    • contacts
    • paymentActivity
    • paymentActivityById
    • paymentRequestById
    • paymentSession
    • requestedPayments
    • tradeConfirmationForPayment

    Mutations

    • clearPaymentSession
    • createPaymentForRequestSession
    • createPaymentSession
    • declinePaymentRequest
    • generatePayMeRequest
    • requestPayment
    • resendPaymentRequest
    • submitPaymentSession
    • updatePaymentSession
    • updateQuote

Refunds

    Queries

    • refundSession

    Mutations

    • clearRefundSession
    • createRefundSession
    • submitRefundSession
    • updateRefundSession

Developer Tools

    Queries

    • accountWebhooks
    • embedVerificationService

    Mutations

    • createWebhook
    • healthCheck
    • testWebhook

addAccountToPerson

Overview

This mutation takes the required inputs and creates another account for the Person in the current login session.

Special Considerations

  • The input AccountType can either be PERSONAL or BUSINESS
  • Each login is only able to have one PERSONAL and one BUSINESS account

Inputs

addAccountToPersonArgs

Required Data

accountType: AccountType

Returns

Promise<AuthPayload>

A promise containing the following object / data:

user: {
  loginId: ID,
  person: privatePerson
  account: privateAccount,
  numAccounts: int
}

Example

Running this mutation:

mutation {
  addAccountToPerson(accountType:PERSONAL) {
    user {
      loginId
      person {
        id
        firstName
        lastName
        email
      }
      account {
        id
        slug
        status
        name
        displayName
      }
      numAccounts
    }
  }
}

Gives us:

{
  "data": {
    "addAccountToPerson": {
      "user": {
        "loginId": "5ed7bf8b89399t0c555de8a3",
        "person": {
          "id": "ckb8bx8iw00r30772r4sq1ns5"
          "firstName": "Jane",
          "lastName": "Smith",
          "email": "docexample@getborderless.com"
        },
        "account": {
          "id": "ckb9j25bp00680a72yy2kjz8h"
          "slug": null,
          "status": "NOT_SETUP"
          "name": null,
          "displayName": null
        }
      }
    }
  }
}

Common Errors

When running this mutation some of the common errors encountered include:

  • You have reached your limit for accounts with this email. (I-4402)

    • The Person in the current login session has already created both a business and personal account
  • You have already created an account of this account type. (I-4403)

    • You already have a business or personal account.
← zoneCodesaddCompanyOfficerToAccount →
  • Overview
  • Special Considerations
  • Inputs
    • addAccountToPersonArgs
  • Returns
    • Promise<AuthPayload>
  • Example
  • Common Errors
borderless Docs
Docs
Account SetupAccount ServicesVerificationPaymentsRefundsDeveloper Tools
More
LoginBlogGitLabLinkedInInstagramTwitter
Facebook Open Source
Copyright © 2022 borderless