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

createPaymentForRequestSession

Overview

This mutation takes the required inputs and creates a payment session based on the requested payment.

Special Considerations

N/A

Inputs

createPaymentForRequestSessionArgs

Required Data

paymentRequestId: string

paymentSessionType: PaymentSessionType

Returns

Promise<CreatePaymentForRequestResult>

A promise containing either a success message:

message: string

or a call for more data:

dataNeeded: dataNeededForPayment
balanceRefreshRequired: balanceRefresh

Example

Running this mutation:

mutation {
  createPaymentForRequest (data: {
    paymentRequestId: "ckb8bx8js00re0772mykjh0ve"
    paymentSessionType: MAKE_PAYMENT
  }) {
    ... on SuccessResult {
      message
    }
    ... on ActionRequiredForPayment {
      dataNeeded {
        idUpload
        personalTaxId
      }
      balanceRefreshRequired {
        providerAccountId
        bankAccountId
        type
      }
    }
  }
}

Gives us:

{
  "data": {
    "createPaymentForRequestSession": {
      "message": "Payment for request session created!" 
    }
  }
}

Common Errors

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

  • You cannot pay yourself. (I-4902)

    • You've attempted to create a payment session request from yourself
  • There was an issue accessing your bank account information. (I-4903)

    • Bank information may not be available from the requested payment
← clearPaymentSessioncreatePaymentSession →
  • Overview
  • Special Considerations
  • Inputs
    • createPaymentForRequestSessionArgs
  • Returns
    • Promise<CreatePaymentForRequestResult>
  • Example
  • Common Errors
borderless Docs
Docs
Account SetupAccount ServicesVerificationPaymentsRefundsDeveloper Tools
More
LoginBlogGitLabLinkedInInstagramTwitter
Facebook Open Source
Copyright © 2022 borderless