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

# Initiate refund



## OpenAPI

````yaml /payment.openapi.json post /api/refund
openapi: 3.1.0
info:
  title: payment hub
  description: |
    Focused OpenAPI 3.1 contract for the **launch-payment** endpoint
    (`POST /api/transactions`). The request body is polymorphic on
    `paymentGatewayType`; each gateway sub-schema documents the gateway-specific
    fields. Highlights:

      * `onlineScenario=true` → customer-initiated, Hosted-Checkout / redirect flow
      * `onlineScenario=false` → merchant-initiated debit using a previously
        stored payment method (only valid on gateways that support offline)
      * `supportOfflineScenario` (Stripe / PayerMax only) — when `true` and
        `onlineScenario=true`, the gateway is instructed to remember the card
        so a future off-session (merchant-initiated) charge can succeed.
  version: 1.0.0
  summary: ''
servers:
  - url: https://sbx.api.easybilling.cloud/payment-hub
    description: SBX
  - url: https://api.easybilling.cloud/payment-hub
    description: Production-AWS
security:
  - token: []
tags:
  - name: Payment Hub
paths:
  /api/refund:
    post:
      tags:
        - Payment Hub
      summary: Initiate refund
      parameters:
        - name: trace-id
          in: header
          description: ''
          required: false
          example: '{{$string.uuid}}'
          schema:
            type: string
            default: '{{$string.uuid}}'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                transactionId:
                  type: string
                  title: ''
                  description: payment transaction id
                requestId:
                  type: string
                  title: ''
                  description: refund transaction id, required for query refund
                status:
                  type: string
                  description: status
              required:
                - transactionId
                - requestId
                - status
            example:
              transactionId: Order-123
              requestId: Order-123-R
              amount: '123'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  transactionId:
                    type: string
                    title: ''
                  status:
                    type: string
                    title: ''
                    description: created/refunding/success/failure/cancel/closed
                required:
                  - transactionId
                  - status
          headers: {}
      deprecated: false
      security:
        - token: []
components:
  securitySchemes:
    token:
      type: http
      scheme: bearer

````