Getnet DocsGetnet Docs

Cancel

POST/dpm/payments-gwproxy/v2/payments/cancel

Cancel a Payment

The Cancel endpoint allows merchants to cancel a payment, ensuring that the transaction amount is refunded to the customer. To undo a Card Present authorization that is not captured yet, use Reversal instead.

Select the example that matches your integration on the right panel:

  • Credit/Debit refund — cancels a credit or debit payment. Omit amount for a full cancel; include it for a partial cancel (D+1 only).
  • Standard PIX refund — reverses a PIX payment using payment_id and amount.
  • PIX refund with Split — distributes the refund across subsellers using additional_data.split.subseller_list_payment.
  • Cashout cancel — reverses a purchase with cash withdrawal. The root-level cancellation_with_cashout is mandatory and amount must be omitted. The response returns the reversed value in amount and the original withdrawal value in cashout_amount. Getnet Argentina (AR) only.

Usage Scenarios:

  • Voiding a payment made by mistake.
  • Handling order cancellations that require a full refund._

Notes:

  • The cancellation process may vary depending on the payment method and issuer.
  • Some transactions may require additional processing time before the funds are returned to the customer._

Body application/json

idempotency_keystring<(a-Z | 0-9 | .-_)>required

Idempotency key, used to control requests, must be unique per request, because if it is repeated, it will always be returned the same data.

request_idstring<uuid>

Request identifier. Unique for each request.

payment_idstring<uuid>required

Payment identifier

safe_reversalboolean

Indicates whether the cancellation is a safe reversal of a transaction denied by the EC Credenciador (merchant/creditor). When set to true, signals that the reversal is authorized even when the original transaction was denied. Optional field. [R261.8]

cancellation_with_cashoutboolean

Defines how much of a Cashout transaction (purchase with cash withdrawal) the cancellation reverses. Send it at the root of the cancellation request. Mandatory when you cancel a Cashout transaction. Getnet Argentina (AR) only.

Set it to true to reverse the whole operation: purchase and withdrawal. Set it to false to reverse the purchase only and leave the withdrawal with the cardholder.

Do not send amount together with this field. The response returns the reversed value in amount and the original withdrawal value in cashout_amount.

Cashout cancellations follow a 13:00 (AR) cut-off, so send the request before that time.

additional_dataobject

Additional cancellation data.

Show additional_data properties
splitobject

Data for split payment. Required field for payment split.

Show split properties
subseller_list_paymentobject[]required

List of Stores and their due amounts for payment.

Show subseller_list_payment properties
subseller_idstringrequired

Subseller ID registered on the marketplace platform (MGM).

document_type"CPF" | "CNPJ"

Sub-trade document type.

document_numberstringrequired

Sub-trade document number without punctuation. (without mask)

subseller_sale_amountintegerrequired

Part of the Store Value in relation to the Order (in cents).

itemsobject[]required

List of Subtrade items.

Show items properties
idstringrequired

Item/Product Identifier.

descriptionstringrequired

Item/Product Description.

currencystring

Currency identification code for the item.

amountintegerrequired

Item/Product value (in cents).

transaction_rate_percentnumber

Fee to be charged on the item in percentage if not send the rate will be set the same as the registration.
If transaction_rate_percent is informed, the transaction_rate_amount should not be sent.
Note: If transaction_rate_percent and transaction_rate_amount are sent for the same item the values ​​will be added together.

transaction_rate_amountinteger

Fee to be charged on the item in value (in cents) if you do not send the fee will be set the same as the registration.
If transaction_rate_amount is informed, the transaction_rate_percent must not be sent.
Note: If transaction_rate_percent and transaction_rate_amount are sent to the same item the values ​​will be added.

payment_planinteger

Subseller Payment Plan.

cardobject

Only for Card Present

Show card properties
track1string

Track 1 field

track2string

Track 2 field

numberstring

Card number.

expiration_monthinteger<int32>

Two-digit card expiration month.

expiration_yearinteger<int32>

Two-digit card expiration year.

currencystring

Currency identification (See code in this section).

amountinteger<int32>

Value (less than or equal) of the purchase in cents. Partial cancellation (of lower value) is allowed only from the day following the transaction (D+N)

Do not send this field when you cancel a Cashout transaction. Send cancellation_with_cashout instead, and the API derives the reversed value.

payment_method"CREDIT" | "DEBIT" | "CREDIT_AUTHORIZATION" | "CREDIT_PRE_AUTHORIZATION" | "DIRECT_CREDIT" | "DIRECT_CREDIT_AUTHORIZATION" | "DIRECT_CREDIT_PRE_AUTHORIZATION" | "DIRECT_DEBIT" | "PIX"
custom_keystring

Customer key used to identify a cancellation request. (Key must be unique per transaction).

Response

Transaction executed successfully.

idempotency_keystring<(a-Z | 0-9 | .-_)>

Idempotency key, used to control requests, must be unique per request, because if it is repeated, it will always be returned the same data.

seller_idstring<uuid>

ECommerce identification code

request_idstring<uuid>

Request identifier. Unique for each request.

payment_idstring<uuid>

Payment identifier

order_idstring

Purchase identification code used by e-commerce (code or order number).

amountinteger

Value reversed by the cancellation, in cents.

For a Cashout cancellation, the value depends on cancellation_with_cashout. When you sent true, amount matches the amount of the original authorization. When you sent false, amount is the original authorization amount minus the data.cashout.cashout_amount you sent on that authorization.

cashout_amountinteger<int32>

Cash withdrawal amount of the original transaction, in cents. Returned when the cancellation carries cancellation_with_cashout. Getnet Argentina (AR) only.

currencystring

Currency identification (See code in this section).

status"CANCELED" | "REFUNDED" | "DENIED" | "ERROR"

Cancel Status

reason_codestring

Return code from the sender or the getnet capture system.

reason_messagestring

Return message from the sender or the getnet capture system.

canceled_atstring

Cancellation date

custom_keystring

Customer key used to identify a cancellation request. (Key must be unique per transaction).

Invalid Requisition

messagestring

Detailed error message.

namestring

Name of the module or system in which the error occurred.

status_codeinteger<int32>

HTTP status code of the error.

detailsobject[]

Error details.

Show details properties
statusstring

Error situation.

error_codestring

Error code.

descriptionstring

Description of the error.

description_detailstring

Detailed description of the error.

brandstring

Brand.

payment_idstring

payment_id.

seller_idstring

seller_id.

amountstring

amount.

currencystring

currency.

order_idstring

order_id.

credit_cancelobject

credit_cancel.

Show credit_cancel properties
canceled_atstring

canceledAt.

messagestring

message.

payment_tagstring

payment_tag.

status_codestring

statusCode.

messagestring

message.

namestring

name.

acquirer_transaction_idstring

acquirer_transaction_id.

authorization_codestring

authorization_code.

transaction_idstring

transaction_id.

reason_codestring

reason_code.

reason_messagestring

reason_message.

merchant_advice_codestring

merchant_advice_code.

paymentsobject[]

Error details.

Show payments properties
statusstring

Error situation.

error_codestring

Error code.

descriptionstring

Description of the error.

description_detailstring

Detailed description of the error.

brandstring

Brand.

payment_idstring

payment_id.

seller_idstring

seller_id.

amountstring

amount.

currencystring

currency.

order_idstring

order_id.

credit_cancelobject

credit_cancel.

Show credit_cancel properties
canceled_atstring

canceledAt.

messagestring

message.

payment_tagstring

payment_tag.

status_codestring

statusCode.

messagestring

message.

namestring

name.

acquirer_transaction_idstring

acquirer_transaction_id.

authorization_codestring

authorization_code.

transaction_idstring

transaction_id.

reason_codestring

reason_code.

reason_messagestring

reason_message.

merchant_advice_codestring

merchant_advice_code.

combined_idstring

combinedId.

order_idstring

orderId.

seller_idstring

sellerId.

Invalid Authentication

messagestring

Detailed error message.

namestring

Name of the module or system in which the error occurred.

status_codeinteger<int32>

HTTP status code of the error.

detailsobject[]

Error details.

Show details properties
statusstring

Error situation.

error_codestring

Error code.

descriptionstring

Description of the error.

description_detailstring

Detailed description of the error.

brandstring

Brand.

payment_idstring

payment_id.

seller_idstring

seller_id.

amountstring

amount.

currencystring

currency.

order_idstring

order_id.

credit_cancelobject

credit_cancel.

Show credit_cancel properties
canceled_atstring

canceledAt.

messagestring

message.

payment_tagstring

payment_tag.

status_codestring

statusCode.

messagestring

message.

namestring

name.

acquirer_transaction_idstring

acquirer_transaction_id.

authorization_codestring

authorization_code.

transaction_idstring

transaction_id.

reason_codestring

reason_code.

reason_messagestring

reason_message.

merchant_advice_codestring

merchant_advice_code.

paymentsobject[]

Error details.

Show payments properties
statusstring

Error situation.

error_codestring

Error code.

descriptionstring

Description of the error.

description_detailstring

Detailed description of the error.

brandstring

Brand.

payment_idstring

payment_id.

seller_idstring

seller_id.

amountstring

amount.

currencystring

currency.

order_idstring

order_id.

credit_cancelobject

credit_cancel.

Show credit_cancel properties
canceled_atstring

canceledAt.

messagestring

message.

payment_tagstring

payment_tag.

status_codestring

statusCode.

messagestring

message.

namestring

name.

acquirer_transaction_idstring

acquirer_transaction_id.

authorization_codestring

authorization_code.

transaction_idstring

transaction_id.

reason_codestring

reason_code.

reason_messagestring

reason_message.

merchant_advice_codestring

merchant_advice_code.

combined_idstring

combinedId.

order_idstring

orderId.

seller_idstring

sellerId.

Not Found

messagestring

Detailed error message.

namestring

Name of the module or system in which the error occurred.

status_codeinteger<int32>

HTTP status code of the error.

detailsobject[]

Error details.

Show details properties
statusstring

Error situation.

error_codestring

Error code.

descriptionstring

Description of the error.

description_detailstring

Detailed description of the error.

brandstring

Brand.

payment_idstring

payment_id.

seller_idstring

seller_id.

amountstring

amount.

currencystring

currency.

order_idstring

order_id.

credit_cancelobject

credit_cancel.

Show credit_cancel properties
canceled_atstring

canceledAt.

messagestring

message.

payment_tagstring

payment_tag.

status_codestring

statusCode.

messagestring

message.

namestring

name.

acquirer_transaction_idstring

acquirer_transaction_id.

authorization_codestring

authorization_code.

transaction_idstring

transaction_id.

reason_codestring

reason_code.

reason_messagestring

reason_message.

merchant_advice_codestring

merchant_advice_code.

paymentsobject[]

Error details.

Show payments properties
statusstring

Error situation.

error_codestring

Error code.

descriptionstring

Description of the error.

description_detailstring

Detailed description of the error.

brandstring

Brand.

payment_idstring

payment_id.

seller_idstring

seller_id.

amountstring

amount.

currencystring

currency.

order_idstring

order_id.

credit_cancelobject

credit_cancel.

Show credit_cancel properties
canceled_atstring

canceledAt.

messagestring

message.

payment_tagstring

payment_tag.

status_codestring

statusCode.

messagestring

message.

namestring

name.

acquirer_transaction_idstring

acquirer_transaction_id.

authorization_codestring

authorization_code.

transaction_idstring

transaction_id.

reason_codestring

reason_code.

reason_messagestring

reason_message.

merchant_advice_codestring

merchant_advice_code.

combined_idstring

combinedId.

order_idstring

orderId.

seller_idstring

sellerId.

Unprocessable Entity

messagestring

Detailed error message.

namestring

Name of the module or system in which the error occurred.

status_codeinteger<int32>

HTTP status code of the error.

detailsobject[]

Error details.

Show details properties
statusstring

Error situation.

error_codestring

Error code.

descriptionstring

Description of the error.

description_detailstring

Detailed description of the error.

brandstring

Brand.

payment_idstring

payment_id.

seller_idstring

seller_id.

amountstring

amount.

currencystring

currency.

order_idstring

order_id.

credit_cancelobject

credit_cancel.

Show credit_cancel properties
canceled_atstring

canceledAt.

messagestring

message.

payment_tagstring

payment_tag.

status_codestring

statusCode.

messagestring

message.

namestring

name.

acquirer_transaction_idstring

acquirer_transaction_id.

authorization_codestring

authorization_code.

transaction_idstring

transaction_id.

reason_codestring

reason_code.

reason_messagestring

reason_message.

merchant_advice_codestring

merchant_advice_code.

paymentsobject[]

Error details.

Show payments properties
statusstring

Error situation.

error_codestring

Error code.

descriptionstring

Description of the error.

description_detailstring

Detailed description of the error.

brandstring

Brand.

payment_idstring

payment_id.

seller_idstring

seller_id.

amountstring

amount.

currencystring

currency.

order_idstring

order_id.

credit_cancelobject

credit_cancel.

Show credit_cancel properties
canceled_atstring

canceledAt.

messagestring

message.

payment_tagstring

payment_tag.

status_codestring

statusCode.

messagestring

message.

namestring

name.

acquirer_transaction_idstring

acquirer_transaction_id.

authorization_codestring

authorization_code.

transaction_idstring

transaction_id.

reason_codestring

reason_code.

reason_messagestring

reason_message.

merchant_advice_codestring

merchant_advice_code.

combined_idstring

combinedId.

order_idstring

orderId.

seller_idstring

sellerId.

Unprocessable Entity

messagestring

Detailed error message.

namestring

Name of the module or system in which the error occurred.

status_codeinteger<int32>

HTTP status code of the error.

detailsobject[]

Error details.

Show details properties
statusstring

Error situation.

error_codestring

Error code.

descriptionstring

Description of the error.

description_detailstring

Detailed description of the error.

brandstring

Brand.

payment_idstring

payment_id.

seller_idstring

seller_id.

amountstring

amount.

currencystring

currency.

order_idstring

order_id.

credit_cancelobject

credit_cancel.

Show credit_cancel properties
canceled_atstring

canceledAt.

messagestring

message.

payment_tagstring

payment_tag.

status_codestring

statusCode.

messagestring

message.

namestring

name.

acquirer_transaction_idstring

acquirer_transaction_id.

authorization_codestring

authorization_code.

transaction_idstring

transaction_id.

reason_codestring

reason_code.

reason_messagestring

reason_message.

merchant_advice_codestring

merchant_advice_code.

paymentsobject[]

Error details.

Show payments properties
statusstring

Error situation.

error_codestring

Error code.

descriptionstring

Description of the error.

description_detailstring

Detailed description of the error.

brandstring

Brand.

payment_idstring

payment_id.

seller_idstring

seller_id.

amountstring

amount.

currencystring

currency.

order_idstring

order_id.

credit_cancelobject

credit_cancel.

Show credit_cancel properties
canceled_atstring

canceledAt.

messagestring

message.

payment_tagstring

payment_tag.

status_codestring

statusCode.

messagestring

message.

namestring

name.

acquirer_transaction_idstring

acquirer_transaction_id.

authorization_codestring

authorization_code.

transaction_idstring

transaction_id.

reason_codestring

reason_code.

reason_messagestring

reason_message.

merchant_advice_codestring

merchant_advice_code.

combined_idstring

combinedId.

order_idstring

orderId.

seller_idstring

sellerId.

Internal server or service error

messagestring

Detailed error message.

namestring

Name of the module or system in which the error occurred.

status_codeinteger<int32>

HTTP status code of the error.

detailsobject[]

Error details.

Show details properties
statusstring

Error situation.

error_codestring

Error code.

descriptionstring

Description of the error.

description_detailstring

Detailed description of the error.

brandstring

Brand.

payment_idstring

payment_id.

seller_idstring

seller_id.

amountstring

amount.

currencystring

currency.

order_idstring

order_id.

credit_cancelobject

credit_cancel.

Show credit_cancel properties
canceled_atstring

canceledAt.

messagestring

message.

payment_tagstring

payment_tag.

status_codestring

statusCode.

messagestring

message.

namestring

name.

acquirer_transaction_idstring

acquirer_transaction_id.

authorization_codestring

authorization_code.

transaction_idstring

transaction_id.

reason_codestring

reason_code.

reason_messagestring

reason_message.

merchant_advice_codestring

merchant_advice_code.

paymentsobject[]

Error details.

Show payments properties
statusstring

Error situation.

error_codestring

Error code.

descriptionstring

Description of the error.

description_detailstring

Detailed description of the error.

brandstring

Brand.

payment_idstring

payment_id.

seller_idstring

seller_id.

amountstring

amount.

currencystring

currency.

order_idstring

order_id.

credit_cancelobject

credit_cancel.

Show credit_cancel properties
canceled_atstring

canceledAt.

messagestring

message.

payment_tagstring

payment_tag.

status_codestring

statusCode.

messagestring

message.

namestring

name.

acquirer_transaction_idstring

acquirer_transaction_id.

authorization_codestring

authorization_code.

transaction_idstring

transaction_id.

reason_codestring

reason_code.

reason_messagestring

reason_message.

merchant_advice_codestring

merchant_advice_code.

combined_idstring

combinedId.

order_idstring

orderId.

seller_idstring

sellerId.

Internal server or service error

messagestring

Detailed error message.

namestring

Name of the module or system in which the error occurred.

status_codeinteger<int32>

HTTP status code of the error.

detailsobject[]

Error details.

Show details properties
statusstring

Error situation.

error_codestring

Error code.

descriptionstring

Description of the error.

description_detailstring

Detailed description of the error.

brandstring

Brand.

payment_idstring

payment_id.

seller_idstring

seller_id.

amountstring

amount.

currencystring

currency.

order_idstring

order_id.

credit_cancelobject

credit_cancel.

Show credit_cancel properties
canceled_atstring

canceledAt.

messagestring

message.

payment_tagstring

payment_tag.

status_codestring

statusCode.

messagestring

message.

namestring

name.

acquirer_transaction_idstring

acquirer_transaction_id.

authorization_codestring

authorization_code.

transaction_idstring

transaction_id.

reason_codestring

reason_code.

reason_messagestring

reason_message.

merchant_advice_codestring

merchant_advice_code.

paymentsobject[]

Error details.

Show payments properties
statusstring

Error situation.

error_codestring

Error code.

descriptionstring

Description of the error.

description_detailstring

Detailed description of the error.

brandstring

Brand.

payment_idstring

payment_id.

seller_idstring

seller_id.

amountstring

amount.

currencystring

currency.

order_idstring

order_id.

credit_cancelobject

credit_cancel.

Show credit_cancel properties
canceled_atstring

canceledAt.

messagestring

message.

payment_tagstring

payment_tag.

status_codestring

statusCode.

messagestring

message.

namestring

name.

acquirer_transaction_idstring

acquirer_transaction_id.

authorization_codestring

authorization_code.

transaction_idstring

transaction_id.

reason_codestring

reason_code.

reason_messagestring

reason_message.

merchant_advice_codestring

merchant_advice_code.

combined_idstring

combinedId.

order_idstring

orderId.

seller_idstring

sellerId.

Gateway Timeout

messagestring

Detailed error message.

namestring

Name of the module or system in which the error occurred.

status_codeinteger<int32>

HTTP status code of the error.

detailsobject[]

Error details.

Show details properties
statusstring

Error situation.

error_codestring

Error code.

descriptionstring

Description of the error.

description_detailstring

Detailed description of the error.

brandstring

Brand.

payment_idstring

payment_id.

seller_idstring

seller_id.

amountstring

amount.

currencystring

currency.

order_idstring

order_id.

credit_cancelobject

credit_cancel.

Show credit_cancel properties
canceled_atstring

canceledAt.

messagestring

message.

payment_tagstring

payment_tag.

status_codestring

statusCode.

messagestring

message.

namestring

name.

acquirer_transaction_idstring

acquirer_transaction_id.

authorization_codestring

authorization_code.

transaction_idstring

transaction_id.

reason_codestring

reason_code.

reason_messagestring

reason_message.

merchant_advice_codestring

merchant_advice_code.

paymentsobject[]

Error details.

Show payments properties
statusstring

Error situation.

error_codestring

Error code.

descriptionstring

Description of the error.

description_detailstring

Detailed description of the error.

brandstring

Brand.

payment_idstring

payment_id.

seller_idstring

seller_id.

amountstring

amount.

currencystring

currency.

order_idstring

order_id.

credit_cancelobject

credit_cancel.

Show credit_cancel properties
canceled_atstring

canceledAt.

messagestring

message.

payment_tagstring

payment_tag.

status_codestring

statusCode.

messagestring

message.

namestring

name.

acquirer_transaction_idstring

acquirer_transaction_id.

authorization_codestring

authorization_code.

transaction_idstring

transaction_id.

reason_codestring

reason_code.

reason_messagestring

reason_message.

merchant_advice_codestring

merchant_advice_code.

combined_idstring

combinedId.

order_idstring

orderId.

seller_idstring

sellerId.

Request
curl -X POST "https://api.pre.globalgetnet.com/dpm/payments-gwproxy/v2/payments/cancel" \
  -H "Content-Type: application/json" \
  -d '{
  "idempotency_key": "63c7f8ee-51a6-470d-bb76-ef762b62bfb7",
  "request_id": "daac03dc-73db-453f-9bea-b1391669d5d3",
  "payment_id": "2c341d28-491b-4cf8-aec7-eeb60136b7a5",
  "safe_reversal": true,
  "cancellation_with_cashout": true,
  "additional_data": {
    "split": {
      "subseller_list_payment": [
        {
          "subseller_id": "700104158",
          "document_type": "CNPJ",
          "document_number": "12345678912",
          "subseller_sale_amount": 118708,
          "items": [
            {
              "id": "MR1",
              "description": "Product MR1.",
              "currency": "BRL",
              "amount": 118708,
              "transaction_rate_percent": 1.2,
              "transaction_rate_amount": 235,
              "payment_plan": 3
            }
          ]
        }
      ]
    },
    "card": {
      "track1": "string",
      "track2": "string",
      "number": "1231231231231232",
      "expiration_month": 12,
      "expiration_year": 28
    },
    "currency": "BRL"
  },
  "amount": 118708,
  "payment_method": "CREDIT",
  "custom_key": "20200630-8900"
}'
Response
{
  "idempotency_key": "63c7f8ee-51a6-470d-bb76-ef762b62bfb7",
  "seller_id": "9406df6c-3100-49ba-b4df-d81c1ad8a62b",
  "request_id": "daac03dc-73db-453f-9bea-b1391669d5d3",
  "payment_id": "2c341d28-491b-4cf8-aec7-eeb60136b7a5",
  "order_id": "ORDER-10187383",
  "amount": {},
  "cashout_amount": 10000,
  "currency": "BRL",
  "status": "CANCELED",
  "reason_code": "00",
  "reason_message": "TRANSACTION EXECUTED SUCCESSFULLY",
  "canceled_at": "2020-07-01T02:15:03.603Z",
  "custom_key": "20200630-8900"
}