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

login

Overview

This mutation takes the required inputs and logs in to borderless. It automatically logs you into your first account, but you can use switchAccounts mutation to switch.

Special Considerations

  • Mutation automatically logins to the first account you made with the given login

Inputs

loginArgs

Required Data

email: string

password: string

extendExpirationSecret (optional): string

Returns

Promise<AuthPayload>

A promise containing the following object / data:

user: {
  loginId: ID,
  person: PrivatePerson,
  account: PrivateAccount,
  numAccounts: int,
}

Example

Running this mutation:

mutation {
  login(data: {
    email: "docexample@getborderless.com"
    password: "stRONgPassW0Rdh3r3"
  }) {
    user {
      loginId
      person {
        email
      }
      account {
        accountType
      }
    }
  }
}

Gives us:

{
  "data": {
    "login": {
      "user": {
        "loginId": "5edff09a6661440013be972e",
        "person": {
          "email": "docexample@getborderless.com"
        },
        "account": {
          "accountType": "BUSINESS",
        }
      }
    }
  }
}

Common Errors

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

  • Invalid email or password. Please try again. (E-7006)
    • Please input a different password or email
← changePreferredBankAccountlogout →
  • Overview
  • Special Considerations
  • Inputs
    • loginArgs
  • Returns
    • Promise<AuthPayload>
  • Example
  • Common Errors
borderless Docs
Docs
Account SetupAccount ServicesVerificationPaymentsRefundsDeveloper Tools
More
LoginBlogGitLabLinkedInInstagramTwitter
Facebook Open Source
Copyright © 2022 borderless