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

# Check refund status

Get refund status by the `refundId` from your initial refund request. A list with at most one `Refund` is returned.

This operation can be used to confirm the current status of a refund.


## OpenAPI

````yaml openapi_v1 get /refunds/{refundId}
openapi: 3.0.0
info:
  title: PawaPay Merchant API v1
  description: Please find complete documentation from https://docs.pawapay.io/.
  version: v1
  x-logo:
    url: >-
      https://global-uploads.webflow.com/62824591015aa314fd308df1/6411b26596e3de3f52551c00_Logopawapay-p-500.png
    href: https://docs.pawapay.io/
    altText: PawaPay logo
servers:
  - url: https://api.sandbox.pawapay.io
    description: PawaPay Merchant API sandbox
  - url: https://api.pawapay.io
    description: PawaPay Merchant API production
security:
  - bearerAuth: []
tags:
  - name: payouts
    x-displayName: Payouts
  - name: deposits
    x-displayName: Deposits
  - name: refunds
    x-displayName: Refunds
  - name: payment-page
    x-displayName: Payment Page
  - name: toolkit
    x-displayName: Toolkit
  - name: wallet-balances
    x-displayName: Wallet balances
paths:
  /refunds/{refundId}:
    get:
      tags:
        - refunds
      summary: Check refund status
      operationId: getRefund
      parameters:
        - name: refundId
          in: path
          description: The `refundId` of the refund you want to check the status of.
          required: true
          style: simple
          explode: false
          schema:
            minLength: 36
            maxLength: 36
            type: string
            format: uuid
      responses:
        '200':
          description: Request has been processed by PawaPay
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RefundSearchResult'
              examples:
                COMPLETED:
                  value:
                    - refundId: 8917c345-4791-4285-a416-62f24b6982db
                      status: COMPLETED
                      amount: '123.45'
                      currency: ZMW
                      country: ZMB
                      correspondent: MTN_MOMO_ZMB
                      recipient:
                        type: MSISDN
                        address:
                          value: '260763456789'
                      customerTimestamp: '2020-10-19T08:17:00Z'
                      statementDescription: From ACME company
                      created: '2020-10-19T08:17:01Z'
                      receivedByRecipient: '2020-10-19T08:17:02Z'
                      correspondentIds:
                        SOME_CORRESPONDENT_ID: '12356789'
                      metadata:
                        orderId: ORD-123456789
                        customerId: customer@email.com
                ACCEPTED:
                  value:
                    - refundId: 8917c345-4791-4285-a416-62f24b6982db
                      status: ACCEPTED
                      amount: '123.45'
                      currency: ZMW
                      country: ZMB
                      correspondent: MTN_MOMO_ZMB
                      recipient:
                        type: MSISDN
                        address:
                          value: '260763456789'
                      customerTimestamp: '2020-10-19T08:17:00Z'
                      statementDescription: From ACME company
                      created: '2020-10-19T08:17:01Z'
                      metadata:
                        orderId: ORD-123456789
                        customerId: customer@email.com
                SUBMITTED:
                  value:
                    - refundId: 8917c345-4791-4285-a416-62f24b6982db
                      status: SUBMITTED
                      amount: '123.45'
                      currency: ZMW
                      country: ZMB
                      correspondent: MTN_MOMO_ZMB
                      recipient:
                        type: MSISDN
                        address:
                          value: '260763456789'
                      customerTimestamp: '2020-10-19T08:17:00Z'
                      statementDescription: From ACME company
                      created: '2020-10-19T08:17:01Z'
                      metadata:
                        orderId: ORD-123456789
                        customerId: customer@email.com
                FAILED:
                  value:
                    - refundId: 8917c345-4791-4285-a416-62f24b6982db
                      status: FAILED
                      amount: '123.45'
                      currency: ZMW
                      country: ZMB
                      correspondent: MTN_MOMO_ZMB
                      recipient:
                        type: MSISDN
                        address:
                          value: '260763456789'
                      customerTimestamp: '2020-10-19T08:17:00Z'
                      statementDescription: From ACME company
                      created: '2020-10-19T08:17:01Z'
                      failureReason:
                        failureCode: RECIPIENT_NOT_FOUND
                        failureMessage: Recipient not found
                      metadata:
                        orderId: ORD-123456789
                        customerId: customer@email.com
                Refund Not Found:
                  value: []
        '400':
          description: >-
            Request was rejected due to incompatibility with PawaPay API
            specification
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Mandatory Field Missing:
                  value:
                    errorId: 4f0d5e13-7e88-4cc6-827c-8c0640dc2cd3
                    errorCode: 1
                    errorMessage: Invalid input
        '401':
          description: Authentication Failure. Please check your authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Authentication Failure:
                  value:
                    errorId: cad1529e-040b-4c9d-a21d-2ba3056ff750
                    errorCode: 2
                    errorMessage: Authentication error
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                System Error:
                  value:
                    errorId: d428a89e-fa8b-42b8-ba20-68be20d50af1
                    errorCode: 0
                    errorMessage: Internal error
components:
  schemas:
    RefundSearchResult:
      type: array
      items:
        $ref: '#/components/schemas/Refund'
    ErrorResponse:
      required:
        - errorId
        - errorCode
        - errorMessage
      type: object
      properties:
        errorId:
          maxLength: 36
          type: string
          description: A unique error ID in the PawaPay platform.
          example: 63743264-7292-11ea-bc55-0242ac130003
        errorCode:
          type: integer
          description: PawaPay internal error code.
          example: 1
        errorMessage:
          type: string
          description: Error message.
          example: Internal error
    Refund:
      required:
        - refundId
        - status
        - amount
        - currency
        - country
        - correspondent
        - recipient
        - customerTimestamp
        - created
      type: object
      properties:
        refundId:
          minLength: 36
          maxLength: 36
          type: string
          format: uuid
          description: >-
            A UUIDv4 based ID specified by you, that uniquely identifies the
            refund.
          example: f4401bd2-1568-4140-bf2d-eb77d2b2b639
        status:
          $ref: '#/components/schemas/PayoutStatus'
        amount:
          $ref: '#/components/schemas/Amount'
        currency:
          $ref: '#/components/schemas/Currency'
        country:
          $ref: '#/components/schemas/Country'
        correspondent:
          $ref: '#/components/schemas/Correspondent'
        recipient:
          $ref: '#/components/schemas/FinancialAddress'
        customerTimestamp:
          type: string
          description: >-
            The timestamp for when you initiated the refund process. Format
            defined by 'date-time' in RFC3339 section 5.6 from
            [IETF](https://tools.ietf.org/html/rfc3339#section-5.6)
          format: date-time
          example: '2020-02-21T17:32:28Z'
        statementDescription:
          minLength: 4
          maxLength: 22
          type: string
          pattern: ^[a-zA-Z0-9 ]+$
          description: >
            Short description for the transaction. 

            Depending on the specific MMO performing the transaction this
            message may be visible to the customer in the SMS receipt or within
            their transaction history.


            Must be between **4 and 22 alphanumeric characters**.
          example: Note of 4 to 22 chars
        created:
          type: string
          description: >-
            The timestamp of when the refund was created in the PawaPay
            platform. Format defined by 'date-time' in RFC3339 section 5.6 from
            [IETF](https://tools.ietf.org/html/rfc3339#section-5.6)
          format: date-time
          example: '2020-02-21T17:32:29Z'
        receivedByRecipient:
          type: string
          description: >-
            When the payment was received by the recipient. Format defined by
            'date-time' in RFC3339 section 5.6 from
            [IETF](https://tools.ietf.org/html/rfc3339#section-5.6)
          format: date-time
          example: '2020-02-21T17:32:30Z'
        correspondentIds:
          type: object
          additionalProperties:
            type: string
          description: The financial ids used by the MMO to uniquely identify this payment
          example:
            MTN_INIT: ABC123
            MTN_FINAL: DEF456
        failureReason:
          $ref: '#/components/schemas/RefundFailureReason'
        metadata:
          $ref: '#/components/schemas/TransactionMetadataResponse'
    PayoutStatus:
      type: string
      description: >
        Possible payout statuses: 

        * `ACCEPTED` - The payout request has been **accepted** by PawaPay for
        processing. 

        * `ENQUEUED` - The payout request has been **accepted**, but has been
        enqueued for processing later. Read more about [enqueued
        payouts](/payouts#enqueued-payouts). 

        * `SUBMITTED` - The payout request has been submitted to the MMO and is
        being processed.

        * `COMPLETED` - The payout request has been successfully processed. This
        is a **Final state.**

        * `FAILED` - The payout request has been processed, but failed. **Final
        state.**
      enum:
        - ACCEPTED
        - SUBMITTED
        - ENQUEUED
        - COMPLETED
        - FAILED
    Amount:
      minLength: 1
      maxLength: 23
      type: string
      pattern: ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$
      description: >
        The amount to be collected (deposit) or disbursed (payout or refund). 


        Amount must follow below requirements or the request will be
        **rejected**:

        * Between zero and two decimal places can be supplied, depending on what
        the specific MMO supports. Learn about all [MMO supported decimal
        places](/using_the_api#correspondents).

        * The minimum and maximum amount depends on the limits of the specific
        MMO. You can find them from the [Active
        Configuration](/v1/api-reference/toolkit/active-configuration) endpoint.

        * Leading zeroes are not permitted except where the value is less than
        1. For any value less than one, one and only one leading zero must be
        supplied.

        * Trailing zeroes are permitted.


        Valid examples:

        `5`, `5.0`, `5.00`, `5.5`, `5.55`, `5555555`, `0.5`


        Not valid examples:

        `5.`, `5.555`, `5555555555555555555`, `.5`, `-5.5`, `00.5`, `00.00`,
        `00001.32`
      example: '15'
    Currency:
      type: string
      description: >
        The currency in which the `amount` is specified.


        Format must be the ISO 4217 three character currency code in upper case.
        Read more from
        [Wikipedia](https://en.wikipedia.org/wiki/ISO_4217#Active_codes).


        You can find all the supported currencies that the specific
        `correspondent` supports [from here](/using_the_api#correspondents).


        The [active
        configuration](/v1/api-reference/toolkit/active-configuration) endpoint
        provides the list of correspondents configured for your account together
        with the currencies.
      example: ZMW
    Country:
      type: string
      description: >
        The country in which the MMO operates. 


        Format is ISO 3166-1 alpha-3, three character country code in upper
        case. Read more from
        [Wikipedia](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Officially_assigned_code_elements).
      example: ZMB
    Correspondent:
      type: string
      description: >
        The correspondent code refers to the specific MMO that the specified
        phone number (MSISDN) has an active mobile money wallet with. 


        You can find all the supported correspondents [listed
        here](/using_the_api#correspondents). 


        The [active
        configuration](/v1/api-reference/toolkit/active-configuration) endpoint
        provides the list of correspondents configured for your account.


        You can use the [predict
        correspondent](/v1/api-reference/toolkit/predict-correspondent) enpoint
        to predict the correct correspondent to use based on the phone number
        (MSISDN).
      example: MTN_MOMO_ZMB
    FinancialAddress:
      required:
        - address
        - type
      type: object
      properties:
        type:
          type: string
          description: >-
            The type of financial address. At the moment, only **MSISDN** is
            supported as the financial address. 
          example: MSISDN
          enum:
            - MSISDN
        address:
          $ref: '#/components/schemas/AddressValue'
      description: >-
        The phone number (MSISDN) of the recipient or payer must be specified as
        the `value` of the `address`.
    RefundFailureReason:
      required:
        - failureCode
      type: object
      properties:
        failureCode:
          type: string
          description: >
            Possible refund failure codes: 

            * `BALANCE_INSUFFICIENT` - The PawaPay wallet balance is
            insufficient to proceed with the refund. 

            * `RECIPIENT_NOT_FOUND` - The phone number specified for the
            recipient does not belong to the MMO specified as the
            correspondent. 

            * `RECIPIENT_NOT_ALLOWED_TO_RECEIVE` - The recipient has reached a
            limit on their wallet that stops them from receiving this refund. 

            * `OTHER_ERROR` - Any other error. Please refer to `failureMessage`.
          example: OTHER_ERROR
          enum:
            - BALANCE_INSUFFICIENT
            - RECIPIENT_NOT_FOUND
            - RECIPIENT_NOT_ALLOWED_TO_RECEIVE
            - OTHER_ERROR
        failureMessage:
          type: string
          description: Additional optional failure message
          example: Recipient's address is blocked
    TransactionMetadataResponse:
      description: >
        The metadata that was provided in the original initation request in a
        JSON object format.
      type: object
      properties:
        value of fieldName:
          type: string
          description: >-
            Each passed in metadata field will be a property of the metadata
            JSON object. The key will be the 'fieldName' and the value will be
            'fieldValue'.
      example:
        orderId: ORD-123456789
        customerId: customer@email.com
    AddressValue:
      required:
        - value
      type: object
      properties:
        value:
          $ref: '#/components/schemas/MsisdnValue'
    MsisdnValue:
      type: string
      description: >
        The phone number (MSISDN) of the payer or recipient.

        The format is described in
        [Wikipedia](https://en.wikipedia.org/wiki/MSISDN). 


        MSISDN validation has following rules:
         * Only digits without whitespaces or any other separators or prefixes like '+'.
         * Should not start with zero.
         * Country code is mandatory.
         * Should not exceed or be less than the valid length of specified country.
         
         Valid examples for Zambia:
         `260763456789`
         
         Not valid examples for Zambia:
         `+260763456789`, `260 763 456789`, `260-7634-56789`, `0260763456789`, `2607634567`, `260763456789543`, `999558708954`, `37255870895`
      example: '260763456789'
  securitySchemes:
    bearerAuth:
      type: http
      description: See [Authentication](/using_the_api#authentication).
      scheme: bearer
      bearerFormat: JWT

````