curl --request POST 'https://tumipay-card-payments.uat.topup.com.co/production/api/subscription/card' \
--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 '{
"token": "card_token_abc123",
"plan_name": "Plan Premium",
"periodicity": "monthly",
"customer_data": {
"legal_doc": "1234567890",
"legal_doc_type": "CC",
"phone_code": "+57",
"phone_number": "3121234567",
"email": "customer@example.com",
"full_name": "John Doe"
},
"start_date": "2026-01-01"
}'
{
"code": "CREATED",
"status": true,
"message": "Suscripción creada exitosamente",
"data": {
"subscription_id": "550e8400-e29b-41d4-a716-446655440000"
}
}
{
"code": "VALIDATION_ERROR",
"status": false,
"message": "Los datos proporcionados no son válidos."
}
{
"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": "Comerciante no encontrado con UUID: {merchant_uuid}"
}
{
"code": "ACCESS_DENIED",
"status": false,
"message": "El comerciante está inactivo"
}
{
"code": "SUBSCRIPTION_CREATION_FAILED",
"status": false,
"message": "Mensaje de error de excepción de negocio"
}
{
"code": "SERVICE_ERROR",
"status": false,
"message": "Ocurrió un error inesperado"
}
POST Create Subscription
Creates a new subscription for recurring card payments.
curl --request POST 'https://tumipay-card-payments.uat.topup.com.co/production/api/subscription/card' \
--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 '{
"token": "card_token_abc123",
"plan_name": "Plan Premium",
"periodicity": "monthly",
"customer_data": {
"legal_doc": "1234567890",
"legal_doc_type": "CC",
"phone_code": "+57",
"phone_number": "3121234567",
"email": "customer@example.com",
"full_name": "John Doe"
},
"start_date": "2026-01-01"
}'
{
"code": "CREATED",
"status": true,
"message": "Suscripción creada exitosamente",
"data": {
"subscription_id": "550e8400-e29b-41d4-a716-446655440000"
}
}
{
"code": "VALIDATION_ERROR",
"status": false,
"message": "Los datos proporcionados no son válidos."
}
{
"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": "Comerciante no encontrado con UUID: {merchant_uuid}"
}
{
"code": "ACCESS_DENIED",
"status": false,
"message": "El comerciante está inactivo"
}
{
"code": "SUBSCRIPTION_CREATION_FAILED",
"status": false,
"message": "Mensaje de error de excepción de negocio"
}
{
"code": "SERVICE_ERROR",
"status": false,
"message": "Ocurrió un error inesperado"
}
curl --request POST 'https://tumipay-card-payments.uat.topup.com.co/production/api/subscription/card' \
--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 '{
"token": "card_token_abc123",
"plan_name": "Plan Premium",
"periodicity": "monthly",
"customer_data": {
"legal_doc": "1234567890",
"legal_doc_type": "CC",
"phone_code": "+57",
"phone_number": "3121234567",
"email": "customer@example.com",
"full_name": "John Doe"
},
"start_date": "2026-01-01"
}'
{
"code": "CREATED",
"status": true,
"message": "Suscripción creada exitosamente",
"data": {
"subscription_id": "550e8400-e29b-41d4-a716-446655440000"
}
}
{
"code": "VALIDATION_ERROR",
"status": false,
"message": "Los datos proporcionados no son válidos."
}
{
"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": "Comerciante no encontrado con UUID: {merchant_uuid}"
}
{
"code": "ACCESS_DENIED",
"status": false,
"message": "El comerciante está inactivo"
}
{
"code": "SUBSCRIPTION_CREATION_FAILED",
"status": false,
"message": "Mensaje de error de excepción de negocio"
}
{
"code": "SERVICE_ERROR",
"status": false,
"message": "Ocurrió un error inesperado"
}
Required Headers
Request Body Parameters
monthly: Monthly paymentsyearly: Yearly paymentscustom: Custom periodicity according to plan configuration
Show Customer data
Show Customer data
YYYY-MM-DD format (e.g., “2026-01-01”).Validation Rules
Required Fields
| Field | Type | Rules | Description |
|---|---|---|---|
token | string | required, max:60 | Card subscription token |
plan_name | string | required, max:20 | Subscription plan name |
periodicity | string | required | Subscription periodicity |
customer_data | object | required | Customer data |
customer_data.legal_doc | string | required, max:15 | Customer legal document number |
customer_data.legal_doc_type | string | required | Legal document type |
customer_data.phone_code | string | required, max:4 | Country phone code |
customer_data.phone_number | string | required, max:20 | Customer phone number |
customer_data.email | string | required, email, max:255 | Customer email address |
customer_data.full_name | string | required, max:50 | Customer full name |
start_date | string | required, date_format:Y-m-d | Subscription start date (format: YYYY-MM-DD) |
Allowed Values
periodicity
dailyweeklybiweeklymonthlythreefortnightsbimonthlyquarterlyfourmonthshalfyearlyyearlycustom
customer_data.legal_doc_type
CC- Cédula de CiudadaníaCE- Cédula de ExtranjeríaNIT- Número de Identificación TributariaTI- Tarjeta de IdentidadPAS- Pasaporte
customer_data.phone_code
+57- Colombia
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 debe ser un arreglo.- Invalid data type (expected array):attribute debe ser una dirección de correo electrónico válida.- Invalid email format: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 debe tener el formato YYYY-MM-DD.- Invalid date format:attribute no es válido.- Invalid value
Response Fields
Success Response (200 OK)
"CREATED" when the subscription is created successfullytrue when successful, false when there is an errorShow Subscription data
Show Subscription data
HTTP Status Codes
| Status Code | Description | Response Body |
|---|---|---|
200 OK | Successful operation or business error | status: true for success, status: false for business error |
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" |
403 Forbidden | Inactive merchant | code: "ACCESS_DENIED" |
404 Not Found | Merchant not found | code: "NOT_FOUND" |
422 Unprocessable Entity | Validation error in request data | code: "VALIDATION_ERROR" |
500 Internal Server Error | Internal server error | code: "SERVICE_ERROR" |
Response Codes
| Code | Description |
|---|---|
CREATED | Subscription created successfully |
VALIDATION_ERROR | Validation error in sent data |
UNAUTHORIZED | Authentication error |
NOT_FOUND | Merchant not found |
ACCESS_DENIED | Inactive merchant |
SUBSCRIPTION_CREATION_FAILED | Business error when creating subscription (provider, invalid token, etc.) |
SERVICE_ERROR | Internal server error |
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
"card_token_abc123"
"Plan Premium"
daily, weekly, biweekly, monthly, threefortnights, bimonthly, quarterly, fourmonths, halfyearly, yearly, custom "monthly"
Show child attributes
Show child attributes
"2026-01-01"
Response
Subscription created successfully or business error. Check 'status' field in the body.
Response when creating a subscription. The 'status' field can be true (success) or false (business error) even with HTTP 200.
Response code. Values: 'CREATED' (success), 'SUBSCRIPTION_CREATION_FAILED' (business error)
"CREATED"
Operation status. true for success, false for error
true
Descriptive message about the result
"Suscripción creada exitosamente"
Show child attributes
Show child attributes