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

createRefundSession

Overview

This mutation takes a payment ID and creates a refund session for the associated payment.

Special Considerations

  • Takes a payment ID as input.

Inputs

MutationCreateRefundSessionArgs

Required Data

paymentID: string

Returns

Promise<SuccessResult>

A promise containing the success message.

Example

Running this mutation:

mutation {
  createRefundSession(paymentId: "ckbi3uvnvbiv50a62zpri3bs7") {
    message
  }
}

Gives us:

{
  "data": {
    "createRefundSession": {
      "message": "Refund session created!"
    }
  }
}

Common Errors

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

  • You've reached the limit for refunds on this payment. (I-4729)

    • No further refunds are allowed for this payment.
  • You can only refund payments once they are complete. (I-4724)

    • The payment has not processed fully yet, wait to start a refund session.
  • The refund period of 90 days has expired. (I-4725)

    • The payment has been complete for too long to be refunded.
  • This payment has already been refunded. (I-4723)

    • A previous full refund has already been issued for this payment.
  • You have reached your maximum refund attempts for this payment. (I-4720)

    • There have been too many refund sessions for this payment.
  • You can only refund payments made to your account. (I-4726)

    • The payment ID specified a payment not made to this account. Check the ID and account.
  • You cannot send a refund to this account. The recipient's account has been disabled. Please contact support. (I-4727)

    • The recipient account is no longer able to process transactions. Contact support.
← clearRefundSessionsubmitRefundSession →
  • Overview
  • Special Considerations
  • Inputs
    • MutationCreateRefundSessionArgs
  • Returns
    • Promise<SuccessResult>
  • Example
  • Common Errors
borderless Docs
Docs
Account SetupAccount ServicesVerificationPaymentsRefundsDeveloper Tools
More
LoginBlogGitLabLinkedInInstagramTwitter
Facebook Open Source
Copyright © 2022 borderless