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

# Refund inquiry



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/refund/inquiry
openapi: 3.1.0
info:
  title: acquiring-order
  description: 接口文档
  termsOfService: https://www.waffo.com
  version: 1.0.0
servers:
  - url: https://www.waffo.com
    description: Sandbox API (auto-signed via Next.js proxy)
security: []
tags:
  - name: Order create
    description: ' Order create api description'
  - name: Subscription create
    description: Subscription create api description
  - name: Subscription inquiry
    description: Subscription inquiry api description
  - name: Order inquiry
    description: Order inquiry api description
  - name: Subscription cancel
    description: >
      Cancel an active subscription when the merchant no longer wishes to
      continue the recurring billing cycle. This endpoint can only be invoked
      when the subscription status is active
  - name: Order cancel
    description: Order cancel api description
  - name: Subscription manage
    description: >
      This API allows the merchant to request a subscription management URL from
      Waffo

      Waffo will generate a subscription management URL which merchant can
      redirect user to this URL for managing subscription details (e.g. view
      subscription detail and cancel subscription). This management URL has a
      fixed expiration time (e.g., 1 day).
  - name: Order refund
    description: Order refund api description
  - name: Subscription change
    description: >
      This API allows merchants to upgrade or downgrade a user's subscription
      plan. The change request will create a new subscription based on the
      original subscription, applying any remaining amount from the original
      subscription.


      此接口允许商户升级或降级用户的订阅计划。升降级请求将基于原订阅创建新订阅，并将原订阅的剩余金额应用到新订阅中。
  - name: Refund inquiry
    description: Refund inquiry api description
  - name: Subscription change inquiry
    description: >
      This API allows merchants to query the status of a subscription change
      (upgrade/downgrade) request.

      此接口允许商户查询订阅升降级请求的状态。
  - name: Merchant config inquiry
    description: Merchant config inquiry api description
  - name: Pay Method Config Inquiry
    description: Pay Method Config Inquiry api description
paths:
  /api/v1/refund/inquiry:
    post:
      tags:
        - Refund inquiry
      summary: Refund inquiry
      operationId: refundInquiry
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AcqOrderRefundInquiryRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ResponseAcqOrderRefundInquiry'
components:
  schemas:
    AcqOrderRefundInquiryRequest:
      type: object
      description: provide refundRequestId or acquiringRefundOrderId
      properties:
        refundRequestId:
          type: string
          description: >
            Refund request id sent from Merchant. It will also be used for
            idempotent check. 

            (provide refundRequestId or acquiringRefundOrderId) 
        acquiringRefundOrderId:
          type: string
          description: |
            Waffo refund order Id  
            (provide refundRequestId or acquiringRefundOrderId) 
          example: <acquiringRefundOrderId>
    ResponseAcqOrderRefundInquiry:
      type: object
      description: response data
      properties:
        code:
          type: string
        msg:
          type: string
        data:
          $ref: '#/components/schemas/AcqOrderRefundInquiry'
    AcqOrderRefundInquiry:
      type: object
      description: A RefundOrder object will be returned
      properties:
        refundRequestId:
          type: string
          description: >-
            Refund request id sent from Merchant. It will also be used for
            idempotent check. 
        merchantRefundOrderId:
          type: string
          description: merchant refund order id
        acquiringOrderId:
          type: string
          description: acquiring order id
        acquiringRefundOrderId:
          type: string
          description: acquiring refund order id
        origPaymentRequestId:
          type: string
          description: Original Payment request id sent from Merchant.
        refundAmount:
          type: string
          description: refund amount
        refundStatus:
          type: string
          description: >-
            **REFUND_IN_PROGRESS** - refund request has been accepted and result
            will be sent back to merchant 

            **ORDER_PARTIALLY_REFUNDED** 

            **ORDER_FULLY_REFUNDED** 

            **ORDER_REFUND_FAILED**
        refundReason:
          type: string
          description: merchant refund reason
        refundRequestedAt:
          type: string
          description: merchant side request time
        refundUpdatedAt:
          type: string
          description: order last update time
        refundFailedReason:
          type: string
          description: |-
            Json format 
             { 
                "orderFailedCode":"XXX", 
                "orderFailedDescription":"XXX" 
            }
        extendInfo:
          type: string
          description: Reserved. Json format e.g. {"key1":"value1", "key2":"value2"}
        userCurrency:
          type: string
          description: >-
            User payment currency. This is needed when merchant order currency
            is NOT the same as user payment currency.
        finalDealAmount:
          type: string
          description: >-
            The final refunded amount that the user receives.

            If merchant order currency is not the same as user payment currency,
            the finalDealAmount will not be the same as orderAmount.

            The refunded amount may not include the service/tax fee that user
            has paid, hence the finalDealAmount may not the same as
            orderAmount. 
        merchantUserId:
          type: string
          description: Merchant user id
        subscriptionInfo:
          $ref: '#/components/schemas/SubscriptionInfo'
          description: >-
            The associated subscription info. Present when the refund is linked
            to a subscription payment order.
        remainingRefundAmount:
          type: string
          description: Remaining Refund Amount that Merchant can still refund
        userInfo:
          $ref: '#/components/schemas/RefundOrderUserInfo'
          description: >-
            For certain pay method type (e.g. ONLINE_BANKING) the refund
            requires Merchant to provide user information to execute
        refundCompletedAt:
          type: string
          description: Refund order completion time
        refundSource:
          type: string
          description: >
            Refund Source

            **MERCHANT**: Indicates the refund is triggered by the Merchant.

            **RDR**: Indicates the refund is triggered by the chargeback alert
            service via vendor RDR.

            **ETHOCA**: Indicates the refund is triggered by the chargeback
            alert service via vendor Ethoca.
      required:
        - acquiringOrderId
        - acquiringRefundOrderId
        - finalDealAmount
        - origPaymentRequestId
        - refundAmount
        - refundReason
        - refundRequestId
        - refundRequestedAt
        - refundStatus
        - refundUpdatedAt
        - remainingRefundAmount
    SubscriptionInfo:
      type: object
      description: The associated subscription info
      properties:
        subscriptionId:
          type: string
          description: The associated subscription ID
        period:
          type: string
          description: Which period the subscription payment belong to. For example 2
        subscriptionRequest:
          type: string
          description: >-
            Subscription request id sent from Merchant. It will also be used for
            idempotent check. 
      required:
        - period
        - subscriptionId
        - subscriptionRequest
    RefundOrderUserInfo:
      type: object
      description: >-
        For certain pay method type (e.g. ONLINE_BANKING) the refund requires
        Merchant to provide user information to execute
      properties:
        userType:
          type: string
          default: INDIVIDUAL
          description: |-
            User Type: 
            - **INDIVIDUAL** 
            - **BUSINESS**
          example: INDIVIDUAL
          maxLength: 12
          minLength: 0
        userFirstName:
          type: string
          description: User's first name
          maxLength: 64
          minLength: 0
        userMiddleName:
          type: string
          maxLength: 64
          minLength: 0
        userLastName:
          type: string
          description: User's last name
          maxLength: 64
          minLength: 0
        nationality:
          type: string
          maxLength: 3
          minLength: 0
        userEmail:
          type: string
          description: User's email address for refund communication
          example: test@email.com
          maxLength: 64
          minLength: 0
        userBankInfo:
          $ref: '#/components/schemas/RefundOrderUserBankInfo'
          description: |-
            it will include the following info in a json format: 
            { 
            "bankAccountNo": "XXX", 
            "bankCode": "XXX", 
            "bankCity": "XXX", 
            "bankBranch": "XXX" 
            }
        userPhone:
          type: string
          description: >-
            Merchant user mobile phone number: +Country code-Mobile Number, for
            example +62-08990013157
          maxLength: 16
          minLength: 0
        userBirthDay:
          type: string
          maxLength: 12
          minLength: 0
        userIDType:
          type: string
          description: User's Identification Type
          maxLength: 24
          minLength: 0
        userIDNumber:
          type: string
          description: User's Identification Number
          maxLength: 64
          minLength: 0
        userIDIssueDate:
          type: string
          description: The date of issue of User's ID. Format is dd/mm/yyyy
          maxLength: 12
          minLength: 0
        userIDExpiryDate:
          type: string
          description: The date of expiry of User's ID. Format is dd/mm/yyyy
          maxLength: 12
          minLength: 0
      required:
        - userType
    RefundOrderUserBankInfo:
      type: object
      properties:
        bankAccountNo:
          type: string
          maxLength: 64
          minLength: 0
        bankCode:
          type: string
          maxLength: 64
          minLength: 0
        bankName:
          type: string
          maxLength: 64
          minLength: 0
        bankCity:
          type: string
          maxLength: 64
          minLength: 0
        bankBranch:
          type: string
          maxLength: 64
          minLength: 0

````