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

updateQuote

Overview

This mutation updates the current payment session with new quote, which is necessary for payment sessions to be valid. The payment session must be updated with a new quote every 30-45 seconds or AFEX will fail with an expired quote.

Special Considerations

N/A

Inputs

N/A

Returns

Promise<UpdatePaymentSessionResult>

A promise containing either a success message:

message: string

or a call for more data:

dataNeeded: dataNeededForPayment
balanceRefreshRequired: balanceRefresh

Example

Running this mutation:

mutation {
  updateQuote {
    ... on SuccessResult {
      message
    }
    ... on ActionRequiredForPayment {
      dataNeeded {
        idUpload
        personalTaxId
      }
      balanceRefreshRequired {
        providerAccountId
        bankAccountId
        type
      }
    }
  }
}

Gives us:

{
  "data": {
    "updatePaymentSession": {
      "message": "Quote updated!"
    }
  }
}

Common Errors

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

  • Invalid session id (I-4714)

    • You may not have created a payment session before trying to update the quote
  • You can only update the quote if the payment has been defined. (I-4715)

    • Payment must be updated before trying to update the quote
← updatePaymentSessionNext →
  • Overview
  • Special Considerations
  • Inputs
  • Returns
    • Promise<UpdatePaymentSessionResult>
  • Example
  • Common Errors
borderless Docs
Docs
Account SetupAccount ServicesVerificationPaymentsRefundsDeveloper Tools
More
LoginBlogGitLabLinkedInInstagramTwitter
Facebook Open Source
Copyright © 2022 borderless