> ## 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.

# Initiate Cashback Withdrawal

> Allows a customer to withdraw their available cashback balance from their cashback account to their bank account. The customer must have sufficient cashback balance to cover the withdrawal amount. The endpoint supports payouts to bank accounts or PayIDs and requires payout method details. Webhook notifications can be configured to receive updates on the withdrawal status.




## OpenAPI

````yaml /api/openapi/cashback-reference.yaml post /v2/cashbacks/withdraw
openapi: 3.0.3
info:
  title: Cashback APIs
  description: >-
    ## Introduction

    The Cashback API Solution offers a streamlined way for developers to manage
    cashback campaigns, account activations, and withdrawals, providing a
    seamless user experience.

    ### Key Features

    - **Campaign Management**:
      - **Get Cashback Campaign List**: Retrieve a list of all available cashback campaigns.
      - **Get Campaign Configurations**: Retrieve detailed configurations for specific cashback campaigns.

    - **User Cashback Management**:
      - **Activate User's Cashback Account**: Activate a cashback account for a user.
      - **Initiate Cashback Delivery**: Initiate the delivery of cashback to a user.
      - **Initiate Cashback Withdrawal**: Begin the process of withdrawing cashback to a user's account.

    - **User Information**:
      - **Get User List**: Retrieve a list of users with cashback accounts.

    This documentation provides detailed guidance for integrating these
    capabilities into your application.
  version: 2.0.0
  termsOfService: https://helloclever.co/terms
  contact:
    email: support@helloclever.co
servers:
  - url: https://api.cleverhub.co/api
    description: Sandbox Environment
  - url: https://api-merchant.helloclever.co/api
    description: Production Environment
security: []
paths:
  /v2/cashbacks/withdraw:
    post:
      tags:
        - Cashback
      summary: Initiate Cashback Withdrawal
      description: >
        Allows a customer to withdraw their available cashback balance from
        their cashback account to their bank account. The customer must have
        sufficient cashback balance to cover the withdrawal amount. The endpoint
        supports payouts to bank accounts or PayIDs and requires payout method
        details. Webhook notifications can be configured to receive updates on
        the withdrawal status.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - user_id
                - client_transaction_id
                - cashback_transaction_detail
                - webhook_notification
              properties:
                user_id:
                  type: string
                  description: The unique identifier of the customer withdrawing cashback.
                  example: 8GAVZZKTI3
                client_transaction_id:
                  type: string
                  description: >-
                    A unique identifier for the transaction on the client's side
                    to prevent duplicates.
                  example: withdraw_r15e23
                cashback_transaction_detail:
                  type: object
                  required:
                    - amount
                    - payout_method_name
                    - payout_method_params
                  description: Contains details for processing the cashback payout.
                  properties:
                    payment_description:
                      type: string
                      description: A description for the withdrawal transaction.
                      example: Withdrawal to bank account
                    currency:
                      type: string
                      description: >-
                        The currency code for the payout, following ISO 4217
                        standards. Default is "AUD".
                      example: AUD
                    amount:
                      type: integer
                      description: >-
                        The amount of cashback to be paid out, in minor units
                        (e.g., 1000 for $10.00).
                      example: 1000
                    payout_method_name:
                      type: string
                      description: >-
                        The payout method used. Currently supports
                        "au_bank_npp_aud" for bank transfers or
                        "au_payid_npp_aud" for PayID transfers.
                      enum:
                        - au_bank_npp_aud
                        - au_payid_npp_aud
                      example: au_bank_npp_aud
                    payout_method_params:
                      type: object
                      description: Parameters required for the selected payout method.
                      oneOf:
                        - description: >-
                            Parameters for bank transfer using BSB and account
                            number.
                          required:
                            - bsb
                            - account_number
                          properties:
                            bsb:
                              type: string
                              description: Bank-State-Branch code for the Australian bank.
                              example: '572505'
                            account_number:
                              type: string
                              description: The customer's bank account number.
                              example: '76273288'
                        - description: Parameters for PayID transfer.
                          required:
                            - payid
                            - payid_type
                          properties:
                            payid:
                              type: string
                              description: The customer's PayID.
                              example: payout@helloclever.co
                            payid_type:
                              type: string
                              description: The type of PayID used ("email" or "phone").
                              enum:
                                - email
                                - phone
                              example: email
                webhook_notification:
                  type: object
                  required:
                    - endpoint_url
                    - authorization_headers
                  description: >-
                    Webhook notification details for callback after processing
                    the payout.
                  properties:
                    endpoint_url:
                      type: string
                      format: uri
                      description: The URL where the webhook notification will be sent.
                      example: https://merchant.example.com/webhook
                    authorization_headers:
                      type: string
                      description: >-
                        Authorization headers for securing the webhook
                        notification.
                      example: Bearer your_token
      responses:
        '200':
          description: Withdrawal initiated successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  transaction_type:
                    type: string
                    description: >-
                      Specifies the type of transaction ("money_out" for
                      withdrawal).
                    example: money_out
                  withdrawal_id:
                    type: string
                    description: The unique identifier for this withdrawal transaction.
                    example: HQ2GGUO7
                  client_transaction_id:
                    type: string
                    description: The client's unique transaction identifier.
                    example: r15e23
                  merchant_name:
                    type: string
                    description: The name of the merchant associated with the withdrawal.
                    example: Hello Clever
                  site_name:
                    type: string
                    description: The name of the site where the withdrawal is processed.
                    example: Cashback
                  customer_id:
                    type: string
                    description: >-
                      The unique identifier of the customer withdrawing
                      cashback.
                    example: 8GAVZZKTI3
                  amount:
                    type: number
                    format: float
                    description: The amount of cashback withdrawn, in major units.
                    example: 10
                  withdrawal_method:
                    type: string
                    description: >-
                      The method used for the withdrawal (e.g.,
                      "au_bank_npp_aud").
                    example: au_bank_npp_aud
                  status:
                    type: string
                    description: >-
                      The current status of the transaction (e.g.,
                      "processing").
                    example: processing
                  created_at:
                    type: string
                    format: date-time
                    description: The timestamp when the transaction was created.
                    example: '2024-11-07T02:32:42.200Z'
                  updated_at:
                    type: string
                    format: date-time
                    description: The timestamp when the transaction was last updated.
                    example: '2024-11-07T02:32:42.231Z'
                  payout_method_params:
                    type: object
                    description: The parameters used for the payout method.
                    oneOf:
                      - properties:
                          bsb:
                            type: string
                            description: The BSB number for the bank account.
                            example: '572505'
                          account_number:
                            type: string
                            description: The account number for the bank account.
                            example: '76273288'
                      - properties:
                          payid:
                            type: string
                            description: The PayID used for the payout.
                            example: payout@helloclever.co
                          payid_type:
                            type: string
                            description: The type of PayID ("email" or "phone").
                            example: email
                  webhook_notification:
                    type: object
                    description: >-
                      Details for webhook notification after the transaction is
                      processed.
                    properties:
                      endpoint_url:
                        type: string
                        format: uri
                        description: The URL where the webhook notification will be sent.
                        example: https://merchant.example.com/webhook
                      authorization_header:
                        type: string
                        description: >-
                          The authorization header used in the webhook
                          notification.
                        example: Bearer your_token
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
      callbacks:
        cashbackWithdrawalCallback:
          '{$request.body#/webhook_notification/endpoint_url}':
            post:
              summary: Callback When Cashback Withdrawal Status Changes
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      type: object
                      properties:
                        transaction_type:
                          type: string
                          description: The type of transaction ("money_out").
                        withdrawal_id:
                          type: string
                          description: >-
                            The unique identifier for the withdrawal
                            transaction.
                        client_transaction_id:
                          type: string
                          description: The client's transaction identifier.
                        merchant_name:
                          type: string
                          description: The merchant's name.
                        site_name:
                          type: string
                          description: The site name.
                        customer_id:
                          type: string
                          description: The customer's unique identifier.
                        amount:
                          type: number
                          format: float
                          description: The amount withdrawn.
                        withdrawal_method:
                          type: string
                          description: The method used for withdrawal.
                        status:
                          type: string
                          description: >-
                            The status of the transaction ("settled" or
                            "failed").
                        created_at:
                          type: string
                          format: date-time
                          description: The timestamp when the transaction was created.
                        updated_at:
                          type: string
                          format: date-time
                          description: The timestamp when the transaction was last updated.
                        payout_method_params:
                          type: object
                          description: The parameters used for the payout method.
                          oneOf:
                            - properties:
                                bsb:
                                  type: string
                                  description: The BSB number for the bank account.
                                account_number:
                                  type: string
                                  description: The account number for the bank account.
                            - properties:
                                payid:
                                  type: string
                                  description: The PayID used for the payout.
                                payid_type:
                                  type: string
                                  description: The type of PayID ("email" or "phone").
                        webhook_notification:
                          type: object
                          description: >-
                            Details for webhook notification after the
                            transaction is processed.
                          properties:
                            endpoint_url:
                              type: string
                              format: uri
                              description: The webhook endpoint URL.
                            authorization_header:
                              type: string
                              description: The authorization header for the webhook.
              responses:
                '200':
                  description: Callback received successfully.
                '400':
                  description: Bad Request
                '401':
                  description: Unauthorized
              method: post
              type: path
            path: '{$request.body#/webhook_notification/endpoint_url}'
      security:
        - app-id: []
          secret-key: []
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

- [Drive Loyalty with Cashback Campaigns](/developer-reference/api-use-cases/drive-loyalty-with-cashback-campaigns.md)
- [Initiate Cashback Delivery](/api/cashback/initiate-cashback-delivery.md)
- [Cashback API Overview](/api/cashback/overview.md)
