# invoiceCredit

Credit an invoice

**Scope required:** billing:write

```graphql
mutation invoiceCredit ($invoiceId: ID!, $disputeReasonId: ID!) {
  invoiceCredit (invoiceId: $invoiceId, disputeReasonId: $disputeReasonId) {
      creditNote {
        accountId
        amount
        amountApplied
        amountUnapplied
        createdAt
        creditedInvoiceId
        currencyId
        description
        disputeId
        disputeReasonId
        entityId
        id
        isCredit
        isLegacy
        issuedAt
        number
        subtotal
        taxAmount
        updatedAt
        uuid
        warrenId
      }
      errors
  }
}
```

## Arguments

```json
{
  "invoiceId": "456123",
  "disputeReasonId": "456123"
}
```

| Name            | Type | Description |
| --------------- | ---- | ----------- |
| invoiceId       | ID   |             |
| disputeReasonId | ID   |             |

## Response

| Name       | Type                                                                          | Description |
| ---------- | ----------------------------------------------------------------------------- | ----------- |
| creditNote | [CreditNote](https://docs.bunny.com/developer/api-reference/types/creditnote) |             |
| errors     | List (String)                                                                 |             |
