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

requestPayment

Overview

This mutation takes the required inputs and creates a payment request from a specific email address. This will be payable by any accounts owned by that email.

Special Considerations

  • Payments can be made by any account from the requested email (i.e. business or personal)

Inputs

requestPaymentArgs

Required Data

toEmail: string

amount: float

currency: Currency

valueDate: DateTime

description: string

emailMessage (optional): string

Returns

Promise<PrivatePaymentRequest>

A promise containing the following object / data:

PrivatePaymentRequest: {
  id: ID,
  currency: CURRENCY,
  amount: float,
  description: string,
  emailMessage: string,
  chargeDate: DateTime,
  paymentLink: string,
}

Example

Running this mutation:

mutation {
  requestPayment(data: {
    toEmail: "docexample@getborderless.com"
    amount: 25
    currency: USD
    valueDate: "2020-10-09T00:00:00Z"
    description: "test"
  }) {
    id
    currency
    amount
    description
    chargeDate
    paymentLink
  }
}

Gives us:

{
  "data": {
    "requestPayment": {
      "id": "ckbbqjpeo000f0772zslm0uqg",
      "currency": "USD",
      "amount": 25,
      "description": "test",
      "chargeDate": "2020-10-09T00:00:00.000Z",
      "paymentLink": "http://localhost:8000/payment-request?id=ckbbqjpeo000f0772zslm0uqg"
    }
  }
}

Common Errors

N/A

← generatePayMeRequestresendPaymentRequest →
  • Overview
  • Special Considerations
  • Inputs
    • requestPaymentArgs
  • Returns
    • Promise<PrivatePaymentRequest>
  • Example
  • Common Errors
borderless Docs
Docs
Account SetupAccount ServicesVerificationPaymentsRefundsDeveloper Tools
More
LoginBlogGitLabLinkedInInstagramTwitter
Facebook Open Source
Copyright © 2022 borderless