Direct Charge
The Direct Charge allows merchants to manually charge a credit or debit card through the Autocore API. This feature is intended for assisted payments (call center, front desk, backoffice) and supports real-time payment status reporting.
Endpoint
POST https://[base_url]/v2/virtual-terminal/credit-card
Request Body
The request body is composed of two main objects:
order: Payment and reference informationcard_item: Encrypted card data
Order Object
| PARAMETER | TYPE | REQ. | DESCRIPTION |
|---|---|---|---|
| source | String | Yes | Source identifier of the direct charge, if the account has multiple sources, the request must specify which one is being used. Contact [email protected] to obtain a valid value. |
| hotel_id | Integer | Yes | Hotel ID associated with the payment. |
| currency | String | Yes | ISO 4217 currency code (e.g. COP). |
| amount | Number | Yes | Amount to be charged. |
| detail | String | No | Payment description. |
| ref_name | String | Yes | Guest first name. |
| ref_lastname | String | Yes | Guest last name. |
| ref_number | String | No | Internal or merchant reference number, (e.g. reservation_id). |
| external_ref_id | String | No | External reference ID for reconciliation. |
| installments | Integer | No | Number of installments allowed, default 1. |
| temp_webhook_url | String | No | URL that will receive payment notifications (POST). |
Card Item Object (Encrypted)
Important
All card-related fields must be encrypted using Autocore’s encryption mechanism.
Plain card data is never accepted by the API.
| PARAMETER | TYPE | REQ. | DESCRIPTION |
|---|---|---|---|
| cc_holder | String | Yes | Encrypted cardholder name. |
| cc_number | String | Yes | Encrypted card number. |
| cc_expire_month | String | Yes | Encrypted expiration month (MM). |
| cc_expire_year | String | Yes | Encrypted expiration year (YYYY). |
| cc_code | String | Yes | Encrypted card security code (CVV). |
For details on how to generate encrypted card values, refer to the Security on sensitive data (to be provided by Autocore).
Request Example
{
"order": {
"source": "Autocore WebApp",
"hotel_id": 17,
"currency": "COP",
"amount": 750.0,
"detail": "Pago directo para reserva 123456",
"ref_name": "Juan",
"ref_lastname": "Perez",
"installments": 1,
"external_ref_id": "20260127-0001",
"temp_webhook_url": "https://195.ngrok-free.app/payment",
"ref_number": "123456"
},
"card_item": {
"cc_holder": "<encrypted_value>",
"cc_number": "<encrypted_value>",
"cc_expire_month": "<encrypted_value>",
"cc_expire_year": "<encrypted_value>",
"cc_code": "<encrypted_value>"
}
}
Payment Statuses
The Virtual Terminal may return the following payment states:
| STATUS | status_code | DESCRIPTION |
|---|---|---|
| Applied | applied |
Payment completed successfully. |
| In process | in_process |
Payment is being processed. A final status will be sent later. |
| Rejected | rejected |
Payment was rejected. |
Response Examples
Successful Payment (Applied)
{
"msg": "Pago realizado correctamente.",
"voucher_url": "v2/terminal-payments/123/vouchers",
"details": {
"type": "charge",
"id": "yavdby3zk8mk",
"external_ref_id": "20250707-0001",
"status_code": "applied",
"status_detail": "Aplicado",
"comments": "Pago con referencia 123456 procesado correctamente",
"transaction_id": "RB-827831",
"transaction_date": "2026-01-28 14:36:01.594314"
}
}
Payment in Process
{
"msg": "El pago se encuentra en proceso. Esto puede tardar unos minutos, espere por favor.",
"voucher_url": "v2/terminal-payments/123/vouchers",
"details": {
"type": "charge",
"id": "vtu99vimlh5y",
"external_ref_id": "20250707-0001",
"status_code": "in_process",
"status_detail": "En proceso",
"comments": "El pago se encuentra en proceso. Esto puede tardar unos minutos, espere por favor.",
"transaction_id": "RB-827831",
"transaction_date": "2026-01-28 14:43:54.301245"
}
}
Rejected Payment
{
"code": 0,
"message": "Error http: 400",
"detail": "El pago ha sido rechazado",
"extra_info": {
"voucher_url": "v2/terminal-payments/123/vouchers",
"details": {
"type": "charge",
"id": "o0iaby1c9pbq",
"external_ref_id": "20250707-0001",
"status_code": "rejected",
"status_detail": "Rechazado",
"comments": "rejected Response by mock",
"transaction_id": "N/A",
"transaction_date": "2026-01-28 14:44:20.823338"
}
}
}
Notes
- Card data must always be encrypted before sending the request.
- The Direct Charge is intended for manual or assisted payments.
- All optional fields may be omitted if not required by the integration.
- It is recommended to remove
nullvalues from the request body before sending it. - The same payload structure supports multiple sources (Autocore WebApp, custom integrations).