# Cancel a Card Present Payment

This guide explains how to cancel a previously captured payment transaction in a **Card Present (CP)** environment using the Getnet Global API. Cancellations allow you to void a transaction and return the funds to the customer's card.

> **Not captured yet?** To undo an authorization before capture, reverse it instead. No money moves in a reversal. See [Reverse a Card Present Payment](/en/global-api/sep-card-present/payment-guides-cp/reversal-cp).

## Requirements

Before following the steps, you need to:

- **API Credentials**: Obtain your `client_id` and `client_secret` from the Integration Support team.
- **Authentication**: Generate a Bearer token via the [Authentication endpoint](https://docs.globalgetnet.com/en/products/online-payments/regional-api/swagger#tag/authentication).
- **Payment ID**: You must have the `payment_id` returned from the original captured transaction.
- **Payment Method** (optional): The `payment_method` used in the original transaction (e.g., `DIRECT_CREDIT`, `DIRECT_DEBIT`).

## Full vs. Partial Cancellation

The cancel endpoint supports both full and partial cancellations:

| Type | Timing | Behavior |
| --- | --- | --- |
| **Full Cancellation** | Same day or later | The entire transaction amount is returned to the customer. |
| **Partial Cancellation** | **D+1 only** (day after the transaction) | A portion of the transaction amount is returned to the customer. The `amount` field must be less than the original captured amount. |

<Callout type="note">

Partial cancellations are **not allowed on the same day** as the original transaction. They are only available from the day following the transaction (D+1 onwards).

</Callout>

## Card Present Cancellation Process

To cancel a Card Present payment, call the [Cancel Payment endpoint](https://docs.globalgetnet.com/en/products/online-payments/regional-api/swagger#tag/payments/post/dpm/payments-gwproxy/v2/payments/cancel) with the original transaction's `payment_id`.

### Mandatory Attributes

| Attribute | Description | Required |
| --- | --- | --- |
| `idempotency_key` | Unique identifier to prevent duplicate cancellation requests. | **Yes** |
| `payment_id` | The unique ID returned from the original captured payment. | **Yes** |
| `payment_method` | The payment method used in the original transaction. | No |
| `amount` | The amount to cancel in cents. If omitted, the full amount is cancelled. For partial cancellations (D+1 only), set a value less than the original. **Never send this field when you cancel a Cashout transaction.** | No |
| `cancellation_with_cashout` | Defines how much of a Cashout transaction the cancellation reverses. Send it at the root of the request. See [Cancel a Cashout Transaction](#cancel-a-cashout-transaction). | **Yes (Cashout)** |

### Card Present Specific Fields

For Card Present cancellations, you can include the physical card data in the `additional_data.card` object. This allows the gateway to perform additional validation against the original transaction.

| Attribute | Description |
| --- | --- |
| `additional_data.card.number` | The card number from the physical read. |
| `additional_data.card.track2` | Track 2 data from the magnetic stripe or chip read. |
| `additional_data.card.expiration_month` | Two-digit card expiration month. |
| `additional_data.card.expiration_year` | Two-digit card expiration year. |
| `additional_data.currency` | The currency code of the original transaction (e.g., `CLP`, `BRL`). |

### Step 1: Cancel the Payment

#### Example 1: Full Cancellation (Same Day)

Used to void the entire transaction on the same day it was captured.

```bash
curl --request POST \
  --url https://api.pre.globalgetnet.com/dpm/payments-gwproxy/v2/payments/cancel \
  --header 'Authorization: Bearer <YOUR_TOKEN>' \
  --header 'Content-Type: application/json' \
  --data '{
  "idempotency_key": "cancel-cp-001",
  "payment_id": "6137278d-28a6-4293-9343-c73fbb2d9bda",
  "payment_method": "DIRECT_CREDIT",
  "additional_data": {
    "card": {
      "number": "4508830000001759",
      "track2": "4508830000001759=281028102800006930",
      "expiration_month": 10,
      "expiration_year": 28
    },
    "currency": "CLP"
  }
}'
```

#### Example 2: Partial Cancellation (D+1)

Used to cancel a portion of the transaction amount. Only available from the day after the original transaction.

```bash
curl --request POST \
  --url https://api.pre.globalgetnet.com/dpm/payments-gwproxy/v2/payments/cancel \
  --header 'Authorization: Bearer <YOUR_TOKEN>' \
  --header 'Content-Type: application/json' \
  --data '{
  "idempotency_key": "cancel-partial-cp-002",
  "payment_id": "6137278d-28a6-4293-9343-c73fbb2d9bda",
  "payment_method": "DIRECT_CREDIT",
  "amount": 15000,
  "additional_data": {
    "card": {
      "number": "4508830000001759",
      "track2": "4508830000001759=281028102800006930",
      "expiration_month": 10,
      "expiration_year": 28
    },
    "currency": "CLP"
  }
}'
```

### Step 2: Verify the Response

Upon success, the API returns the cancellation confirmation with a `canceled_at` timestamp.

```json
{
  "seller_id": "54f88e68-7764-4e87-8830-756b1e2c02f8",
  "payment_id": "6137278d-28a6-4293-9343-c73fbb2d9bda",
  "status": "CANCELLED",
  "amount": 30960,
  "currency": "CLP",
  "reason_message": "cancelled",
  "canceled_at": "2026-02-19T14:32:10.603Z"
}
```

### Step 3: Check the Payment Status (Optional)

After cancellation, the transaction status changes to `CANCELLED`. You can verify the final state at any time using the [Get Transaction endpoint](https://docs.globalgetnet.com/en/products/online-payments/regional-api/swagger#tag/payment-record-management/get/dpm/hub-payment-info/v1/payments/info/{payment_id}).

## Cancel a Cashout Transaction

A Cashout transaction is a purchase with cash withdrawal, created through the [single-step Cashout flow](/en/global-api/sep-card-present/payment-guides-cp/single-step-payment-cp). Its cancellation contract differs from a standard cancellation.

> **Availability**: Cashout is available for Getnet Argentina (AR) only.

Two rules override the guidance above:

- **Always send `cancellation_with_cashout`** at the root of the request. It is mandatory for a Cashout cancellation.
- **Never send `amount`.** The API derives the reversed value from the flag.

The flag decides how much of the operation is reversed:

| `cancellation_with_cashout` | Reverses | Response `amount` |
| --- | --- | --- |
| `true` | The purchase and the withdrawal | The same value as the `amount` of the original authorization |
| `false` | The purchase only. The cardholder keeps the cash. | The original authorization `amount` minus the `cashout_amount` of the original authorization |

The response also returns `cashout_amount` with the withdrawal amount of the original transaction.

> **Cut-off**: Cashout cancellations follow a 13:00 (AR) cut-off. Send the request before that time.

```bash
curl --request POST \
  --url https://api.pre.globalgetnet.com/dpm/payments-gwproxy/v2/payments/cancel \
  --header 'Authorization: Bearer <YOUR_TOKEN>' \
  --header 'Content-Type: application/json' \
  --data '{
  "idempotency_key": "cancel-cashout-cp-003",
  "payment_id": "53e1255e-a044-4eb6-85af-1c7f181868f8",
  "payment_method": "DIRECT_DEBIT",
  "cancellation_with_cashout": true
}'
```

## Next Steps

Now that you know how to cancel payments, explore these related Card Present features:

- **[Single-Step Payments](/en/global-api/sep-card-present/payment-guides-cp/single-step-payment-cp)**: Process standard chip and magnetic stripe sales.
- **[Pre-authorized Payments](/en/global-api/sep-card-present/payment-guides-cp/pre-auth-payment-cp)**: Manage two-step flows for reservations and delayed captures.
- **[Installment Payments](/en/global-api/sep-card-present/payment-guides-cp/installment-payments-cp)**: Offer splitting the purchase price into multiple payments at the terminal.
- **[Reverse a Card Present Payment](/en/global-api/sep-card-present/payment-guides-cp/reversal-cp)**: Undo an authorization before it is captured.