POST Renewal Preauthorize
Preauthorizes a configured amount for a subscription in a renewal cycle.
Required Headers
Request Body Parameters
0.Validation Rules
Required Fields
| Field | Type | Rules | Description |
|---|---|---|---|
reference_id | string | required, max:36 | Unique payment reference identifier |
subscription_id | string | required, max:36 | Subscription UUID |
currency | string | required, max:3 | ISO 4217 currency code |
amount | numeric | required, min:0 | Payment amount (must be greater than or equal to 0) |
tax | numeric | required, min:0 | Payment tax (must be greater than or equal to 0) |
linked_transaction_id | string | required, max:36 | UUID of the original linked transaction |
Allowed Values
currency
COP- Colombian Peso
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 debe ser un nΓΊmero.- Invalid data type (expected numeric):attribute no puede tener mΓ‘s de :max caracteres.- Maximum length exceeded:attribute debe ser mayor o igual a :min.- Minimum value not met:attribute no es vΓ‘lido.- Invalid value
Response Fields
Success Response (200 OK)
"AUTHORIZED" when renewal is successfultrue when successful, false when there is an errorHTTP Status Codes
| Status Code | Description | Response Body |
|---|---|---|
200 OK | Successful renewal | status: true, code: "AUTHORIZED" |
400 Bad Request | Missing required header (X-Merchant-ID or X-Request-ID) | Simple error message |
401 Unauthorized | Authentication failed (invalid Token-Top or Authorization) | code: "UNAUTHORIZED" |
404 Not Found | Subscription or transaction not found | code: "NOT_FOUND" |
422 Unprocessable Entity | Validation error, invalid subscription/transaction state, or provider renewal failure | code: "VALIDATION_ERROR", "INVALID_STATE" or "PAYMENT_RENEWAL_FAILED" |
500 Internal Server Error | Internal server error | code: "SERVICE_ERROR" |
Response Codes
| Code | Description |
|---|---|
AUTHORIZED | Successful renewal |
VALIDATION_ERROR | Validation error in sent data (missing fields, incorrect types, invalid UUID, etc.) |
UNAUTHORIZED | Authentication error |
NOT_FOUND | Subscription or transaction not found |
INVALID_STATE | Invalid state of subscription or original transaction (inactive subscription, unapproved transaction, etc.) |
PAYMENT_RENEWAL_FAILED | Renewal failed at the payment provider |
SERVICE_ERROR | Internal server error |
Transaction Types
Pre-Authorization Renewal (RENEWAL_PRE_AUTH_TRANSACTION)
- Type:
RENEWAL_PRE_AUTH_TRANSACTION - Status:
APPROVED(success) orDECLINED/ERROR(failure) - Purpose: Renew a previous authorization, cancelling the original and creating a new one
- Linkage:
linked_transaction_idpoints to the original transaction - Next Step: Requires an additional capture step to charge the funds
Supported Currencies
Thecurrency field must be one of the allowed values according to the Currency enum. Example:
COP: Colombian Peso
Headers
Unique identifier of the Merchant invoking Card Payment services. Should not be used to authenticate end users.
Tracking identifier associated with the request, used to establish a correlation_id between ecosystem components.
Token for authentication.
Basic authentication.
Body
"ORDER-123456"
"550e8400-e29b-41d4-a716-446655440000"
"COP"
x >= 01500
x >= 00
"7f45a9da-2f84-4103-ac54-05fe8ea693ca"
Response
Successful renewal. A new transaction of type RENEWAL_PRE_AUTH_TRANSACTION is created and the original transaction is automatically cancelled.
Renewal preauthorization response. Creates a new transaction of type RENEWAL_PRE_AUTH_TRANSACTION and automatically cancels the original transaction when the renewal is successful or rejected.
Response code. Value: 'AUTHORIZED' when renewal is successful
"AUTHORIZED"
Operation status. true when successful, false when there is an error
true
Descriptive message about the renewal result
"RenovaciΓ³n de pago autorizada exitosamente"