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

# Refund Request

> Refund an amount by order, either partial or in full. An example use-case is when an order was captured but the customer returned item(s) that requires them to be refunded.

<Danger>
  You are viewing Version 1 of the Sezzle API. Check out the [current version](/docs/api/intro)!
</Danger>


## OpenAPI

````yaml post /v1/orders/{order_reference_id}/refund
openapi: 3.1.0
info:
  title: Sezzle API v2
  description: >-
    This Sezzle API is for merchants who want to accept Sezzle as a payment
    option
  termsOfService: https://legal.sezzle.com
  version: 2.0.0
  x-logo:
    url: https://media.sezzle.com/branding/2.0/png/Logo_WhiteWordmark_500x126.png
    backgroundColor: '#392558'
servers:
  - url: https://sandbox.gateway.sezzle.com
    description: development server, usa, ca
  - url: https://gateway.sezzle.com
    description: production server, usa, ca
security:
  - Bearer: []
externalDocs:
  description: Sezzle API guides and tutorials
  url: https://docs.sezzle.com/sezzle-integration
paths:
  /v1/orders/{order_reference_id}/refund:
    post:
      tags:
        - v1
        - Orders
      summary: Refund Request
      description: >-
        Refund an amount by order, either partial or in full. An example
        use-case is when an order was captured but the customer returned item(s)
        that requires them to be refunded.
      operationId: post-refund-v1
      parameters:
        - name: order_reference_id
          in: path
          description: The Order Reference ID to update
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - amount
              properties:
                refund_id:
                  type: string
                  description: UUID for the Refund. Must be unique to a Merchant
                amount:
                  $ref: '#/components/schemas/Price'
                  description: >-
                    A price object that defines the amount to be refunded.
                    Amount may not be 0, negative, or exceed the total order
                    amount. Currency must either be the order’s currency or the
                    customer’s paying currency. This field is optional if the
                    is_full_refund parameter is true.
                refund_reason:
                  type: string
                  description: A reason for the refund
                is_full_refund:
                  type: boolean
                  description: >-
                    Overrides amount. If true, the order will be fully refunded.
                    If omitted, will default to false.
            example:
              refund_id: 41a2O9Lv-7
              amount:
                amount_in_cents: 500
                currency: USD
              refund_reason: Item returned by user
      responses:
        '200':
          description: Successful Operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  amount:
                    $ref: '#/components/schemas/Price'
                    description: ''
                  refund_id:
                    type: string
                    description: The refund ID provided in the request
                  refund_reason:
                    type: string
                    description: The refund reason provided in the request
              example:
                amount:
                  amount_in_cents: 500
                  currency: USD
                refund_id: 41a2O9Lv-7
                refund_reason: Item returned by user
        '400':
          $ref: '#/components/responses/BadRequestV1'
          example:
            status: 400
            id: bad_request
            message: bad request
        '401':
          $ref: '#/components/responses/UnauthorizedV1'
          example:
            status: 401
            id: Unauthorized
            message: authorization not accepted
        '404':
          $ref: '#/components/responses/NotFoundV1'
          example:
            status: 404
            id: invalid
            message: not found
        '422':
          $ref: '#/components/responses/UnprocessableV1'
          example:
            status: 422
            id: invalid
            message: Unprocessable entity
components:
  schemas:
    Price:
      allOf:
        - $ref: '#/components/schemas/PriceBase'
        - type: object
          required:
            - amount_in_cents
            - currency
    PriceBase:
      type: object
      properties:
        amount_in_cents:
          type: integer
          description: The amount in cents
        currency:
          type: string
          description: The 3 character currency code as defined by ISO 4217
    ErrorV1:
      type: object
      properties:
        status:
          type: number
          description: Matches the HTTP Status code of the response
        id:
          type: string
          description: >-
            A programmatic identifier for the error. These rarely (if at all)
            change.
        message:
          type: string
          description: >-
            A human-friendly string. These may change, and are intended to
            assist in debugging rather than program logic.
  responses:
    BadRequestV1:
      description: Invalid request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorV1'
          example:
            status: 400
            id: bad_request
            message: bad request
    UnauthorizedV1:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorV1'
          example:
            status: 401
            id: unauthorized
            message: authorization not accepted
    NotFoundV1:
      description: The specified resource was not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorV1'
          example:
            status: 404
            id: record_not_found
            message: not found
    UnprocessableV1:
      description: Unable to process the request entity
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorV1'
          example:
            status: 422
            id: invalid
            message: Unprocessable entity
  securitySchemes:
    Bearer:
      type: apiKey
      name: Authorization
      in: header
      description: >-
        The authentication token generated from providing API Keys to Sezzle
        Gateway

````