> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paypal.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Void a credit note

> Voids a credit note, making it no longer available for use. This action cannot be undone.



## OpenAPI

````yaml /api-reference/ubb_openapi_inline.json post /credit-notes/{credit_note_id}/void
openapi: 3.0.1
info:
  title: Usage Based Billing API
  version: 1.0.0
  description: An Orchestrator for Usage Based Billing and Payments
servers:
  - url: https://api-m.sandbox.paypal.com/v1/commerce/billing
security:
  - BearerAuth:
      - read
      - write
tags:
  - name: Alerts
    description: API endpoints for managing subscription alerts
  - name: Events
    description: API endpoints for managing events
  - name: Metrics
    description: API endpoints for metrics and usage data
  - name: Merchant Activation
    description: API endpoint for merchant activation
  - name: Credit Notes
    description: API endpoints for credit notes management
  - name: Customers
    description: API endpoints for customer management
  - name: Invoices
    description: API endpoints for invoice management
  - name: Plans
    description: API endpoints for subscription plans
  - name: Subscriptions
    description: API endpoints for subscriptions
  - name: Wallets
    description: API endpoints for wallet management
  - name: Taxes
    description: API endpoints for tax management
  - name: Billing Entities
    description: API endpoints for billing entities
  - name: Features
    description: API endpoints for managing features and privileges
  - name: Entitlements
    description: API endpoints for managing plan and subscription entitlements
paths:
  /credit-notes/{credit_note_id}/void:
    post:
      tags:
        - Credit Notes
      summary: Void a credit note
      description: >-
        Voids a credit note, making it no longer available for use. This action
        cannot be undone.
      operationId: VoidCreditNote
      parameters:
        - name: credit_note_id
          in: path
          description: The ID of the credit note to void
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Credit note voided successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditNoteWithId'
              example:
                id: cn_01H2XT1G7N8E2JHJKBVPDS0TQD
                sequential_id: 3
                billing_entity_code: lex_corp
                number: CN-2023-0001
                invoice_id: inv_01H2XT1G7N8E2JHJKBVPDS0TQD
                invoice_number: INV-2023-001
                issuing_date: '2023-06-01'
                credit_status: VOIDED
                refund_status: SUCCEEDED
                reason: ORDER_CANCELLATION
                description: Refund for cancelled subscription
                total_amount:
                  value: 50
                  currency_code: USD
                credit_amount:
                  value: 0
                  currency_code: USD
                refund_amount:
                  value: 0
                  currency_code: USD
                balance_amount:
                  value: 0
                  currency_code: USD
                taxes_amount:
                  value: 0
                  currency_code: USD
                sub_total_excluding_taxes_amount:
                  value: 0
                  currency_code: USD
                taxes_rate: 0.2
                created_at: '2023-05-10T14:32:18Z'
                updated_at: '2023-06-15T10:45:22Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    CreditNoteWithId:
      allOf:
        - $ref: '#/components/schemas/CreditNote'
        - type: object
          properties:
            id:
              type: string
    CreditNote:
      type: object
      required:
        - sequential_id
        - billing_entity_code
        - number
        - invoice_id
        - invoice_number
        - issuing_date
        - reason
        - total_amount
        - credit_amount
        - refund_amount
        - balance_amount
        - taxes_amount
        - taxes_rate
        - sub_total_excluding_taxes_amount
        - created_at
        - updated_at
      properties:
        billing_entity_code:
          $ref: '#/components/schemas/BillingEntityCode'
        sequential_id:
          type: integer
          description: >-
            The sequential identifier of the credit note, specifically scoped on
            the associated invoice. It provides a unique numerical identifier
            for the credit note within the context of the invoice.
          example: 2
        number:
          type: string
          description: The credit note unique number.
          example: PP-1234-US
        invoice_id:
          type: string
          format: uuid
          description: >-
            Unique identifier assigned to the invoice that the credit note
            belongs to
          example: 1a901a90-1a90-1a90-1a90-1a901a901a90
        invoice_number:
          type: string
          description: The invoice unique number, related to the credit note.
          example: PP-1234
        issuing_date:
          $ref: '#/components/schemas/Date'
          description: >-
            The date of creation of the credit note. It follows the ISO 8601
            date format and provides the specific date when the credit note was
            created.
          example: '2022-12-06'
        credit_status:
          $ref: '#/components/schemas/CreditNoteStatus'
        refund_status:
          $ref: '#/components/schemas/RefundStatus'
        reason:
          $ref: '#/components/schemas/CreditNoteReason'
        description:
          type: string
          nullable: true
          description: The description of the credit note.
          example: Free text
        total_amount:
          $ref: '#/components/schemas/Amount'
          description: The total amount of the credit note.
          example:
            value: 1.2
            currency_code: USD
        taxes_amount:
          $ref: '#/components/schemas/Amount'
          description: The tax amount of the credit note.
          example:
            value: 0.2
            currency_code: USD
        taxes_rate:
          type: number
          description: The tax rate associated with this specific credit note.
          example: 0.2
        sub_total_excluding_taxes_amount:
          $ref: '#/components/schemas/Amount'
          description: The subtotal of the credit note excluding any applicable taxes.
          example:
            value: 1
            currency_code: USD
        balance_amount:
          $ref: '#/components/schemas/Amount'
          description: The remaining credit note amount.
          example:
            value: 1
            currency_code: USD
        credit_amount:
          $ref: '#/components/schemas/Amount'
          description: The credited amount of the credit note.
          example:
            value: 1
            currency_code: USD
        refund_amount:
          $ref: '#/components/schemas/Amount'
          description: The refunded amount of the credit note.
          example:
            value: 0
            currency_code: USD
        created_at:
          $ref: '#/components/schemas/DateTimeWithZone'
          description: >-
            The date when the credit note was created. It is expressed in
            Coordinated Universal Time (UTC).
          example: '2022-09-14T16:35:31Z'
        updated_at:
          $ref: '#/components/schemas/DateTimeWithZone'
          description: >-
            The date when the credit note was last updated. It is expressed in
            Coordinated Universal Time (UTC).
          example: '2022-09-14T16:35:31Z'
        items:
          type: array
          items:
            $ref: '#/components/schemas/CreditNoteItemObject'
          description: Array of credit note's items.
        applied_taxes:
          type: array
          items:
            $ref: '#/components/schemas/CreditNoteAppliedTaxObject'
    Error:
      type: object
      properties:
        name:
          type: string
        debug_id:
          type: string
        message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/ErrorDetail'
    BillingEntityCode:
      type: string
      description: >-
        Unique code used to identify the billing entity. Must contain only
        alphanumeric characters, underscores, and hyphens.
      pattern: ^[a-zA-Z0-9_-]*$
      example: acme_inc
    Date:
      type: string
      format: date
      description: Date in ISO 8601 format (YYYY-MM-DD).
      example: '2023-10-01'
      pattern: >-
        ^(?:[1-9]\d{3}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|02-(?:0[1-9]|1\d|2[0-8]))|(?:(?:\d{2}(?:0[48]|[2468][048]|[13579][26]))|(?:[02468][048]00|[13579][26]00))-02-29)$
    CreditNoteStatus:
      type: string
      description: The status of the credit portion of the credit note
      enum:
        - AVAILABLE
        - CONSUMED
        - VOIDED
      x-enum-varnames:
        - AVAILABLE
        - CONSUMED
        - VOIDED
      x-enum-descriptions:
        - >-
          There's an amount remains available for future usage. The credit can
          be applied towards future transactions or invoices
        - >-
          The credit amount has been fully consumed. The remaining amount is 0,
          indicating that the credit has been utilized in its entirety
        - >-
          The remaining amount of the credit cannot be used any further. The
          credit has been voided and is no longer available for application or
          redemption
      example: AVAILABLE
    RefundStatus:
      type: string
      description: The status of the refund portion of the credit note
      enum:
        - PENDING
        - SUCCEEDED
        - FAILED
      x-enum-varnames:
        - PENDING
        - SUCCEEDED
        - FAILED
      x-enum-descriptions:
        - >-
          The refund is pending execution. The refund request has been initiated
          but has not been processed or completed yet
        - >-
          The refund has been successfully executed. The refund amount has been
          processed and returned to the customer or the designated recipient
        - >-
          The refund failed to execute. The refund request encountered an error
          or unsuccessful processing, and the refund amount could not be
          returned
      example: PENDING
    CreditNoteReason:
      type: string
      description: The reason for credit note creation
      enum:
        - DUPLICATED_CHARGE
        - PRODUCT_UNSATISFACTORY
        - ORDER_CHANGE
        - ORDER_CANCELLATION
        - FRAUDULENT_CHARGE
        - OTHER
      x-enum-varnames:
        - DUPLICATED_CHARGE
        - PRODUCT_UNSATISFACTORY
        - ORDER_CHANGE
        - ORDER_CANCELLATION
        - FRAUDULENT_CHARGE
        - OTHER
      x-enum-descriptions:
        - Credit note issued due to duplicate charge on customer account
        - Credit note issued because the product or service was unsatisfactory
        - Credit note issued due to changes made to the original order
        - Credit note issued because the order was cancelled
        - Credit note issued due to fraudulent or unauthorized charge
        - >-
          Credit note issued for other reasons not covered by standard
          categories
      example: OTHER
    Amount:
      allOf:
        - $ref: '#/components/schemas/AmountNoCurrency'
        - type: object
          required:
            - currency_code
          properties:
            currency_code:
              $ref: '#/components/schemas/Currency'
    DateTimeWithZone:
      type: string
      format: date-time
      description: Date and time in ISO 8601 format.
      example: '2023-10-01T12:00:00Z'
    CreditNoteItemObject:
      type: object
      required:
        - id
        - amount
        - fee
      properties:
        id:
          type: string
          format: uuid
          description: The credit note's item unique identifier.
          example: 1a901a90-1a90-1a90-1a90-1a901a901a90
        amount:
          $ref: '#/components/schemas/Amount'
          description: The credit note's item amount.
          example:
            value: 1
            currency_code: USD
        fee:
          $ref: '#/components/schemas/FeeObject'
          description: The fee object related to the credit note item.
    CreditNoteAppliedTaxObject:
      allOf:
        - $ref: '#/components/schemas/BaseAppliedTax'
      type: object
      properties:
        credit_note_id:
          type: string
          format: uuid
          description: Unique identifier of the credit note.
          example: 1a901a90-1a90-1a90-1a90-1a901a901a90
        base_amount:
          $ref: '#/components/schemas/Amount'
          example:
            value: 1
            currency_code: USD
    ErrorDetail:
      type: object
      properties:
        field:
          type: string
        value:
          type: string
        location:
          type: string
        issue:
          type: string
        description:
          type: string
    AmountNoCurrency:
      type: object
      required:
        - value
      properties:
        value:
          type: number
          format: decimal
          description: >-
            The amount value in the corresponding currency unit (e.g., two
            decimals for USD, no decimals for JPY).
          example: 120.35
          minimum: 0
          nullable: false
          default: 0
    Currency:
      type: string
      description: Currency code in ISO 4217 format.
      example: USD
      minLength: 3
      maxLength: 3
      pattern: ^[A-Z]{3}$
    FeeObject:
      type: object
      properties:
        id:
          type: string
          nullable: true
          format: uuid
          description: >-
            Unique identifier assigned to the fee. This ID is exclusively and
            serves as a unique identifier for the fee's record.
          example: 1a901a90-1a90-1a90-1a90-1a901a901a90
        total_amount:
          $ref: '#/components/schemas/Amount'
          description: The cost of this specific fee, including any applicable taxes.
          example:
            value: 1.2
            currency_code: USD
        name:
          type: string
          nullable: true
          description: >-
            The the name of the fee associated to any one of the charge, the
            credit, the subscription or the commitment
          example: Basic Plan
    BaseAppliedTax:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the applied tax.
          example: 1a901a90-1a90-1a90-1a90-1a901a901a90
        tax_id:
          type: string
          format: uuid
          description: Unique identifier of the tax.
          example: 1a901a90-1a90-1a90-1a90-1a901a901a90
        tax_name:
          type: string
          description: Name of the tax.
          example: TVA
        tax_code:
          type: string
          description: >-
            Unique code used to identify the tax associated with the API
            request.
          example: french_standard_vat
        tax_rate:
          type: number
          description: The percentage rate of the tax
          example: 20
        tax_description:
          type: string
          description: Internal description of the taxes
          example: French standard VAT
        amount:
          $ref: '#/components/schemas/Amount'
          description: Amount of the tax
          example:
            value: 20
            currency_code: USD
        created_at:
          $ref: '#/components/schemas/DateTimeWithZone'
          description: >-
            The date and time when the applied tax was created. It is expressed
            in UTC format according to the ISO 8601 datetime standard. This
            field provides the timestamp for the exact moment when the applied
            tax was initially created.
          example: '2022-09-14T16:35:31Z'
  responses:
    BadRequest:
      description: Bad Request - Invalid input data
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            name: INVALID_REQUEST
            message: >-
              Request is not well-formed, syntactically incorrect, or violates
              schema.
            debug_id: dc99e3955cdd8
            details:
              - field: /email
                value: abc
                location: body
                issue: INVALID_PARAMETER_VALUE
                description: The value of a field does not conform to the expected format.
    Forbidden:
      description: Authorization failed due to insufficient permissions.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            name: NOT_AUTHORIZED
            message: Authorization failed due to insufficient permissions.
            debug_id: 565f78f101498
            details:
              - issue: PERMISSION_DENIED
                description: >-
                  You do not have permission to access or perform operations on
                  this resource.
    NotFound:
      description: Resource Not Found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UnprocessableEntity:
      description: Bad Request - Invalid input data
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            name: UNPROCESSABLE_ENTITY
            message: >-
              The requested action could not be performed, semantically
              incorrect, or failed business validation.
            debug_id: 90957fca61718
            details:
              - field: /email
                value: sdfwdj@sdfs.com
                location: body
                issue: UNSUPPORTED_EMAIL
                description: The email provided is not supported.
    InternalServerError:
      description: Internal Server Error - An unexpected error occurred
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            name: INTERNAL_SERVER_ERROR
            message: An internal server error has occurred.
            debug_id: 90957fca61718
  securitySchemes:
    BearerAuth:
      type: oauth2
      description: >-
        Use the /v1/oauth2/token endpoint to obtain an access token and pass it
        as a Bearer token in the Authorization header.
      flows:
        clientCredentials:
          tokenUrl: https://api-m.sandbox.paypal.com/v1/oauth2/token
          scopes:
            read: Read access
            write: Write access

````