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

# Refund a Payment Transaction

> Refund a specific payment transaction.



## OpenAPI

````yaml https://api.getmeasure.com/api/v1/docs/api_spec.json post /companies/{company_id}/payments/transactions/{id}/refund
openapi: 3.1.0
info:
  title: Measure API
  description: APIs to communicate with Measure
  version: 1.0.0
servers:
  - url: https://api.getmeasure.com/api/v1
security: []
paths:
  /companies/{company_id}/payments/transactions/{id}/refund:
    post:
      tags:
        - Payments
      summary: Refund a Payment Transaction
      description: Refund a specific payment transaction.
      operationId: Refund_a_Payment_Transaction
      parameters:
        - name: company_id
          in: path
          description: 'The company ID with the prefix ''cmp_''. '
          required: true
          schema:
            description: 'The company ID with the prefix ''cmp_''. '
            type: string
        - name: id
          in: path
          description: The resource ID
          required: true
          schema:
            description: The resource ID
            type: string
        - name: Idempotency-Key
          in: header
          description: >-
            The idempotency key that will be used to ensure the request is only
            performed once
          schema:
            description: >-
              The idempotency key that will be used to ensure the request is
              only performed once
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RequestRefundTransactionRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponsePaymentTransactionRepresentation'
      deprecated: false
      security:
        - apiKey:
            - ''
components:
  schemas:
    RequestRefundTransactionRequest:
      properties:
        amount:
          $ref: '#/components/schemas/ModelAmount'
          description: ''
        note:
          description: An optional internal note for the refund transaction
          type:
            - 'null'
            - string
        reason:
          enum:
            - duplicate
            - fraudulent
            - requested_by_customer
            - expired_uncaptured_charge
          type: string
      type: object
    ResponsePaymentTransactionRepresentation:
      properties:
        application_fee_amount:
          $ref: '#/components/schemas/ModelAmount'
        company_id:
          type: string
        connected_account_transaction:
          type: boolean
        created_at:
          format: date-time
          type: string
        customer:
          $ref: '#/components/schemas/ResponseEmbeddedCustomerRepresentation'
        customer_id:
          type: string
        deleted_at:
          format: date-time
          type:
            - 'null'
            - string
        disallow_partial_refund:
          type:
            - 'null'
            - boolean
        id:
          type: string
        initiated_by:
          type:
            - 'null'
            - string
        initiated_by_type:
          type:
            - 'null'
            - string
        invoice_number:
          type: string
        invoice_uuid:
          type: string
        is_refundable:
          type: boolean
        is_voidable:
          type: boolean
        net_amount:
          $ref: '#/components/schemas/ModelAmount'
        note:
          type:
            - 'null'
            - string
        payment_method:
          $ref: '#/components/schemas/ResponsePaymentMethodData'
        proposal_id:
          type:
            - 'null'
            - string
        provider_transaction_id:
          type: string
        provider_type:
          type: string
        refundable_amount:
          $ref: '#/components/schemas/ModelAmount'
        status:
          type: string
        status_message:
          type:
            - 'null'
            - string
        stripe_fee_amount:
          $ref: '#/components/schemas/ModelAmount'
        total_amount:
          $ref: '#/components/schemas/ModelAmount'
        total_amount_default_currency:
          $ref: '#/components/schemas/ModelAmount'
        total_fee_amount:
          $ref: '#/components/schemas/ModelAmount'
        transaction_type:
          type: string
        updated_at:
          format: date-time
          type: string
      type: object
    ModelAmount:
      description: The amount which has value in cents and a currency
      properties:
        currency:
          type: string
        value_in_cents:
          format: int64
          type: integer
      type: object
    ResponseEmbeddedCustomerRepresentation:
      properties:
        email:
          type: string
        id:
          type: string
        identifier:
          type: string
        name:
          type: string
        org_name:
          type: string
        parent_customer:
          $ref: '#/components/schemas/ResponseEmbeddedCustomerRepresentation'
        parent_customer_id:
          type:
            - 'null'
            - string
      type: object
    ResponsePaymentMethodData:
      properties:
        brand:
          type: string
        last_4:
          type: string
        name:
          type: string
        type:
          type: string
      type: object
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer

````