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

createLoginPersonAndAccount

Overview

This mutation takes the required inputs and creates a login with borderless. In that process the users Account is created, the users Person is created or updated, and their login session is set.

Special Considerations

  • Business accounts must supply a startUpSecret
  • Email used must be unique to borderless
  • Password must be at least 8 characters in length. With at least one uppercase letter (A-Z), lowercase letter (a-z) and number (0-9).

Inputs

CreateLoginPersonAndAccountArgs

Required Data

(these should eventually link to the types, AccountType, Country, etc)

accountType (required): AccountType

country (required): Country

currency: Currency

acceptedTermsTimestamp: DateTime

email (required): string

password (required): string

signUpSecret (required for business accounts only): string

Returns

Promise<AuthPayload>

A promise containing the following object / data:

user: {
  person: createdOrUpdatePerson,
  loginId: loginId,
  account: createdAccount,
}

Example

Running this mutation:

mutation {
  createLoginPersonAndAccount(data: {
    accountType: BUSINESS
    country: US
    currency: USD
    email: "docexample@getborderless.com"
    password: "stRONgPassW0Rdh3r3"
    signUpSecret: "SECRET-GOES-HERE"
  }) {
    user {
      person {
        email
      }
      loginId
      account {
        accountType
        country
        currency
        status
      }
    }
  }
}

Gives us:

{
  "data": {
    "createLoginPersonAndAccount": {
      "user": {
        "person": {
          "email": "docexample@getborderless.com"
        },
        "loginId": "5ed7bf8b89399t0c555de8a3",
        "account": {
          "accountType": "BUSINESS",
          "country": "US",
          "currency": "USD",
          "status": "NOT_SETUP"
        }
      }
    }
  }
}

Common Errors

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

  • Invalid sign-up code provided. (I-4201)

    • Please provide a valid sign up code in all capital letters
  • This email already has an account. Sign in to add another. (I-4202)

    • This email has already been registered with borderless
← createAccountSetupSessiondeactivateAccount →
  • Overview
  • Special Considerations
  • Inputs
    • CreateLoginPersonAndAccountArgs
  • Returns
    • Promise<AuthPayload>
  • Example
  • Common Errors
borderless Docs
Docs
Account SetupAccount ServicesVerificationPaymentsRefundsDeveloper Tools
More
LoginBlogGitLabLinkedInInstagramTwitter
Facebook Open Source
Copyright © 2022 borderless