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

submitRefundSession

Overview

This mutation submits the current refund session if it is valid, then deletes the refund session regardless of submission validity.

Special Considerations

  • Takes no inputs.

Inputs

N/A

Returns

Promise<SubmitRefundResult>

A promise containing the following objects/values:

payerCurrency: Currency
payerSubAmount: Float
payerTotalFeeAmount: Float
payerTotalAmount: Float
paymentSessionType: PaymentSessionType
beneficiaryCurrency: Currency
beneficiarySubAmount: Float
beneficiaryTotalFeeAmount: Float
beneficiaryTotalAmount: Float
payerToBeneficiaryFX: Float
description: String
message: String
reason: RefundReason
valueDate: DateTime
afexTradeNumber: String
id: String

Example

Running this mutation:

mutation {
  submitRefundSession {
    payerCurrency
    payerSubAmount
    payerTotalFeeAmount
    payerTotalAmount
    paymentSessionType
    beneficiaryCurrency
    beneficiarySubAmount
    beneficiaryTotalFeeAmount
    beneficiaryTotalAmount
    payerToBeneficiaryFX
    description
    message
    reason
    valueDate
    afexTradeNumber
    id
  }
}

Gives us:

{
  "data": {
    "submitRefundSession": {
      "payerCurrency": "USD",
      "payerSubAmount": 6.29,
      "payerTotalFeeAmount": 0,
      "payerTotalAmount": 6.29,
      "paymentSessionType": "REFUND",
      "beneficiaryCurrency": "GBP",
      "beneficiarySubAmount": 5,
      "payerToBeneficiaryFX": 0.7944,
      "description": "test",
      "message": "Testing",
      "reason": "DUPLICATE",
      "valueDate": "2020-06-19T00:00:00.000Z",
      "afexTradeNumber": "123456",
      "id": "ckbjj3q77c5ge0a62wyy3ysed"
    }
  }
}

Common Errors

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

  • This is not a valid refund session. (I-4722)

    • The current refund session isn't valid.
  • Error sending beneficiary refund processing email (E-6009)

    • Check recipient email information.
← createRefundSessionNext →
  • Overview
  • Special Considerations
  • Inputs
  • Returns
    • Promise<SubmitRefundResult>
  • Example
  • Common Errors
borderless Docs
Docs
Account SetupAccount ServicesVerificationPaymentsRefundsDeveloper Tools
More
LoginBlogGitLabLinkedInInstagramTwitter
Facebook Open Source
Copyright © 2022 borderless