Credit card payment
Request via POST method, this endpoint generates a credit card transaction.
POST https://[base_url]/v2/virtual-terminal/credit-card
Endpoint body
The data of the "card_item" object must be encrypted, as explained in Security on sensitive data
{
"order": {
"ref_name": "Jhon Doe",
"ref_lastname": "Jhon Doe",
"ref_number": "123456789",
"detail": "Booking payment Hotel ABC",
"amount": 1000,
"installments":2,
"tax_percent": 0,
"service_percent": 0,
"hotel_id": 1,
"email": "jhondoe@mail.com",
"phone": "3012104578",
"address":"My address"
"fiscal_number": "123456789",
"ip": "181.204.153.195"
},
"card_item": {
"cc_code": "SOGBH+0cTEUzCNK00bQ41ofYw==",
"cc_number": "dBLXqs5dK3MCABhEtVhhA==",
"cc_expire_month": "rNmtqARSyKdccv4CNfqLATTg==",
"cc_expire_year": "nORC2oEmmNHmDYe8bbZXD9g60sqQK8ih2w==",
"cc_holder": "AUXYaEB5+UAldL7Srmuw=="
}
}
Body parameters
| PARAMETER | TYPE | REQ | DESCRIPTION |
|---|---|---|---|
| order | Object | Yes | Payment Order Details |
| order.ref_name | String | Yes | Buyer's Name |
| order.ref_lastname | String | Yes | Buyer's Lastname |
| order.ref_number | String | Yes | Order Reference in the merchant. This payment will be identified using this reference |
| order.detail | String | No | Description of the order to be paid. Maximum length of 99 characters |
| order.amount | Float | Yes | Total amount to be charged, includes the amount for services and taxes. Format: Decimal with two fraction digits |
| order.installments | Integer | Yes | Number of installments to defer the purchase. |
| order.tax_percent | Float | No | The tax rate that will be applied to this payment. Format: Decimal with two fraction digits. The value must be between 0.00 and 1.00 |
| order.service_percent | Float | No | The service charge rate that will be applied to this payment. Format: Decimal with two fraction digits. Format: Decimal with two fraction digits. The value must be between 0.00 and 1.00 |
| order.hotel_id | Int | Yes | Unique identifier of the hotel, Refer to List hotels |
| order.email | String | No | Buyer's Email Address |
| order.phone | String | No | Buyer's Phone number |
| order.address | String | No | Buyer's address |
| order.fiscal_number | String | No | Buyer's Tax ID |
| order.ip | String | No | Buyer's IPv4 address |
| card_item.cc_code | String | Yes | Encrypted string representing 3 or 4 digits of the credit/debit card security code (CVV/CVC) |
| card_item.cc_number | String | Yes | Encrypted string representing the credit/debit card number |
| card_item.cc_expire_month | String | Yes | Encrypted string representing 1 or 2 digits of the credit/debit card expiration month (MM) |
| card_item.cc_expire_year | String | Yes | Encrypted string representing 4 digits of the credit/debit card expiration year (yyyy) |
| card_item.cc_holder | String | Yes | Encrypted string representing the name of the credit/debit card holder |
Endpoint resposne
{
"msg": "Pago realizado correctamente",
"voucher_url": "v2/terminal-payments/505/vouchers"
}
{
"code": 0,
"message": "Error http: 400",
"detail": "El pago ha sido rechazado",
"extra_info": {
"voucher_url": "v2/terminal-payments/481/vouchers"
}
}