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

# Refund a payment

> Issue a full refund for a payment, identified by its transaction ID. The full remaining refundable amount is resolved automatically. Returns `pending` when the payment provider confirms the refund asynchronously.



## OpenAPI

````yaml post /v1/refunds
openapi: 3.0.0
info:
  title: Creem API
  description: >-
    Creem is an all-in-one platform for managing subscriptions and recurring
    revenue, tailored specifically for today's SaaS companies. It enables you to
    boost revenue, enhance customer retention, and scale your operations
    seamlessly.
  version: v1
  contact:
    name: Creem Support
    url: https://creem.io
    email: support@creem.io
  license:
    name: Commercial
    url: https://creem.io/terms
  termsOfService: https://creem.io/terms
servers:
  - url: https://api.creem.io
    description: Production — live API for processing real transactions and data.
    x-speakeasy-server-id: prod
  - url: https://test-api.creem.io
    description: Test — sandbox API for development and testing with no real charges.
    x-speakeasy-server-id: test
security: []
tags: []
externalDocs:
  description: Creem Documentation
  url: https://docs.creem.io
paths:
  /v1/refunds:
    post:
      tags:
        - Refunds
      summary: Refund a payment
      description: >-
        Issue a full refund for a payment, identified by its transaction ID. The
        full remaining refundable amount is resolved automatically. Returns
        `pending` when the payment provider confirms the refund asynchronously.
      operationId: refundPayment
      parameters: []
      requestBody:
        required: true
        description: The transaction to refund in full.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRefundRequestEntity'
      responses:
        '200':
          description: Successfully created the refund
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RefundResponseEntity'
        '400':
          description: Bad Request - Invalid input parameters
        '401':
          description: Unauthorized - Invalid or missing API key
        '404':
          description: Not Found - Resource does not exist
      security:
        - ApiKey: []
components:
  schemas:
    CreateRefundRequestEntity:
      type: object
      properties:
        transaction_id:
          type: string
          description: The unique identifier of the transaction to refund in full.
          example: tran_1234567890
      required:
        - transaction_id
    RefundResponseEntity:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/RefundStatus'
          example: succeeded
      required:
        - status
    RefundStatus:
      type: string
      description: >-
        Status of the refund. `pending` and `requiresAction` represent
        non-terminal provider processing states.
      enum:
        - pending
        - requiresAction
        - succeeded
        - failed
        - canceled
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. You can find your API key in the Creem
        dashboard under Settings > API Keys.

````