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

# Create a payment refund

> Creates a refund for previous payment



## OpenAPI

````yaml /swagger.json post /Payment/Refund/{paymentRequestId}
openapi: 3.0.4
info:
  title: SynchPay API
  version: v1
servers:
  - url: https://api.trysynch.com
    description: Sandbox
  - url: https://api.synchpay.com
    description: Production
security:
  - Bearer: []
paths:
  /Payment/Refund/{paymentRequestId}:
    post:
      tags:
        - Payment
      summary: Create a payment refund
      description: Creates a refund for previous payment
      parameters:
        - name: paymentRequestId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefundPaymentRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/RefundPaymentRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/RefundPaymentRequest'
      responses:
        '200':
          description: OK
components:
  schemas:
    RefundPaymentRequest:
      type: object
      properties:
        amount:
          type: integer
          format: int32
        description:
          type: string
          nullable: true
        attachment:
          $ref: '#/components/schemas/Attachment'
      additionalProperties: false
    Attachment:
      type: object
      properties:
        fileName:
          type: string
        fileData:
          type: string
        fileType:
          type: string
      additionalProperties: false
  securitySchemes:
    Bearer:
      type: http
      description: "JWT Authorization header using the Bearer scheme. \r\n                        Use `/auth/token` to obtain access token. \r\n                        Enter 'Bearer' [space] and then your token in the text input below. \r\n                        Example: 'Bearer eyJhbGci...'"
      scheme: bearer
      bearerFormat: JWT

````