Skip to content

Create A Payment

Create A Credit Card Payment

When sending a credit card payment request over to Liquido, the card information details need to be included. The card information details can be sent with card info or cardId. To get a cardId, you need to set the “saveCard” value to “true” when sending request with card info, then you’ll get a cardId in the response which can later be used to make payments.

Please contact the account manager if tax withholding is a requirement.

HTTP Request

POST /v1/payments/charges/card

Request Headers
{
    "Content-Type": "application/json",
    "Authorization": "Bearer {{access_token}}",
    "x-api-key": "{{api_key}}"
}

create a card payment with card info

Request Body
{
    "idempotencyKey": "1ec983fa-1a37-679b-809b-067861d87ab0",
    "amount": 10000,
    "currency": "COP",
    "country": "CO",
    "paymentMethod": "CREDIT_CARD",
    "paymentFlow": "DIRECT",
    "payer": {
        "name": "username",
        "email": "username@liquido.com",
        "document": {
            "documentId": "42243309114",
            "type": "CC"
        },
        "phone": "+57 3123456789",
        "billingAddress": {  
            "zipCode": "111111",
            "state": "Cundinamarca",
            "city": "Bogotá",
            "street": "Apartamento 502, Torre I",
            "number": "Calle 34 # 56 - 78"
        }
    },
    "card": {
        "cardHolderName": "card_holder_name",
        "cardNumber": "4242424242424242",
        "expirationMonth": "06",
        "expirationYear": "2029",
        "cvc": "123"
    },
    "saveCard": true,
    "orderInfo": {  
        "orderId": "test-order-id",  
        "shippingInfo": { 
            "name": "shipping test name",  
            "phone": "shipping phone",  
            "email": "thiago@example.com",
            "address": { 
                "street": "street name",
                "number": "building number",
                "complement": "unit, apt, etc.",
                "district": "district, neighborhood, etc.",
                "city": "city name",
                "state": "state, state code",
                "zipCode": "zip code, postal code",
                "country": "CO"
            }
        }
    },
    "riskData": {
        "ipAddress": "192.0.0.130",
        "PAYER_LOGIN_ID": "1234567890",
        "PAYER_DEVICE_ID": "c9380c4c-bfc3-42c9-9120-22d1db2d53af"
    },
    "description": "this is a test pay",
    "callbackUrl": "https://api.client.com/callback/",
    "subMerchantId": "UUID"
}

create a card payment with card id

Request Body
{
    "idempotencyKey": "1ec983fa-1a37-679b-809b-067861d87ab0",
    "amount": 10000,
    "currency": "COP",
    "country": "CO",
    "paymentMethod": "CREDIT_CARD",
    "paymentFlow": "DIRECT",
    "payer": {
        "name": "username",
        "email": "username@liquido.com",
        "document": {
            "documentId": "42243309114",
            "type": "CC"
        },
        "phone": "+57 3123456789",
        "billingAddress": {  
            "zipCode": "111111",
            "state": "Cundinamarca",
            "city": "Bogotá",
            "street": "Apartamento 502, Torre I",
            "number": "Calle 34 # 56 - 78"
        }
    },
    "cardId": "8736453a-dad0-4f26-85f0-95e8787d0237",
    "orderInfo": {  
        "orderId": "test-order-id",  
        "shippingInfo": {
            "name": "shipping test name",  
            "phone": "shipping phone",  
            "email": "thiago@example.com",
            "address": {
                "street": "street name",
                "number": "building number",
                "complement": "unit, apt, etc.",
                "district": "district, neighborhood, etc.",
                "city": "city name",
                "state": "state, state code",
                "zipCode": "zip code, postal code",
                "country": "CO"
            }
        }
    },
    "riskData": {
        "ipAddress":"192.0.0.130",
        "PAYER_LOGIN_ID": "1234567890",
        "PAYER_DEVICE_ID": "c9380c4c-bfc3-42c9-9120-22d1db2d53af"
    },
    "description": "this is a test pay",
    "callbackUrl": "https://api.client.com/callback/",
    "subMerchantId": "UUID"
}

Response
{
    "transferStatusCode": 200,
    "transferErrorMsg": null,
    "idempotencyKey": "1ec983fa-1a37-679b-809b-067861d87ab0",
    "referenceId": "1ec983fa-1a37-679b-809b-067861d87ab0",
    "paymentMethod": "CREDIT_CARD",
    "amount": 10000,
    "currency": "COP",
    "country": "CO",
    "finalAmount": 10200,
    "finalCurrency": "COP",
    "createTime": "2022-03-01 17:53:18 GMT-08:00",
    "scheduledTime": "2022-03-01 17:53:18 GMT-08:00",
    "finalStatusTime": "2022-03-01 17:53:18 GMT-08:00",
    "payer": {
        "name": "username",
        "email": "username@liquido.com",
        "document": {
            "documentId": "42243309114",
            "type": "CC"
        },
        "phone": "+57 3123456789",
        "billingAddress": {  
            "zipCode": "111111",
            "state": "Cundinamarca",
            "city": "Bogotá",
            "street": "Apartamento 502, Torre I",
            "number": "Calle 34 # 56 - 78"
        }
    },
    "transferDetails": {
        "card": {
            "cardInfo": {
                "cardHolderName": "card_holder_name",
                "expirationMonth": 6,
                "expirationYear": 2029,
                "bin": "424242",
                "last4": "4242",
                "brand": "VISA"
            },
            "cardId": "8736453a-dad0-4f26-85f0-95e8787d0237",
            "saveCard": true
        }
    },
    "amountDetails": {
        "taxWithholdDetails": {
            "taxRate": {
                "modifierType": "RATE",
                "type" : "CO_IVA_TAX",
                "rate" : 0.02
            },
            "withholdAmount": 200 
        }
    },
    "transferStatus": "SETTLED",
    "description": "this is a test pay",
    "callbackUrl": "https://api.client.com/callback/",
    "subMerchantId": "UUID"
}

Notification / Callback

Content-Type: application/json
{
    "eventType": "CHARGE_SUCCEEDED",
    "data":  {
        "chargeDetails": {
            "transferStatusCode": 200,
            "transferErrorMsg": null,
            "idempotencyKey": "1ec983fa-1a37-679b-809b-067861d87ab0",
            "referenceId": "1ec983fa-1a37-679b-809b-067861d87ab0",
            "paymentMethod": "CREDIT_CARD",
            "amount": 10000,
            "currency": "COP",
            "country": "CO",
            "finalAmount": 10200,
            "finalCurrency": "COP",
            "createTime": "2022-03-01 17:53:18 GMT-08:00",
            "scheduledTime": "2022-03-01 17:53:18 GMT-08:00",
            "finalStatusTime": null,
            "payer": {
                "name": "username",
                "email": "username@liquido.com",
                "document": {
                    "documentId": "42243309114",
                    "type": "CC"
                },
                "phone": "+57 3123456789",
                "billingAddress": {  
                    "zipCode": "111111",
                    "state": "Cundinamarca",
                    "city": "Bogotá",
                    "street": "Apartamento 502, Torre I",
                    "number": "Calle 34 # 56 - 78"
                }
            },
            "transferDetails": {
                "card": {
                    "cardInfo": {
                        "cardHolderName": "card_holder_name",
                        "expirationMonth": 6,
                        "expirationYear": 2029,
                        "bin": "424242",
                        "last4": "4242",
                        "brand": "VISA"
                    },
                    "cardId": "8736453a-dad0-4f26-85f0-95e8787d0237"
                }
            },
            "amountDetails": {
                "taxWithholdDetails": {
                    "taxRate": {
                        "modifierType": "RATE",
                        "type" : "CO_IVA_TAX",
                        "rate" : 0.02
                    },
                    "withholdAmount": 200
                }
            },
            "transferStatus": "SETTLED",
            "description": "this is a test pay",
            "callbackUrl": "https://api.client.com/callback/",
            "subMerchantId": "UUID"
        }
    }
}

Request Headers Parameters

Key Value
Authorization "bearer" + " " + {{access_token}}
x-api-key {{api_key}}

Request Body Parameters

Parameter Required Type Description
idempotencyKey String Unique key to ensure idempotent requests. given by the merchant in their system.
amount Long The transfer amount, The minimum settlement granularity of the current currency, such as 100=1COP
country String country code
currency String The currency code of the transferred fund
paymentMethod String payment method, enum value as CREDIT_CARD
paymentFlow String payment flow, enum value as DIRECT or REDIRECT
payer JSON payer info
card JSON credit card info. required if card id is empty.
cardId String card id. required if card info is empty.
installments Integer number of installments
orderInfo JSON order info
saveCard Boolean set to true to save card info and return card ID
riskData JSON risk control info
description String description of payment
callbackUrl String URL where Liquido will send notifications associated to changes to this payment. will receive a post request.
subMerchantId String The sub merchant ID. Required for PSPs.

Create A Credit Card Payment With Installments

Please see here for further details.

Create A Credit Card Redirect Payment

Please see here for further details.


Payer Object Parameters
Parameter Required Type Description
name String fullname.
email String email.
document JSON Document info.
phone String Mobile phone number. Should include “+57” as a prefix.
billingAddress JSON Billing address info.
Document Object Parameters
Parameter Required Type Description
documentId String document number.
type String document type, enum value as CC, CE, NIT or TI
BillingAddress Object Parameters
Parameter Required Type Description
zipCode String zip code.
state String state.
city String city name.
street String street name.
number String street number.
OrderInfo Object Parameters
Parameter Required Type Description
orderId String order identity number
(Required only when object is provided)
shippingInfo JSON shipping info
ShippingInfo Object Parameters
Parameter Required Type Description
name String shipping name
phone String Mobile phone number. Should include “+57” as a prefix.
email String email address
address JSON the same as billingAddress
Card Object Parameters
Parameter Required Type Description
cardHolderName String Cardholder's full name.
cardNumber String 16 digit number of the card, as a string without any separators.
expirationMonth String 2 digit numbers representing the card's expiration month.
expirationYear String 4 digit numbers representing the card's expiration year.
cvc String Credit card verification code.
RiskData Object Parameters
Parameter Required Type Description
ipAddress String Payer's IP address
PAYER_LOGIN_ID String Payer's Login ID
PAYER_DEVICE_ID String Payer's Device ID

Response Body Parameters

Parameter Type Description
transferStatus String Transfer status, SETTLED, IN_PROGRESS, FAILED
transferStatusCode Integer Transfer status code, 200 transaction SETTLED or IN_PROGRESS, other FAILED
transferErrorMsg String Transfer error message if failed
referenceId String Unique key to payment ticket, generated by Liquido.
idempotencyKey String Unique key to ensure idempotent requests. given by the merchant in their system
amount Long The transfer amount
country String country code
currency String The currency code of the transferred fund
finalAmount Long The final amount that is used for creating the charge order. EX: for charge orders with FX conversion, this field represents the converted amount from the original requested amount.
finalCurrency String The currency code of the finalAmount.
paymentMethod String payment method, enum value as CREDIT_CARD
payer JSON payer info
transferDetails JSON transaction details info
amountDetails JSON amount details info
description String description of payment
callbackUrl String URL where Liquido will send notifications associated to changes to this payment. will receive a post request.
createTime String Payment ticket created time
scheduledTime String Payment ticket scheduled time
finalStatusTime String Transfer final status update time, final status include SETTLED, FAILED
subMerchantId String The sub merchant ID.
TransferDetails Object Parameters
Parameter Type Description
card JSON card detail info
Card Object in TransferDetails Parameters
Parameter Type Description
cardInfo JSON card detail info
cardId String card id. Returned when paid with card ID or saveCard is set to true, not returned when paid with card info
installments Integer number of installments
CardInfo Object in response Parameters
Parameter Type Description
cardHolderName String Cardholder's full name.
bin String first 6 digit number of the card
last4 String last 4 digit number of the card
brand String Credit card brand. such as Visa, Mastercard or Amex
expirationMonth Integer 1 or 2 digit number(s) representing the card's expiration month.
expirationYear Integer 4 digit numbers representing the card's expiration year.
AmountDetails Object Parameters
Parameter Type Description
taxWithholdDetails JSON Array tax withhold detail info. It will be returned when use tax withhold
TaxWithholdDetails Object Parameters
Parameter Type Description
taxRate JSON The tax rate details.
amount Long The tax amount.
TaxRate Object Parameters
Parameter Type Description
modifierType String Modifier type. RATE
rate Positive Float The tax rate.
type String The tax type.

Transfer Status

Parameter Description
IN_PROGRESS The transaction of this method has started, but no transactions have been processed yet.
SETTLED The funds of the transaction of this payment have been transferred to the store.
REFUNDING The transaction of this payment is refunding.
REFUNDED The transaction of this payment method has been refunded.
CHARGED_BACK The transaction of this payment has been reported as chargeback.
FAILED There was an error while processing the transaction of this payment. This status is followed by a message with more details about the error.

Notification Event Type

CHARGE_SUCCEEDED,
CHARGE_FAILED,
CHARGE_CHARGED_BACK,
CHARGE_REFUND_SUCCEEDED,
CHARGE_REFUND_FAILED;
Back to top