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

# Create a Refund

> Refund a payment. Omit `amount` for a full refund.



## OpenAPI

````yaml POST /v1/refunds
openapi: 3.1.0
info:
  title: Plexos Pay API
  description: Mobile Money Payment Gateway for African Markets
  version: 1.0.0
  contact:
    name: Plexos Pay
    url: https://plexospay.com
servers:
  - url: https://api.plexospay.com
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/refunds:
    post:
      tags:
        - Refunds
      summary: Create a refund
      description: Refund a payment. Omit `amount` for a full refund.
      operationId: createRefund
      parameters:
        - name: Idempotency-Key
          in: header
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - paymentIntentId
              properties:
                paymentIntentId:
                  type: string
                amount:
                  type: integer
                  description: Partial refund amount in centavos (omit for full refund)
                reason:
                  type: string
                metadata:
                  $ref: '#/components/schemas/Metadata'
      responses:
        '200':
          description: Refund created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refund'
components:
  schemas:
    Metadata:
      type: object
      additionalProperties: true
      description: Arbitrary key-value metadata (max 50 keys)
      nullable: true
    Refund:
      type: object
      properties:
        id:
          type: string
          example: re_abc123
        paymentIntentId:
          type: string
        amount:
          type: string
        currency:
          $ref: '#/components/schemas/Currency'
        status:
          $ref: '#/components/schemas/RefundStatus'
        reason:
          type: string
          nullable: true
        failureCode:
          type: string
          nullable: true
        failureMessage:
          type: string
          nullable: true
        operatorRefundId:
          type: string
          nullable: true
        metadata:
          $ref: '#/components/schemas/Metadata'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Currency:
      type: string
      enum:
        - CVE
        - AOA
      description: ISO currency code
    RefundStatus:
      type: string
      enum:
        - PENDING
        - PROCESSING
        - SUCCEEDED
        - FAILED
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key starting with `sk_live_` or `sk_test_`

````