Skip to main content
POST
/
api
/
subscription
/
card
/
capture
curl --request POST 'https://tumipay-card-payments.staging.tumipay.co/production/api/v1/subscription/card/capture' \
--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 '{
    "transaction_id": "7f45a9da-2f84-4103-ac54-05fe8ea693ca",
    "amount": 400000,
    "tax": 0
}'
{
    "code": "CAPTURED",
    "status": true,
    "message": "Pago capturado exitosamente",
    "data": {
        "transaction_id": "550e8400-e29b-41d4-a716-446655440000",
        "linked_transaction_id": "660e8400-e29b-41d4-a716-446655440001",
        "transaction_date": "2025-12-23T10:30:45Z",
        "transaction_status": "APPROVED",
        "transaction_type": "COMPLETION_TRANSACTION",
        "reference_id": "reference-uuid-123",
        "amount": 100.0,
        "currency": "COP"
    }
}
Capture a previously preauthorized transaction, performing the actual charge to the customer’s card. You can only capture transactions that have been successfully preauthorized.
If you need to capture an amount greater than the authorized amount, you should use the Renewal Preauthorize endpoint instead of attempting to capture a larger amount.
curl --request POST 'https://tumipay-card-payments.staging.tumipay.co/production/api/v1/subscription/card/capture' \
--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 '{
    "transaction_id": "7f45a9da-2f84-4103-ac54-05fe8ea693ca",
    "amount": 400000,
    "tax": 0
}'
{
    "code": "CAPTURED",
    "status": true,
    "message": "Pago capturado exitosamente",
    "data": {
        "transaction_id": "550e8400-e29b-41d4-a716-446655440000",
        "linked_transaction_id": "660e8400-e29b-41d4-a716-446655440001",
        "transaction_date": "2025-12-23T10:30:45Z",
        "transaction_status": "APPROVED",
        "transaction_type": "COMPLETION_TRANSACTION",
        "reference_id": "reference-uuid-123",
        "amount": 100.0,
        "currency": "COP"
    }
}

Required Headers

Token-Top
string
required
Merchant authentication token
Authorization
string
required
Basic authentication (Basic Auth)
X-Merchant-ID
string
required
Unique identifier of the merchant invoking Card Payment services
X-Request-ID
string
required
Unique tracking identifier for the request
Content-Type
string
required
Must be “application/json”

Request Body Parameters

transaction_id
string
required
Unique identifier of the preauthorization transaction to capture
amount
number
required
Amount to capture. Must be greater than 0.
tax
number
required
Processing tax associated with the capture. If no tax will be charged, send 0.

Validation Rules

Required Fields

FieldTypeRulesDescription
transaction_idstringrequired, max:36UUID of the transaction to capture
amountnumericrequired, min:0Amount to capture (must be greater than or equal to 0)
taxnumericrequired, min:0Tax to capture (must be greater than or equal to 0)

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)

code
string
required
Response code. Value: "CAPTURED" when capture is successful
status
boolean
required
Operation status. true when successful, false when there is an error
message
string
required
Descriptive message about the capture result
data
object
required

HTTP Status Codes

Status CodeDescriptionResponse Body
200 OKSuccessful capturestatus: true, code: "CAPTURED"
400 Bad RequestMissing required header (X-Merchant-ID or X-Request-ID)Simple error message
401 UnauthorizedAuthentication failed (invalid Token-Top or Authorization)code: "UNAUTHORIZED"
404 Not FoundTransaction or subscription not foundcode: "NOT_FOUND"
422 Unprocessable EntityValidation error or invalid statecode: "VALIDATION_ERROR", "INVALID_STATE", "PAYMENT_CAPTURE_FAILED" or "PROCESSING_ERROR" (invalid capture amount)
500 Internal Server ErrorInternal server errorcode: "SERVICE_ERROR"

Response Codes

CodeDescription
CAPTUREDSuccessful capture
VALIDATION_ERRORValidation error in sent data (missing fields, incorrect types, etc.)
UNAUTHORIZEDAuthentication error
NOT_FOUNDTransaction or subscription not found
INVALID_STATEInvalid state of transaction or subscription (not approved, incorrect type, no provider reference, etc.)
PAYMENT_CAPTURE_FAILEDCapture failed at the payment provider
PROCESSING_ERRORInvalid capture amount (greater than authorized amount). Use the Renewal Preauthorize endpoint instead.
SERVICE_ERRORInternal server error

Transaction Types

Original Transaction (Pre-Authorization)

  • Type: PRE_AUTH_TRANSACTION or RENEWAL_PRE_AUTH_TRANSACTION
  • Status: APPROVED
  • Purpose: Reserve funds without capturing them

Capture Transaction

  • Type: COMPLETION_TRANSACTION
  • Status: APPROVED (success) or DECLINED/ERROR (failure)
  • Purpose: Capture the pre-authorized funds
  • Linkage: linked_transaction_id points to the original transaction

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
transaction_id
string<uuid>
required
Example:

"7f45a9da-2f84-4103-ac54-05fe8ea693ca"

amount
number
required
Required range: x >= 0
Example:

1500

tax
number
required
Required range: x >= 0
Example:

0

Response

Successful capture. A new transaction of type COMPLETION_TRANSACTION is created.

Response when capturing a transaction. Creates a new transaction of type COMPLETION_TRANSACTION linked to the original transaction.

code
string
required

Response code. Value: 'CAPTURED' when capture is successful

Example:

"CAPTURED"

status
boolean
required

Operation status. true when successful, false when there is an error

Example:

true

message
string
required

Descriptive message about the capture result

Example:

"Pago capturado exitosamente"

data
object
required