Getnet DocsGetnet Docs

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.

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.
  • 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:

TypeTimingBehavior
Full CancellationSame day or laterThe entire transaction amount is returned to the customer.
Partial CancellationD+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.

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

Card Present Cancellation Process

To cancel a Card Present payment, call the Cancel Payment endpoint with the original transaction’s payment_id.

Mandatory Attributes

AttributeDescriptionRequired
idempotency_keyUnique identifier to prevent duplicate cancellation requests.Yes
payment_idThe unique ID returned from the original captured payment.Yes
payment_methodThe payment method used in the original transaction.No
amountThe 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_cashoutDefines how much of a Cashout transaction the cancellation reverses. Send it at the root of the request. See 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.

AttributeDescription
additional_data.card.numberThe card number from the physical read.
additional_data.card.track2Track 2 data from the magnetic stripe or chip read.
additional_data.card.expiration_monthTwo-digit card expiration month.
additional_data.card.expiration_yearTwo-digit card expiration year.
additional_data.currencyThe 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.

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.

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.

{
  "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.

Cancel a Cashout Transaction

A Cashout transaction is a purchase with cash withdrawal, created through the single-step Cashout flow. 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_cashoutReversesResponse amount
trueThe purchase and the withdrawalThe same value as the amount of the original authorization
falseThe 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.

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: