post:
  tags:
    - Purchases
  summary: Refund purchase
  description: Refunds all payments of an order which may be refunded.
  operationId: refundPurchase
  parameters:
    - name: purchase_id
      in: query
      description: The purchase ID
      required: true
      schema:
        type: string
    - name: force
      in: query
      description: If false (default), the refund will only be processed if the refund policy allows it. If true, the refund will be attempted anyway.
      required: false
      schema:
        type: boolean
        default: false
    - name: request_date
      in: query
      description: If given, apply refund policies based on the given date. Use this if there is a delay between refund request by the buyer and processing time.
      required: false
      schema:
        type: string
        format: date
        default: 'now'
  responses:
    '200':
      description: Successful response
      content:
        application/json:
          schema:
            type: object
            properties:
              api_version:
                type: string
              current_time:
                type: string
                format: date-time
              runtime_seconds:
                type: number
              result:
                type: string
              data:
                type: object
                description: The response data structure is not specified in the original documentation
  security:
    - api_key: []
