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

# Return Sale

> Return Sale



## OpenAPI

````yaml post /order/sales-return
openapi: 3.0.3
info:
  title: Fractal
  version: 1.0.0
  contact: {}
servers:
  - url: https://testapi.fractalpay.com/api/v1
    description: Sandbox
  - url: https://api.fractalpay.com/api/v1
    description: Production
security: []
tags:
  - name: Merchant Onboarding
  - name: Payment Collection Methods
  - name: Requests
  - name: Preauthorizations
  - name: Customers
  - name: Charging Customer
  - name: Transactions
paths:
  /order/sales-return:
    post:
      tags:
        - Transactions
      summary: Return Sale
      description: >-
        Issues a partial or full refund against a completed card transaction.
        Partial refunds can be applied multiple times as long as the cumulative
        amount does not exceed the original charge. If the refund amount equals
        the original amount and the transaction is older than 24 hours, a void
        is performed automatically. Fires a payment.refund webhook on success.
      operationId: returnSale
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - amount
                - merchant_key
                - transaction_id
              properties:
                merchant_key:
                  type: string
                  description: The merchant's unique API key.
                  example: '{{merchant_key}}'
                transaction_id:
                  type: string
                  description: >-
                    The pos_guid of the original completed transaction to
                    refund. Must have is_status = 2 (completed).
                  example: txn_a7f0b5340a
                amount:
                  type: string
                  description: >-
                    Amount to refund. Must not exceed the original transaction
                    amount or the remaining refundable balance.
                  example: '1.00'
                sub_merchant_key:
                  type: string
                  description: Sub-merchant key, if applicable.
                  example: ''
            examples:
              Partial Refund:
                value:
                  merchant_key: '{{merchant_key}}'
                  transaction_id: txn_a7f0b5340a
                  amount: '1.00'
      responses:
        '200':
          description: Refund processed successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Transaction refunded successfully
                  data:
                    type: object
                    properties:
                      sales_id:
                        type: string
                        description: ID of the new refund record.
                        example: txn_a8f83189a5
                      order_createdfrom:
                        type: string
                        description: Source of the original order.
                        example: API
                      amount:
                        type: number
                        description: Amount refunded.
                        example: 1
                      txn_id:
                        type: string
                        description: Gateway-level transaction reference ID.
                        example: txn_lyWexIP9z2MJkrBBtscY
                      txn_date:
                        type: string
                        format: date-time
                        description: Timestamp of the refund.
                        example: '2026-06-15T19:13:03.000Z'
                      linked_txn_id:
                        type: string
                        description: ID of the original transaction that was refunded.
                        example: txn_a7f0b5340a
                      transaction_id:
                        type: string
                        description: Same as sales_id — the refund record ID.
                        example: txn_a8f83189a5
                      Status:
                        type: string
                        description: Result of the refund operation.
                        example: Success
                      type:
                        type: string
                        description: Always Refund.
                        example: Refund
        '400':
          description: Refund failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Amount should not be greater than sales charge amount.
              examples:
                Transaction not found:
                  value:
                    result: false
                    message: Payment method not found.
                Amount exceeds original:
                  value:
                    result: false
                    message: Amount should not be greater than sales charge amount.
                Amount exceeds remaining:
                  value:
                    result: false
                    message: >-
                      The amount should not be greater than the remaining
                      amount.
                Already fully refunded:
                  value:
                    result: false
                    message: Refund already done. No refund allowed.
      security:
        - basicAuth: []
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: |-
        Use your Fractal API credentials.

        Username = Client ID
        Password = Secret Key

        Sandbox credentials can be generated from the Test Portal.

````