Skip to main content

Cancel Payment

API data

API Gateway
This API is used for payment gateway operations:

Introduction

To cancel a sale, use the endpoint below with a POST request. Captured transactions can only be canceled on the same day they were processed.

POST /v1/payments/{paymentId}/cancel

Via REST request with the following body:

Request
  { 
"amount": 1035
}

Data dictionary - Parameters

PROPERTYDESCRIPTIONTYPELOCATIONREQUIREDSIZE
paymentIdIdentifier of the transaction to be canceled.stringpathyes42
amountAmount to cancel (in cents).integerbodyyes10
Cancellation completed successfully
  {
"returnCode": "0",
"description": "Canceled",
"paymentId": "020080286103040952150000006201850000000000",
"authorizationCode": "143513",
"amount": 1023,
"releaseAt": "2019-09-24T13:43:12.1952799-03:00"
}

Data dictionary - Response

PROPERTYDESCRIPTIONTYPE
ReturnCodeReturn code.string
DescriptionReturn description.string
PaymentIdPayment identifier.string
AuthorizationCodeCancellation authorization code.string
AmountCanceled amount (in cents).integer
ReleaseAtCancellation timestamp.datetime

Notes

  • Cancellation limitation: Captured transactions can only be canceled on the same day.