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

# Refund Payment

> This endpoint refunds a captured card payment. You can refund either the full amount or a partial amount.

⚠️ You can only refund payments with `waiting` and `received` status.

⚠️ If `refund_amount` is not provided, the full amount will be refunded by default.




## OpenAPI

````yaml /api/openapi/card-reference.yaml post /v2/cards/refund_payment
openapi: 3.0.2
info:
  title: Card APIs
  description: >
    ---

    ## Overview


    The Hello Clever Card APIs offer a secure and streamlined way to accept and
    manage card payments. With simple endpoints for creating charges, capturing
    funds, and issuing refunds, you can build payment flows that integrate
    cleanly into your system.


    **Integration Methods**

    Choose the integration approach that best fits your architecture and
    compliance needs:


    - **SDK Integration (Client-side)**
      **Supported currencies**: USD and AUD.
      Designed for web and mobile frontends. Integrate the Hello Clever JavaScript SDK to manage payment creation and frontend interactions through a lightweight, drop-in flow.

      > 💡 See the **[SDK Documentation](/guides/sdk-integration)** section below for setup, initialisation, payment creation, and callback handling.

    - **Server-to-Server (S2S) Integration (Server-side)**
      **Supported currency**: AUD.
      Intended for PCI DSS–compliant backend systems. This approach lets you submit raw card information (`card_info`) directly from your server to Hello Clever’s APIs, giving you full control over authorisation, capture, and other server-side payment operations.

      > 💡 See the **[S2S Documentation](/guides/s2s-integration)** section below for endpoint specs, authentication steps, and example payloads.

    Both methods share the same payment lifecycle, including authorisation, 3DS
    authentication, capture, refunds, and webhook notifications, ensuring
    consistent behaviour across SDK and S2S integrations.
  version: 1.0.0
  termsOfService: https://helloclever.co/terms
  contact:
    email: support@helloclever.co
servers:
  - url: https://sandbox-api.lightningpay.me/api
    description: Sandbox Environment
  - url: https://api.lightningpay.me/api
    description: Production Environment
security:
  - app-id: []
    secret-key: []
tags:
  - name: SDK Integration
    description: Integration guide for accepting card payments using JavaScript SDK
  - name: Cards
    description: >
      APIs to manage the entire card payment flow — from creation to refund —
      for full control over your checkout and post-purchase experience.


      **Supported use cases:**

      - Create card payments

      - Show payment status

      - Cancel or void payments (cancel full amount)

      - Partially or fully refund payments

      - Capture pre-authorised payments(full amount)


      **Additional features:**

      - Webhook notifications on payment status changes

      - Post-purchase payment flows for upsell scenarios


      Ideal for partners integrating custom checkout, upsell pages, or payment
      reconciliation flows.
paths:
  /v2/cards/refund_payment:
    post:
      tags:
        - Cards
      summary: Refund Payment
      description: >
        This endpoint refunds a captured card payment. You can refund either the
        full amount or a partial amount.


        ⚠️ You can only refund payments with `waiting` and `received` status.


        ⚠️ If `refund_amount` is not provided, the full amount will be refunded
        by default.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - uuid
                - reason
              properties:
                uuid:
                  type: string
                  description: The unique ID of the succeeded payment (e.g., `VMMAOTFQ`).
                  example: PSADT5CE
                refund_amount:
                  type: number
                  description: >-
                    The amount to be refunded. If this is not specified, the
                    refund will default to the total original payment amount.
                  example: 50
                reason:
                  type: string
                  description: >-
                    The reason for the refund, which must be at least 5
                    characters long. This is required for record-keeping and can
                    help in cases of partial refunds.
                  example: Partial refund due to customer request
      responses:
        '200':
          description: Refund successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  total_amount:
                    type: number
                    example: 200
                  refund_amount:
                    type: number
                    example: 50
                  description:
                    type: string
                    example: Testing refund
                  payin_request:
                    type: object
                    properties:
                      uuid:
                        type: string
                        example: 7PPPMXIGH
                      name:
                        type: string
                        example: Testing
                      email:
                        type: string
                        example: test@example.com
                      external_id:
                        type: string
                        example: wc_order_6C1hcvg4T7Pom
                      status:
                        type: string
                        enum:
                          - pending
                          - authorised
                          - received
                          - refunded
                          - failed
                          - canceled
                          - waiting
                        example: waiting
                      pay_code:
                        type: string
                        nullable: true
                        example: null
                      currency:
                        type: string
                        example: USD
                      amount:
                        type: number
                        example: 10000
                      total:
                        type: number
                        example: 10000
                      paid_amount:
                        type: number
                        example: 0
                      is_refundable:
                        type: boolean
                        example: true
                      payment_method:
                        type: string
                        example: card
                      expired_at:
                        type: string
                        example: ''
                      webhook_notification:
                        type: object
                        properties:
                          endpoint_url:
                            type: string
                            example: >-
                              https://webhook.site/456adb8f-4407-4bce-90fe-2c431db19696
                          authorization_header:
                            type: string
                            example: '****'
                      sender_details:
                        type: object
                        properties:
                          card:
                            type: object
                            properties:
                              card_type:
                                type: string
                                example: card
                              card_brand:
                                type: string
                                example: visa
                              card_last_4:
                                type: string
                                example: '4242'
                              card_country:
                                type: string
                                example: US
                              card_token_id:
                                type: string
                                example: card_LLXE799U
                      created_at:
                        type: string
                        format: date-time
                        example: 2025-05-28T04:22:21.567+0000
              example:
                total_amount: 200
                refund_amount: 50
                description: Testing refund
                payin_request:
                  uuid: PSADT5CE
                  name: Hello Clever
                  email: test@example.com
                  external_id: order_test_01
                  status: return_pending
                  pay_code: null
                  currency: USD
                  amount: '200.0'
                  total: '200.0'
                  paid_amount: '0.0'
                  is_refundable: false
                  payment_method: card
                  expired_at: ''
                  webhook_notification:
                    endpoint_url: https://webhook.site/12da7803-c4cf-4f32-812d-aaeaecf20d9d
                    authorization_header: '****'
                  sender_details:
                    card:
                      card_type: card
                      card_brand: visa
                      card_last_4: '1111'
                      card_country: US
                  created_at: 2025-05-29T01:29:16.826+0000
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
              example:
                errors:
                  code: REQUIRE_LOGIN
                  message: Not Authorised
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    properties:
                      message:
                        type: string
              example:
                errors:
                  message: Reason must greater than 5 characters.
components:
  securitySchemes:
    app-id:
      type: apiKey
      in: header
      name: app-id
      description: |
        A unique identifier assigned to each application.
    secret-key:
      type: apiKey
      in: header
      name: secret-key
      description: |
        A secure token associated with the `app-id`.

````

## Related topics

- [Refund Payment](/api/aud-payid/refund-payment.md)
- [Issue and Manage Card Payments](/developer-reference/api-use-cases/issue-and-manage-cards.md)
- [Managing Payins in the Merchant Portal](/portal/payins.md)
