paymentApplyToInvoices
Apply a payment to one or more invoices. The paymentApplyToInvoices mutation in Bunny's GraphQL API, with its input attributes, return type and an example request.
Scope required: billing:write
mutation paymentApplyToInvoices ($paymentId: ID!, $invoiceIds: [ID!]!) {
paymentApplyToInvoices (paymentId: $paymentId, invoiceIds: $invoiceIds) {
errors
paidInvoices
payment {
accountId
amount
amountUnapplied
baseCurrencyCash
baseCurrencyId
completedAt
conversionRate
createdAt
currencyId
description
errorCode
errorMessage
fees
fromChildAccountId
id
isLegacy
memo
paymentProcessor
pluginId
receivedAt
remoteTransactionId
startedAt
updatedAt
}
paymentApplications
removedInvoices
}
}
ArgumentsLink to Arguments section
{
"paymentId": "456123",
"invoiceIds": [
"456123"
]
}
| Name | Type | Description |
|---|---|---|
| paymentId | ID | |
| invoiceIds | List (ID) |
ResponseLink to Response section
| Name | Type | Description |
|---|---|---|
| errors | List (String) | |
| paidInvoices | List (Invoice) | |
| payment | Payment | |
| paymentApplications | List (PaymentApplication) | |
| removedInvoices | List (Invoice) |