paymentApplyToInvoice

Graphql fields and variables for the paymentApplyToInvoice mutation

Apply a payment to an invoice

Scope required: billing:write

mutation paymentApplyToInvoice ($paymentId: ID!, $invoiceId: ID!) {
  paymentApplyToInvoice (paymentId: $paymentId, invoiceId: $invoiceId) {
      errors
      invoice {
        accountId
        amount
        amountDue
        amountPaid
        baseCurrencyId
        baseCurrencyTotal
        couponApplied
        createdAt
        credits
        currencyId
        description
        dueAt
        hasPaymentMethod
        id
        internalNotes
        isLegacy
        issuedAt
        kind
        netPaymentDays
        notes
        number
        paidAt
        payableId
        paymentFailedAt
        paymentFailureReason
        poNumber
        portalUrl
        quoteId
        sendInvoiceTo
        smallUnitAmountDue
        subtotal
        taxAmount
        taxRate
        updatedAt
        url
        uuid
      }
      payment {
        accountId
        amount
        amountUnapplied
        baseCurrencyCash
        baseCurrencyId
        completedAt
        conversionRate
        createdAt
        currencyId
        description
        errorCode
        errorMessage
        fees
        id
        isLegacy
        memo
        paymentProcessor
        receivedAt
        remoteTransactionId
        startedAt
        updatedAt
      }
  }
}

Arguments

Name
Type
Description

paymentId

ID

invoiceId

ID

Response

Name
Type
Description

errors

List (String)

invoice

payment

Last updated

Was this helpful?