curl --request POST 'https://tumipay-card-payments.uat.topup.com.co/production/api/v1/subscription/card/authorize' \
--header 'Token-Top: your_auth_token' \
--header 'Authorization: Basic your_auth_key' \
--header 'X-Merchant-ID: your_merchant_id' \
--header 'X-Request-ID: your-request-id' \
--header 'Content-Type: application/json' \
--data-raw '{
"subscription_id": "sub_93af8f63-97d1-4be0-9e0d-f6fd8c2d92a0",
"reference_id": "ref_2025_001",
"currency": "COP",
"amount": 400000,
"tax": 0
}'
{
"code": "AUTHORIZED",
"status": true,
"message": "Pago autorizado exitosamente",
"data": {
"transaction_id": "550e8400-e29b-41d4-a716-446655440000",
"transaction_date": "2025-12-23T10:30:45Z",
"transaction_status": "APPROVED",
"transaction_type": "PRE_AUTH_TRANSACTION",
"reference_id": "reference-uuid-123",
"amount": 100.0,
"currency": "COP"
}
}
{
"code": "VALIDATION_ERROR",
"status": false,
"message": "reference_id is required."
}
{
"message": "Missing required header: X-Merchant-ID"
}
{
"message": "Missing required header: X-Request-ID"
}
{
"code": "UNAUTHORIZED",
"status": false,
"message": "Unauthorized."
}
{
"code": "NOT_FOUND",
"status": false,
"message": "No se pudo localizar la suscripción solicitada con UUID: 550e8400-e29b-41d4-a716-446655440000"
}
{
"code": "INVALID_STATE",
"status": false,
"message": "El pago no puede ser autorizado porque la suscripción no es válida."
}
{
"code": "PAYMENT_AUTHORIZATION_FAILED",
"status": false,
"message": "La autorización de pago falló. Por favor, verifique la información proporcionada."
}
{
"code": "SERVICE_ERROR",
"status": false,
"message": "Ocurrió un error. Por favor, intente nuevamente."
}
POST Preauthorize Transaction
Preauthorizes a configured amount for a subscription.
curl --request POST 'https://tumipay-card-payments.uat.topup.com.co/production/api/v1/subscription/card/authorize' \
--header 'Token-Top: your_auth_token' \
--header 'Authorization: Basic your_auth_key' \
--header 'X-Merchant-ID: your_merchant_id' \
--header 'X-Request-ID: your-request-id' \
--header 'Content-Type: application/json' \
--data-raw '{
"subscription_id": "sub_93af8f63-97d1-4be0-9e0d-f6fd8c2d92a0",
"reference_id": "ref_2025_001",
"currency": "COP",
"amount": 400000,
"tax": 0
}'
{
"code": "AUTHORIZED",
"status": true,
"message": "Pago autorizado exitosamente",
"data": {
"transaction_id": "550e8400-e29b-41d4-a716-446655440000",
"transaction_date": "2025-12-23T10:30:45Z",
"transaction_status": "APPROVED",
"transaction_type": "PRE_AUTH_TRANSACTION",
"reference_id": "reference-uuid-123",
"amount": 100.0,
"currency": "COP"
}
}
{
"code": "VALIDATION_ERROR",
"status": false,
"message": "reference_id is required."
}
{
"message": "Missing required header: X-Merchant-ID"
}
{
"message": "Missing required header: X-Request-ID"
}
{
"code": "UNAUTHORIZED",
"status": false,
"message": "Unauthorized."
}
{
"code": "NOT_FOUND",
"status": false,
"message": "No se pudo localizar la suscripción solicitada con UUID: 550e8400-e29b-41d4-a716-446655440000"
}
{
"code": "INVALID_STATE",
"status": false,
"message": "El pago no puede ser autorizado porque la suscripción no es válida."
}
{
"code": "PAYMENT_AUTHORIZATION_FAILED",
"status": false,
"message": "La autorización de pago falló. Por favor, verifique la información proporcionada."
}
{
"code": "SERVICE_ERROR",
"status": false,
"message": "Ocurrió un error. Por favor, intente nuevamente."
}
curl --request POST 'https://tumipay-card-payments.uat.topup.com.co/production/api/v1/subscription/card/authorize' \
--header 'Token-Top: your_auth_token' \
--header 'Authorization: Basic your_auth_key' \
--header 'X-Merchant-ID: your_merchant_id' \
--header 'X-Request-ID: your-request-id' \
--header 'Content-Type: application/json' \
--data-raw '{
"subscription_id": "sub_93af8f63-97d1-4be0-9e0d-f6fd8c2d92a0",
"reference_id": "ref_2025_001",
"currency": "COP",
"amount": 400000,
"tax": 0
}'
{
"code": "AUTHORIZED",
"status": true,
"message": "Pago autorizado exitosamente",
"data": {
"transaction_id": "550e8400-e29b-41d4-a716-446655440000",
"transaction_date": "2025-12-23T10:30:45Z",
"transaction_status": "APPROVED",
"transaction_type": "PRE_AUTH_TRANSACTION",
"reference_id": "reference-uuid-123",
"amount": 100.0,
"currency": "COP"
}
}
{
"code": "VALIDATION_ERROR",
"status": false,
"message": "reference_id is required."
}
{
"message": "Missing required header: X-Merchant-ID"
}
{
"message": "Missing required header: X-Request-ID"
}
{
"code": "UNAUTHORIZED",
"status": false,
"message": "Unauthorized."
}
{
"code": "NOT_FOUND",
"status": false,
"message": "No se pudo localizar la suscripción solicitada con UUID: 550e8400-e29b-41d4-a716-446655440000"
}
{
"code": "INVALID_STATE",
"status": false,
"message": "El pago no puede ser autorizado porque la suscripción no es válida."
}
{
"code": "PAYMENT_AUTHORIZATION_FAILED",
"status": false,
"message": "La autorización de pago falló. Por favor, verifique la información proporcionada."
}
{
"code": "SERVICE_ERROR",
"status": false,
"message": "Ocurrió un error. Por favor, intente nuevamente."
}
Required Headers
Request Body Parameters
0.Validation Rules
Required Fields
| Field | Type | Rules | Description |
|---|---|---|---|
subscription_id | string | required, max:36 | Subscription UUID |
reference_id | string | required, max:36 | Unique payment reference identifier |
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) |
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 authorization is successfultrue when successful, false when there is an errorShow Transaction data
Show Transaction data
Y-m-d\TH:i:s\Z)"APPROVED" when authorization is successful"PRE_AUTH_TRANSACTION" for preauthorization transactionsHTTP Status Codes
| Status Code | Description | Response Body |
|---|---|---|
200 OK | Successful authorization | 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 not found | code: "NOT_FOUND" |
422 Unprocessable Entity | Validation error, invalid subscription state, or provider authorization failure | code: "VALIDATION_ERROR", "INVALID_STATE" or "PAYMENT_AUTHORIZATION_FAILED" |
500 Internal Server Error | Internal server error | code: "SERVICE_ERROR" |
Response Codes
| Code | Description |
|---|---|
AUTHORIZED | Successful authorization |
VALIDATION_ERROR | Validation error in sent data (missing fields, incorrect types, invalid currency, etc.) |
UNAUTHORIZED | Authentication error |
NOT_FOUND | Subscription not found |
INVALID_STATE | The subscription is not in ACTIVE state (cannot authorize payments) |
PAYMENT_AUTHORIZATION_FAILED | Authorization failed at the payment provider |
SERVICE_ERROR | Internal server error |
Transaction Types
Pre-Authorization (PRE_AUTH_TRANSACTION)
- Type:
PRE_AUTH_TRANSACTION - Status:
APPROVED(success) orDECLINED/ERROR(failure) - Purpose: Reserve funds without capturing them
- 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
Response
Successful authorization. A new transaction of type PRE_AUTH_TRANSACTION is created.
Preauthorization response. Creates a new transaction of type PRE_AUTH_TRANSACTION.
Response code. Value: 'AUTHORIZED' when authorization is successful
"AUTHORIZED"
Operation status. true when successful, false when there is an error
true
Descriptive message about the authorization result
"Pago autorizado exitosamente"
Show child attributes
Show child attributes