> ## Documentation Index
> Fetch the complete documentation index at: https://developers.bonifiq.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

# Removes an already applied cashback from a checkout.

> Use this endpoint when your integration needs to explicitly undo a checkout cashback redeem before the order is created.
Depending on the platform integration, BonifiQ also cancels the underlying redeem after removing the cashback from the checkout.
            
## When to use
Call this endpoint when the shopper manually removes the cashback, abandons the checkout flow or when your platform decides the cashback should no longer be used.
            
## Input parameters
- `CustomerId` (required): Customer identifier used by your store, such as e-mail or CPF/document.
- `CheckoutId` (required): Platform checkout/cart identifier from which the cashback should be removed.
- `Total` (optional): Current checkout total. Use it when the integration requires the caller to send the latest total explicitly.
            
## Response envelope
The endpoint returns `BaseExternalApiResponse<CheckoutRemoveCashbackResponse>`.
- `Code`: two-digit business code for the final outcome.
- `CodeName`: enum name associated with `Code`.
- `Severity`: `Success`, `Warning` or `Error`.
- `HasError`: `true` only for request/validation failures that should be treated as an API error.
- `HasWarning`: `true` when the request is valid but there is nothing to remove or the outcome is only informational.
- `Result.Success`: `true` when the cashback was effectively removed.
- `Result.CustomerMessage`: human-readable message describing the final state.
            
## Business outcomes
A valid request may still return `Severity = Warning`.
This is expected when:
- the checkout does not exist
- the checkout exists but no cashback is currently applied
            
## Validation errors
Invalid requests return `400 Bad Request` with `Severity = Error`.
This happens when the customer cannot be identified or the `CheckoutId` is missing.
            
## Response codes
- `01 / CustomerNotFound / Error`: the informed customer could not be found.
- `02 / CheckoutIdRequired / Error`: the request did not include `CheckoutId`.
- `03 / CheckoutNotFound / Warning`: the checkout was not found in the platform.
- `04 / CashbackNotApplied / Warning`: the checkout exists but no cashback is currently applied.
- `07 / CashbackRemovedSuccessfully / Success`: the cashback was removed successfully.



## OpenAPI

````yaml https://api.bonifiq.com.br/swagger/Private%20APIs/swagger.json post /v1/pvt/Checkout/redeem/remove
openapi: 3.0.0
info:
  title: BonifiQ Private APIs
  description: >-
    # Introduction 

    This is the BonifiQ Private APIs documentation. With these endpoints you can
    interact with BonifiQ systems and enhance your program points.


    # Limitations

    These endpoints are intended to be used in backend communication so they are
    not CORS-compatible and cannot be used by in-browser frontend libraries
    (such as React, Angular, Vue, jQuery, etc)


    If are required to call BonifiQ API from a browser, please refer to our
    [Public APIs](https://api.bonifiq.com.br/apidocs/public)


    # Authentication

    These Private APis use the [Basic
    Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication)
    scheme. You need both an API Token (Username) and API Key (Password) to use
    with it


    You can generate this key pair in BonifiQ admin panel, at the "API Keys"
    menu.


    # How to use this page

    ## Making calls

    You can simulate, test and make calls to API from this Swagger page. To do
    that:

    - Click on the **Authorize** button

    - Inform the Username (API Token) and Passwoird (API Key) and click on
    **Authorize**

    - From the list bellow, choose an API call and click on **Try it out**

    - Inform the required parameters (if any) and click on **Execute**


    ## Verifying requests and responses bodies

    In every API Call there is an explanation of what each field means, theirs
    types and accepted values for all Requests and Responses.


    To view this information, just go to any API Call bellow and in the
    Responses section, click on the Schema.
  version: 1.0.0
servers:
  - url: https://api.bonifiq.com.br
security: []
tags:
  - name: POS
    description: >-
      Flow methods to integrate BonifiQ with a POS system. Check the Flow
      Documentation link on the right
    externalDocs:
      description: Flow Documentation
      url: >-
        https://suporte.bonifiq.com.br/support/solutions/articles/159000319538-integrar-com-pdv
  - name: Checkout
    description: Operations related to checkout cashback redeem, refresh and removal
  - name: Customization
    description: Retrieve customizations for the loyalty program
  - name: Rewards
    description: Interact with rewards already redeemed
paths:
  /v1/pvt/Checkout/redeem/remove:
    post:
      tags:
        - Checkout
      summary: Removes an already applied cashback from a checkout.
      description: >-
        Use this endpoint when your integration needs to explicitly undo a
        checkout cashback redeem before the order is created.

        Depending on the platform integration, BonifiQ also cancels the
        underlying redeem after removing the cashback from the checkout.
                    
        ## When to use

        Call this endpoint when the shopper manually removes the cashback,
        abandons the checkout flow or when your platform decides the cashback
        should no longer be used.
                    
        ## Input parameters

        - `CustomerId` (required): Customer identifier used by your store, such
        as e-mail or CPF/document.

        - `CheckoutId` (required): Platform checkout/cart identifier from which
        the cashback should be removed.

        - `Total` (optional): Current checkout total. Use it when the
        integration requires the caller to send the latest total explicitly.
                    
        ## Response envelope

        The endpoint returns
        `BaseExternalApiResponse<CheckoutRemoveCashbackResponse>`.

        - `Code`: two-digit business code for the final outcome.

        - `CodeName`: enum name associated with `Code`.

        - `Severity`: `Success`, `Warning` or `Error`.

        - `HasError`: `true` only for request/validation failures that should be
        treated as an API error.

        - `HasWarning`: `true` when the request is valid but there is nothing to
        remove or the outcome is only informational.

        - `Result.Success`: `true` when the cashback was effectively removed.

        - `Result.CustomerMessage`: human-readable message describing the final
        state.
                    
        ## Business outcomes

        A valid request may still return `Severity = Warning`.

        This is expected when:

        - the checkout does not exist

        - the checkout exists but no cashback is currently applied
                    
        ## Validation errors

        Invalid requests return `400 Bad Request` with `Severity = Error`.

        This happens when the customer cannot be identified or the `CheckoutId`
        is missing.
                    
        ## Response codes

        - `01 / CustomerNotFound / Error`: the informed customer could not be
        found.

        - `02 / CheckoutIdRequired / Error`: the request did not include
        `CheckoutId`.

        - `03 / CheckoutNotFound / Warning`: the checkout was not found in the
        platform.

        - `04 / CashbackNotApplied / Warning`: the checkout exists but no
        cashback is currently applied.

        - `07 / CashbackRemovedSuccessfully / Success`: the cashback was removed
        successfully.
      operationId: Checkout_RemoveRedeemPost
      requestBody:
        x-name: request
        description: Customer and checkout information used to remove the cashback.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExternalApiCheckoutActionRequest'
        required: true
        x-position: 1
      responses:
        '200':
          description: >-
            A checkout removal response with business code, severity and removal
            outcome.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/BaseExternalApiResponseOfCheckoutRemoveCashbackResponse
      security:
        - Basic Authentication: []
components:
  schemas:
    ExternalApiCheckoutActionRequest:
      type: object
      description: >-
        Request payload for checkout actions that need both customer
        identification and checkout reference.
      additionalProperties: false
      properties:
        CustomerId:
          type: string
          description: >-
            Required customer identifier used by the merchant platform, such as
            e-mail or CPF/document.
        CheckoutId:
          type: string
          description: Required checkout or cart identifier from the e-commerce platform.
        Total:
          type: number
          description: >-
            Optional current checkout total value.

            Send this only when the platform integration needs the caller to
            provide the latest checkout amount explicitly.
          format: decimal
          nullable: true
    BaseExternalApiResponseOfCheckoutRemoveCashbackResponse:
      type: object
      description: Standard response envelope used by the External API.
      additionalProperties: false
      properties:
        ErrorMessage:
          type: string
          description: >-
            Error message returned when the request fails validation or
            processing.

            For warnings and successful responses, consumers should usually
            inspect `Result`, `Code` and `Severity` first.
          nullable: true
        ErrorCode:
          type: integer
          description: >-
            Legacy numeric error code derived from internal API errors when
            available.

            This field is relevant only for error flows that use
            `ApiResponseErrorDescription`.
          format: int32
          nullable: true
        Result:
          description: Business payload returned by the endpoint.
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/CheckoutRemoveCashbackResponse'
        Code:
          type: string
          description: >-
            Endpoint-specific business code formatted as a two-digit string,
            such as `03` or `07`.

            This field is available for success, warning and error outcomes.
          nullable: true
        CodeName:
          type: string
          description: >-
            Symbolic enum name associated with `Code`, such as
            `CheckoutNotFound`.
          nullable: true
        Severity:
          description: >-
            Final severity of the response.

            `Success` means the action completed as expected, `Warning` means
            the request was valid but the business outcome is informational or
            non-ideal, and `Error` means the request should be treated as a
            failure.
          oneOf:
            - $ref: '#/components/schemas/ExternalApiResponseSeverity'
        HasWarning:
          type: boolean
          description: >-
            Convenience flag that is `true` when `Severity` is `Warning`.

            Warnings are valid `200 OK` business outcomes and should not be
            handled as transport or validation errors.
        HasError:
          type: boolean
          description: >-
            Indicates whether the request failed and should be handled as an
            error response.

            This flag is reserved for real API errors; warnings must keep this
            property as `false`.
    CheckoutRemoveCashbackResponse:
      type: object
      additionalProperties: false
      properties:
        Success:
          type: boolean
        CustomerMessage:
          type: string
    ExternalApiResponseSeverity:
      type: integer
      description: |-
        0 = Success
        1 = Warning
        2 = Error
      x-enumNames:
        - Success
        - Warning
        - Error
      enum:
        - 0
        - 1
        - 2
  securitySchemes:
    Basic Authentication:
      type: http
      description: Use API Basic Auth Keys
      name: Basic Authentication
      in: header
      scheme: basic

````