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

updatePaymentSession

Overview

This mutation takes the inputs and updates payment session amount, description, or email message. All fields must be updated before submitting (i.e. submitPaymentSession mutation).

Special Considerations

  • Payment session must be created before using updatePaymentSession mutation
  • Payment session must be updated before using submitPaymentSession mutation

Inputs

updatePaymentSessionArgs

Required Data

amount: float

description: string

emailMessage (optional): string

popCode (optional): string

payerAcceptedFees (optional): boolean

value: dateTime

quoteBasis (optional): string

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 {
  updatePaymentSession (data: {
    amount: 25
    description: "test"
    popCode: "COMM"
    valueDate: "2020-06-06"
  }) {
    ... on SuccessResult {
      message
    }
    ... on ActionRequiredForPayment {
      dataNeeded {
        idUpload
        personalTaxId
      }
      balanceRefreshRequired {
        providerAccountId
        bankAccountId
        type
      }
    }
  }
}

Gives us:

{
  "data": {
    "updatePaymentSession": {
      "message": "Payment session successfully updated"
    }
  }
}

Common Errors

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

  • Invalid session id (I-4713)

    • You've may not have created a payment session before trying to update the payment session
  • POP Code is required for payments to personal accounts. I-4735

    • The payment class is either business to person or person to person and the pop code is not defined
  • The selected date cannot be before today.

    • A payment is scheduled to take place in the past
  • You cannot schedule a payment more than a year in advance from the current day.

    • A payment is scheduled to take place in over a year from today's date
  • Contact our support team to enable international scheduled payments for your account. (I-4731)

    • The payer's currency is not equal to the beneficiary's currency
← submitPaymentSessionupdateQuote →
  • Overview
  • Special Considerations
  • Inputs
    • updatePaymentSessionArgs
  • Returns
    • Promise<UpdatePaymentSessionResult>
  • Example
  • Common Errors
borderless Docs
Docs
Account SetupAccount ServicesVerificationPaymentsRefundsDeveloper Tools
More
LoginBlogGitLabLinkedInInstagramTwitter
Facebook Open Source
Copyright © 2022 borderless