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

# Refund an Invoice

> **Scopes:** `invoice:create`



## OpenAPI

````yaml /api-reference/openapi.json post /v0/business/{business_id}/refund
openapi: 3.1.0
info:
  title: Asset API
  version: '0.1'
servers:
  - url: https://api.sandbox.getasset.com
    description: Sandbox
  - url: https://api.getasset.com
    description: Production
security: []
paths:
  /v0/business/{business_id}/refund:
    post:
      tags:
        - Invoice
      summary: Refund an Invoice
      description: '**Scopes:** `invoice:create`'
      operationId: create_refund_v0_business__business_id__refund_post
      parameters:
        - name: business_id
          in: path
          required: true
          schema:
            description: The id of the business
            examples:
              - biz_GA6EG2qFxA97NZHtxeLPUy
            type: string
            format: biz_string
            title: Business Id
          description: The id of the business
        - name: x-user-id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Optional external entity identifier that performed the action
            title: X-User-Id
          description: Optional external entity identifier that performed the action
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRefundRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RefundSuccess'
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Content
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Service Unavailable
      security:
        - OAuth2PasswordBearer:
            - invoice:create
components:
  schemas:
    CreateRefundRequest:
      properties:
        amount:
          anyOf:
            - type: number
              exclusiveMinimum: 0
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Amount
          description: The amount to refund.
          examples:
            - 100
        refund_external_id:
          type: string
          maxLength: 255
          title: Refund External Id
          description: The external ID of the refund.
          examples:
            - ref_ext_001
        refunded_at:
          type: string
          format: date-time
          title: Refunded At
          description: The date and time of the refund.
          examples:
            - '2025-01-15T14:30:00Z'
        memo:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Memo
          description: The memo for the refund.
          examples:
            - Customer returned defective item
        processor:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Processor
          description: The name of the person who processed the refund.
          examples:
            - John Doe
        method:
          $ref: '#/components/schemas/RefundMethod'
          description: The method of the refund.
          examples:
            - cash
            - check
            - credit_card
            - ach
            - credit_balance
            - other
        is_return:
          type: boolean
          title: Is Return
          description: Whether the refund is for a return.
          default: false
        invoices_to_refund:
          items:
            $ref: '#/components/schemas/InvoicesToRefundRequest'
          type: array
          maxItems: 100
          minItems: 1
          title: Invoices To Refund
          description: The invoices to refund.
        tags:
          anyOf:
            - additionalProperties:
                anyOf:
                  - type: string
                  - items:
                      $ref: '#/components/schemas/TagValueInput-Input'
                    type: array
              type: object
            - type: 'null'
          title: Tags
          description: >-
            Inline tag input. Each field maps to either a single value (string,
            e.g. 'NYC') or a list of {value, amount} objects to allocate the
            refund across multiple values. The tag field must already exist;
            values are created automatically if missing. Per-field sum of
            amounts must not exceed the refund amount.
          examples:
            - Location: NYC
            - Job:
                - amount: '60.00'
                  value: Maple Street Remodel
                - amount: '40.00'
                  value: Downtown Office Rewire
      type: object
      required:
        - amount
        - refund_external_id
        - refunded_at
        - method
        - invoices_to_refund
      title: CreateRefundRequest
    RefundSuccess:
      properties:
        data:
          $ref: '#/components/schemas/RefundPublic'
      type: object
      required:
        - data
      title: RefundSuccess
    ErrorResponse:
      properties:
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: A description of the error
        data:
          title: Data
          description: Data associated with the error
      type: object
      required:
        - error
        - data
      title: ErrorResponse
    RefundMethod:
      type: string
      enum:
        - cash
        - check
        - credit_card
        - ach
        - credit_balance
        - other
      title: RefundMethod
    InvoicesToRefundRequest:
      properties:
        invoice_id:
          anyOf:
            - type: string
              format: inv_string
            - type: 'null'
          title: Invoice Id
          description: >-
            The ID of the invoice to refund. Required if invoice_external_id is
            not provided.
          examples:
            - inv_WQMDNUHpBThYSNh4AprDBo
        invoice_external_id:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Invoice External Id
          description: >-
            The external ID of the invoice to refund. Required if invoice_id is
            not provided.
          examples:
            - ext_inv_001
        invoice_line_id:
          anyOf:
            - type: string
              format: inl_string
            - type: 'null'
          title: Invoice Line Id
          description: The ID of the invoice line to refund.
          examples:
            - inl_WQMDNUHpBThYSNh4AprDBo
        amount:
          anyOf:
            - type: number
              exclusiveMinimum: 0
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Amount
          description: The amount to refund.
          examples:
            - 100
        memo:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Memo
          description: The memo for the refund.
          examples:
            - Refund for returned item
      type: object
      required:
        - amount
      title: InvoicesToRefundRequest
    TagValueInput-Input:
      properties:
        value:
          type: string
          title: Value
          description: The tag value (option string)
          examples:
            - NYC
        amount:
          anyOf:
            - type: number
              minimum: 0
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Amount
          description: >-
            Portion of the source object allocated to this tag value. If
            omitted: with one value on a field the full source amount is used;
            with multiple values on a field the amount is split evenly. Mixed
            (some amounts set, some omitted) is rejected.
          examples:
            - '75.00'
      type: object
      required:
        - value
      title: TagValueInput
    RefundPublic:
      properties:
        business_id:
          type: string
          format: biz_string
          title: Business Id
          description: The ID of the Business that the refund is associated with
          examples:
            - biz_Pk2fNFDd8wj7EFeLWJywc7
        external_id:
          type: string
          maxLength: 255
          title: External Id
          description: The external ID of the refund
        amount:
          type: number
          title: Amount
          description: The amount of the refund
        amount_paid:
          type: number
          title: Amount Paid
          description: The amount of the refund that has been paid
          default: 0
        memo:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Memo
          description: Description of the refund
        processor:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Processor
          description: The entity that processed the refund
        method:
          $ref: '#/components/schemas/RefundMethod'
          description: Method of refund
        is_return:
          type: boolean
          title: Is Return
          description: Whether the refund is a return
          default: false
        refunded_at:
          type: string
          format: date-time
          title: Refunded At
          description: The date and time the refund was created
        status:
          $ref: '#/components/schemas/RefundStatus'
          description: The status of the refund
          default: pending
        id:
          type: string
          format: rfu_string
          title: Id
          description: The ID of the refund
          examples:
            - rfu_WQMDNUHpBThYSNh4AprDBo
        payments:
          anyOf:
            - items:
                $ref: '#/components/schemas/RefundPaymentPublic'
              type: array
            - type: 'null'
          title: Payments
          description: The payments for this refund
        refund_invoices:
          anyOf:
            - items:
                $ref: '#/components/schemas/RefundInvoicePublic'
              type: array
            - type: 'null'
          title: Refund Invoices
          description: The invoices refunded
        tags:
          anyOf:
            - additionalProperties:
                items:
                  $ref: '#/components/schemas/TagValueInput-Output'
                type: array
              type: object
            - type: 'null'
          title: Tags
          description: >-
            Tag field name to the list of values attached to the refund. Each
            value carries its allocated amount; a single-value field is still
            returned as a one-element list.
          examples:
            - Job:
                - amount: '60.00'
                  value: Maple Street Remodel
                - amount: '40.00'
                  value: Downtown Office Rewire
      type: object
      required:
        - business_id
        - external_id
        - amount
        - method
        - refunded_at
        - id
      title: RefundPublic
    RefundStatus:
      type: string
      enum:
        - pending
        - completed
        - voided
      title: RefundStatus
    RefundPaymentPublic:
      properties:
        amount:
          type: number
          title: Amount
          description: The amount of the refund that has been paid
        id:
          type: string
          format: rfp_string
          title: Id
          description: The ID of the payment
          examples:
            - rfp_WQMDNUHpBThYSNh4AprDBo
        transaction_id:
          type: string
          format: txn_string
          title: Transaction Id
          description: The ID of the transaction that the refund payment is associated with
          examples:
            - txn_WQMDNUHpBThYSNh4AprDBo
      type: object
      required:
        - amount
        - id
        - transaction_id
      title: RefundPaymentPublic
    RefundInvoicePublic:
      properties:
        external_id:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: External Id
          description: The external ID of the refund
        amount:
          type: number
          title: Amount
          description: The amount of the refund
        memo:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Memo
          description: Description of the refund
        id:
          type: string
          format: rfi_string
          title: Id
          description: The ID of the invoice
          examples:
            - rfi_WQMDNUHpBThYSNh4AprDBo
        invoice_id:
          type: string
          format: inv_string
          title: Invoice Id
          description: The ID of the invoice that the refund invoice is associated with
          examples:
            - inv_WQMDNUHpBThYSNh4AprDBo
        invoice_line_id:
          anyOf:
            - type: string
              format: inl_string
            - type: 'null'
          title: Invoice Line Id
          description: >-
            The ID of the invoice line that the refund invoice is associated
            with
          examples:
            - inl_WQMDNUHpBThYSNh4AprDBo
      type: object
      required:
        - amount
        - id
        - invoice_id
        - invoice_line_id
      title: RefundInvoicePublic
    TagValueInput-Output:
      properties:
        value:
          type: string
          title: Value
          description: The tag value (option string)
          examples:
            - NYC
        amount:
          anyOf:
            - type: number
            - type: 'null'
          title: Amount
          description: >-
            Portion of the source object allocated to this tag value. If
            omitted: with one value on a field the full source amount is used;
            with multiple values on a field the amount is split evenly. Mixed
            (some amounts set, some omitted) is rejected.
          examples:
            - '75.00'
      type: object
      required:
        - value
      title: TagValueInput
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: /v0/auth/token

````