paymentApplyToInvoice

Apply a payment to an invoice. The paymentApplyToInvoice mutation in Bunny's GraphQL API, with its input attributes, return type and an example request.

Scope required: billing:write

mutation paymentApplyToInvoice ($paymentId: ID!, $invoiceId: ID!) {
  paymentApplyToInvoice (paymentId: $paymentId, invoiceId: $invoiceId) {
      errors
      invoice {
        accountId
        aging
        amount
        amountDue
        amountPaid
        baseCurrencyId
        baseCurrencyTotal
        couponApplied
        createdAt
        credits
        currencyId
        description
        dueAt
        fromChildAccountId
        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
        fromChildAccountId
        id
        isLegacy
        memo
        paymentProcessor
        pluginId
        receivedAt
        remoteTransactionId
        startedAt
        updatedAt
      }
  }
}

ArgumentsLink to Arguments section

{
  "paymentId": "456123",
  "invoiceId": "456123"
}
Name Type Description
paymentId ID  
invoiceId ID  

ResponseLink to Response section

Name Type Description
errors List (String)  
invoice Invoice  
payment Payment