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

# Create a Refund

> Partially or fully initiate a refund on a preauth charge



## OpenAPI

````yaml post /charges/{flw_ref}/refund
openapi: 3.0.0
info:
  title: Flutterwave v3
  description: >-
    The Flutterwave for Business(F4B) APIs collection for all v3 endpoints with
    pre-formatted requests and response examples.
  contact: {}
  version: '1.0'
servers:
  - url: https://api.flutterwave.com/v3
    variables: {}
security:
  - bearer: []
tags:
  - name: Charges
    description: >-
      The charge APIs includes several payment collection methods to help you
      collect payments.
  - name: Tokenized Charges
    description: Tokenize your customers' cards with Flutterwave for faster payments
  - name: Preauthorization
    description: Manage preauth attemps on card transactions
  - name: Transactions
    description: Manage transactions, query statuses, logs and fees
  - name: Transfers
    description: Transfers to local and international customers
  - name: Beneficiaries
    description: Manage transfer beneficiaries
  - name: Virtual Cards
    description: Manage Flutterwave virtual cards
  - name: Virtual Account Numbers
    description: Manage virtual accounts
  - name: Collection Subaccounts
    description: Manage Collection Subaccounts
  - name: Payout Subaccounts
    description: Manage Payout Subaccounts
  - name: Subscriptions
    description: Manage user subscriptions
  - name: Payment Plans
    description: Manage Payment Plans
  - name: Bill Payments
    description: Manage Bill Payments
  - name: Banks
    description: Fetch Bank Information
  - name: Misc
    description: >-
      Verify user information like bank verification numbers, card bins, account
      information
  - name: Settlements
    description: Manage your settlements
  - name: Otps
    description: Create and manage one time passwords (OTPs) for your applications
  - name: Chargebacks
    description: Manage Chargebacks
paths:
  /charges/{flw_ref}/refund:
    post:
      tags:
        - Preauthorization
      summary: Create a Refund
      description: Partially or fully initiate a refund on a preauth charge
      operationId: CreateaRefund
      parameters:
        - name: flw_ref
          in: path
          description: ''
          required: true
          style: simple
          schema:
            type: string
            example: FLW-MOCK-PREAUTH-bde14443c3f233d11c5f574acc120399
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CreateaRefundRequest'
                - example:
                    amount: '100'
            example:
              amount: '100'
        required: true
      responses:
        '200':
          description: OK
          headers:
            Date:
              content:
                text/plain:
                  schema:
                    type: string
                  example: Mon, 18 Mar 2024 10:19:41 GMT
            Content-Length:
              content:
                text/plain:
                  schema:
                    type: string
                  example: '969'
            Connection:
              content:
                text/plain:
                  schema:
                    type: string
                  example: keep-alive
            Server:
              content:
                text/plain:
                  schema:
                    type: string
                  example: nginx/1.24.0
            Access-Control-Allow-Origin:
              content:
                text/plain:
                  schema:
                    type: string
                  example: '*'
            Access-Control-Allow-Headers:
              content:
                text/plain:
                  schema:
                    type: string
                  example: >-
                    Origin, X-Requested-With, Content-Type, Accept,
                    Authorization, v3-xapp-id, flw-auth-token, mra-auth-token,
                    alt_mode_auth, mid, altmodeauth, cc-admin-token, x-flw-lang
            Access-Control-Allow-Methods:
              content:
                text/plain:
                  schema:
                    type: string
                  example: PUT, POST, GET, DELETE, OPTIONS
            ETag:
              content:
                text/plain:
                  schema:
                    type: string
                  example: W/"3c9-koj1tkiehJSNVvMtXHVqTA"
            Strict-Transport-Security:
              content:
                text/plain:
                  schema:
                    type: string
                  example: max-age=31536000; includeSubDomains; preload; always;
          content:
            application/json; charset=utf-8:
              schema:
                allOf:
                  - $ref: '#/components/schemas/CreateaRefund-success'
                  - example:
                      status: success
                      message: Charge refunded
                      data:
                        id: 4973363
                        tx_ref: YOUR_UNIQUE_REFERENCE
                        flw_ref: FLW-MOCK-PREAUTH-bde14443c3f233d11c5f574acc120399
                        device_fingerprint: N/A
                        amount: 100
                        charged_amount: 100
                        app_fee: 5.8
                        merchant_fee: 0
                        processor_response: Approved
                        auth_model: NOAUTH
                        currency: NGN
                        ip: 54.75.161.64
                        narration: 'FLW-PBF CARD Transaction '
                        status: successful
                        auth_url: N/A
                        payment_type: card
                        plan: null
                        fraud_status: ok
                        charge_type: preauth
                        created_at: '2024-03-18T10:18:56.000Z'
                        account_id: 20937
                        customer:
                          id: 2373852
                          phone: null
                          fullName: Anonymous customer
                          customertoken: null
                          email: developers@flutterwavego.com
                          createdAt: '2024-03-18T10:18:56.000Z'
                          updatedAt: '2024-03-18T10:18:56.000Z'
                          deletedAt: null
                          AccountId: 20937
                        card:
                          first_6digits: '537728'
                          last_4digits: '7450'
                          issuer: MASTERCARD JSB PROBUSINESSBANK CREDITGOLD
                          country: RU
                          type: MASTERCARD
                          expiry: 09/31
              example:
                status: success
                message: Charge refunded
                data:
                  id: 4973363
                  tx_ref: YOUR_UNIQUE_REFERENCE
                  flw_ref: FLW-MOCK-PREAUTH-bde14443c3f233d11c5f574acc120399
                  device_fingerprint: N/A
                  amount: 100
                  charged_amount: 100
                  app_fee: 5.8
                  merchant_fee: 0
                  processor_response: Approved
                  auth_model: NOAUTH
                  currency: NGN
                  ip: 54.75.161.64
                  narration: 'FLW-PBF CARD Transaction '
                  status: successful
                  auth_url: N/A
                  payment_type: card
                  plan: null
                  fraud_status: ok
                  charge_type: preauth
                  created_at: '2024-03-18T10:18:56.000Z'
                  account_id: 20937
                  customer:
                    id: 2373852
                    phone: null
                    fullName: Anonymous customer
                    customertoken: null
                    email: developers@flutterwavego.com
                    createdAt: '2024-03-18T10:18:56.000Z'
                    updatedAt: '2024-03-18T10:18:56.000Z'
                    deletedAt: null
                    AccountId: 20937
                  card:
                    first_6digits: '537728'
                    last_4digits: '7450'
                    issuer: MASTERCARD JSB PROBUSINESSBANK CREDITGOLD
                    country: RU
                    type: MASTERCARD
                    expiry: 09/31
        '400':
          description: Bad Request
          headers:
            Date:
              content:
                text/plain:
                  schema:
                    type: string
                  example: Thu, 28 Mar 2024 08:29:20 GMT
            Content-Length:
              content:
                text/plain:
                  schema:
                    type: string
                  example: '101'
            Connection:
              content:
                text/plain:
                  schema:
                    type: string
                  example: keep-alive
            Server:
              content:
                text/plain:
                  schema:
                    type: string
                  example: nginx/1.24.0
            Access-Control-Allow-Origin:
              content:
                text/plain:
                  schema:
                    type: string
                  example: '*'
            Access-Control-Allow-Headers:
              content:
                text/plain:
                  schema:
                    type: string
                  example: >-
                    Origin, X-Requested-With, Content-Type, Accept,
                    Authorization, v3-xapp-id, flw-auth-token, mra-auth-token,
                    alt_mode_auth, mid, altmodeauth, cc-admin-token, x-flw-lang
            Access-Control-Allow-Methods:
              content:
                text/plain:
                  schema:
                    type: string
                  example: PUT, POST, GET, DELETE, OPTIONS
            ETag:
              content:
                text/plain:
                  schema:
                    type: string
                  example: W/"65-1M0bRoYXaYrXia6GSiFaqQ"
          content:
            application/json; charset=utf-8:
              schema:
                allOf:
                  - $ref: '#/components/schemas/CreateaRefund-error1'
                  - example:
                      status: error
                      message: >-
                        Error: Cannot refund non-existent/unauthorized
                        transaction
                      data: null
              example:
                status: error
                message: 'Error: Cannot refund non-existent/unauthorized transaction'
                data: null
      deprecated: false
components:
  schemas:
    CreateaRefundRequest:
      title: CreateaRefundRequest
      required:
        - amount
      type: object
      properties:
        amount:
          type: string
      example:
        amount: '100'
    CreateaRefund-success:
      title: CreateaRefund-success
      required:
        - status
        - message
        - data
      type: object
      properties:
        status:
          type: string
        message:
          type: string
        data:
          $ref: '#/components/schemas/Data19'
      example:
        status: success
        message: Charge refunded
        data:
          id: 4973363
          tx_ref: YOUR_UNIQUE_REFERENCE
          flw_ref: FLW-MOCK-PREAUTH-bde14443c3f233d11c5f574acc120399
          device_fingerprint: N/A
          amount: 100
          charged_amount: 100
          app_fee: 5.8
          merchant_fee: 0
          processor_response: Approved
          auth_model: NOAUTH
          currency: NGN
          ip: 54.75.161.64
          narration: 'FLW-PBF CARD Transaction '
          status: successful
          auth_url: N/A
          payment_type: card
          plan: null
          fraud_status: ok
          charge_type: preauth
          created_at: '2024-03-18T10:18:56.000Z'
          account_id: 20937
          customer:
            id: 2373852
            phone: null
            fullName: Anonymous customer
            customertoken: null
            email: developers@flutterwavego.com
            createdAt: '2024-03-18T10:18:56.000Z'
            updatedAt: '2024-03-18T10:18:56.000Z'
            deletedAt: null
            AccountId: 20937
          card:
            first_6digits: '537728'
            last_4digits: '7450'
            issuer: MASTERCARD JSB PROBUSINESSBANK CREDITGOLD
            country: RU
            type: MASTERCARD
            expiry: 09/31
    CreateaRefund-error1:
      title: CreateaRefund-error1
      required:
        - status
        - message
        - data
      type: object
      properties:
        status:
          type: string
        message:
          type: string
        data:
          type: string
          nullable: true
      example:
        status: error
        message: 'Error: Cannot refund non-existent/unauthorized transaction'
        data: null
    Data19:
      title: Data19
      required:
        - id
        - tx_ref
        - flw_ref
        - device_fingerprint
        - amount
        - charged_amount
        - app_fee
        - merchant_fee
        - processor_response
        - auth_model
        - currency
        - ip
        - narration
        - status
        - auth_url
        - payment_type
        - plan
        - fraud_status
        - charge_type
        - created_at
        - account_id
        - customer
        - card
      type: object
      properties:
        id:
          type: integer
          format: int32
        tx_ref:
          type: string
        flw_ref:
          type: string
        device_fingerprint:
          type: string
        amount:
          type: integer
          format: int32
        charged_amount:
          type: integer
          format: int32
        app_fee:
          type: number
        merchant_fee:
          type: integer
          format: int32
        processor_response:
          type: string
        auth_model:
          type: string
        currency:
          type: string
        ip:
          type: string
        narration:
          type: string
        status:
          type: string
        auth_url:
          type: string
        payment_type:
          type: string
        plan:
          type: string
          nullable: true
        fraud_status:
          type: string
        charge_type:
          type: string
        created_at:
          type: string
        account_id:
          type: integer
          format: int32
        customer:
          $ref: '#/components/schemas/Customer16'
        card:
          $ref: '#/components/schemas/Card'
      example:
        id: 4973363
        tx_ref: YOUR_UNIQUE_REFERENCE
        flw_ref: FLW-MOCK-PREAUTH-bde14443c3f233d11c5f574acc120399
        device_fingerprint: N/A
        amount: 100
        charged_amount: 100
        app_fee: 5.8
        merchant_fee: 0
        processor_response: Approved
        auth_model: NOAUTH
        currency: NGN
        ip: 54.75.161.64
        narration: 'FLW-PBF CARD Transaction '
        status: successful
        auth_url: N/A
        payment_type: card
        plan: null
        fraud_status: ok
        charge_type: preauth
        created_at: '2024-03-18T10:18:56.000Z'
        account_id: 20937
        customer:
          id: 2373852
          phone: null
          fullName: Anonymous customer
          customertoken: null
          email: developers@flutterwavego.com
          createdAt: '2024-03-18T10:18:56.000Z'
          updatedAt: '2024-03-18T10:18:56.000Z'
          deletedAt: null
          AccountId: 20937
        card:
          first_6digits: '537728'
          last_4digits: '7450'
          issuer: MASTERCARD JSB PROBUSINESSBANK CREDITGOLD
          country: RU
          type: MASTERCARD
          expiry: 09/31
    Customer16:
      title: Customer16
      required:
        - id
        - phone
        - fullName
        - customertoken
        - email
        - createdAt
        - updatedAt
        - deletedAt
        - AccountId
      type: object
      properties:
        id:
          type: integer
          format: int32
        phone:
          type: string
          nullable: true
        fullName:
          type: string
        customertoken:
          type: string
          nullable: true
        email:
          type: string
        createdAt:
          type: string
        updatedAt:
          type: string
        deletedAt:
          type: string
          nullable: true
        AccountId:
          type: integer
          format: int32
      example:
        id: 2373852
        phone: null
        fullName: Anonymous customer
        customertoken: null
        email: developers@flutterwavego.com
        createdAt: '2024-03-18T10:18:56.000Z'
        updatedAt: '2024-03-18T10:18:56.000Z'
        deletedAt: null
        AccountId: 20937
    Card:
      title: Card
      required:
        - first_6digits
        - last_4digits
        - issuer
        - country
        - type
        - expiry
      type: object
      properties:
        first_6digits:
          type: string
        last_4digits:
          type: string
        issuer:
          type: string
        country:
          type: string
        type:
          type: string
        expiry:
          type: string
      example:
        first_6digits: '553188'
        last_4digits: '2950'
        issuer: MASTERCARD  CREDIT
        country: NG
        type: MASTERCARD
        expiry: 09/32
  securitySchemes:
    bearer:
      type: http
      scheme: bearer

````