Skip to main content
Version: v2

Cancel Payments API Error Codes

This page documents all error codes specific to the Cancel Payments API (v2). These errors occur when attempting to cancel a payment. Each error includes the code name, HTTP status, description, recommended developer action, and notes where applicable.

Error Codes Summary

Error Title ReferenceError TitleHTTP StatusDetail Message
Payment Cancellation Reason MissingINVALID_REQUEST400 BAD REQUESTpaymentCancellationReason is missing or null
Invalid Payment Cancellation ReasonINVALID_REQUEST400 BAD REQUESTInvalid paymentCancellationReason

Error Codes Details

Payment Cancellation Reason Missing

MISSING_PAYMENT_CANCELLATION_REASON

paymentCancellationReason is missing or null

Details:

  • Scenario: PATCH /payments/{paymentId}/cancel (v2) was called without the required paymentCancellationReason field, or with paymentCancellationReason set to null. This violates the request contract for canceling a SALE payment.
  • Resolution: Include paymentCancellationReason in the request body and provide a non-null value that matches one of the allowed enums defined in the API spec. Review the Convenient Checkout API and Split Tender Cancel Business Rules for valid values.
  • API Endpoints: /v2/payments/{paymentId}/cancel
  • Scopes: merchant
Sample Request
{
"method": "PATCH",
"path": "/payments/49dd8625-cd25-4123-b345-638aa7b5d011/cancel",
"body": {}
}
Sample Response
{
"title": "INVALID_REQUEST",
"status": 400,
"detail": "Invalid enum in paymentCancellationReason. paymentCancellationReason should accept only allowed enums"
}

Invalid Payment Cancellation Reason

INVALID_PAYMENT_CANCELLATION_REASON

Invalid paymentCancellationReason

Details:

  • Scenario: PATCH /payments/{paymentId}/cancel (v2) included a paymentCancellationReason value that is not in the allowed enumeration for SALE payment cancellations.
  • Resolution: Use one of the allowed enum values exactly as documented (including correct casing). Refer to the Convenient Checkout API and Split Tender Cancel Business Rules for the list of valid values.
  • API Endpoints: /v2/payments/{paymentId}/cancel
  • Scopes: merchant
Sample Request
{
"method": "PATCH",
"path": "/payments/49dd8625-cd25-4123-b345-638aa7b5d011/cancel",
"body": {
"paymentCancellationReason": "INVALID_REASON"
}
}
Sample Response
{
"title": "INVALID_REQUEST",
"status": 400,
"detail": "Invalid enum in paymentCancellationReason. paymentCancellationReason should accept only allowed enums"
}