Skip to main content
POST
Cancel an existing subscription. The operation is idempotent: if the subscription is already cancelled, the system returns the ALREADY_CANCELLED status without generating an error.

Required Headers

string
required
Merchant authentication token
string
required
Basic authentication (Basic Auth)
string
required
Unique identifier of the merchant invoking Card Payment services
string
required
Unique tracking identifier for the request
string
required
Must be “application/json”

Request Body Parameters

string
required
Unique identifier of the subscription to cancel. This ID is obtained when creating the subscription.

Validation Rules

Required Fields

Common Validation Error Messages

The following are common validation error messages returned by the API (in Spanish):
  • :attribute es obligatorio. - Required field missing
  • :attribute debe ser una cadena de texto. - Invalid data type (expected string)
  • :attribute no puede tener más de :max caracteres. - Maximum length exceeded
  • :attribute no es válido. - Invalid value

Response Fields

Success Response (200 OK)

string
required
Response code. Possible values:
  • "SUCCESS": Subscription cancelled successfully
  • "ALREADY_CANCELLED": The subscription was already cancelled (idempotent operation)
boolean
required
Operation status. true when successful (even if already cancelled)
string
required
Descriptive message about the cancellation result
object
required

HTTP Status Codes

Response Codes

Headers

X-Merchant-ID
string
required

Unique identifier of the Merchant invoking Card Payment services. Should not be used to authenticate end users.

X-Request-ID
string
required

Tracking identifier associated with the request, used to establish a correlation_id between ecosystem components.

Token-Top
string
required

Token for authentication.

Authorization
string
required

Basic authentication.

Body

application/json
subscription_id
string
required
Example:

"sub_93af8f63-97d1-4be0-9e0d-f6fd8c2d92a0"

Response

Subscription cancelled successfully or was already cancelled (idempotency). Check 'code' field to distinguish between 'SUCCESS' and 'ALREADY_CANCELLED'.

Response to the cancellation process. The 'status' field is always true (even for ALREADY_CANCELLED) due to idempotency.

code
enum<string>
required

Response code. Values: 'SUCCESS' (cancelled successfully), 'ALREADY_CANCELLED' (was already cancelled)

Available options:
SUCCESS,
ALREADY_CANCELLED
Example:

"SUCCESS"

status
boolean
required

Operation status. Always true for successful responses (even if already cancelled)

Example:

true

message
string
required

Descriptive message about the cancellation result

Example:

"Suscripción cancelada exitosamente"

data
object
required