跳转至

Hites

集成指引

从响应中获取到'paymentUrl'字段后,您需要把买家重定向到该URL以便完成交易。

HTTP Request

POST /v1/payments/charges/hites

Request Headers
{
    "Content-Type": "application/json",
    "Authorization": "Bearer {{access_token}}",
    "x-api-key": "{{api_key}}"
}
Request Body
{
    "idempotencyKey": "1ec983fa-1c37-679b-809b-067861d8700019",
    "amount": 1000,
    "currency": "CLP",
    "country": "CL",
    "paymentMethod": "HITES",
    "paymentFlow": "DIRECT",
    "payer": {
        "name": "username",
        "email": "username@liquido.com",
        "phone": "+56 234567890",
        "billingAddress": {  
            "zipCode": "03400",
            "state": "CDMX",
            "city": "Álamos",
            "street": "Simón Bolívar",
            "number": "12121"
        }
    },
    "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": "CL"
            }
        }
    },
    "riskData": {
        "ipAddress": "192.0.0.130"
    },
    "hites": {
        "redirectUrl": "https://www.liquido.com"
    },
    "description": "this is a test pay",
    "callbackUrl": "http://api.client.com/notifications"
}
Content-Type: application/json
{
    "transferStatusCode": 200,
    "idempotencyKey": "1ec983fa-1c37-679b-809b-067861d8700019",
    "referenceId": "1ec983fa-1c37-679b-809b-067861d8700019",
    "paymentFlow": "DIRECT",
    "paymentMethod": "HITES",
    "amount": 1000,
    "currency": "CLP",
    "finalAmount": 1000,
    "finalCurrency": "CLP",
    "country": "CL",
    "createTime": "2023-05-30 00:37:41 GMT-07:00",
    "scheduledTime": "2023-05-30 00:37:43 GMT-07:00",
    "finalStatusTime": "2023-05-30 00:37:43 GMT-07:00",
    "payer": {
        "name": "username",
        "email": "username@liquido.com",
        "phone": "+56 234567890",
        "billingAddress": {  
            "zipCode": "03400",
            "state": "CDMX",
            "city": "Álamos",
            "street": "Simón Bolívar",
            "number": "12121"
        }
    },
    "transferStatus": "IN_PROGRESS",
    "description": "this is a test pay",
    "callbackUrl": "http://api.client.com/notifications",
    "transferDetails": {
        "hites": {
            "paymentUrl": "https://liquido.com/gmf-apm/payments/M-9ae481d9-b47f-4459-9b63-644977fe91ed",
            "redirectUrl": "https://www.liquido.com"
        }
    }
}

通知 / 回调

Content-Type: application/json
{
    "eventType": "CHARGE_SUCCEEDED",
    "data":  {
        "chargeDetails": {
            "transferStatusCode": 200,
            "transferErrorMsg": null,
            "idempotencyKey": "1ec983fa-1c37-679b-809b-067861d8700019",
            "referenceId": "1ec983fa-1c37-679b-809b-067861d8700019",
            "paymentMethod": "HITES",
            "amount": 1000,
            "currency": "CLP",
            "country": "CL",
            "finalAmount": 1000,
            "finalCurrency": "CLP",
            "createTime": "2023-05-30 00:37:43 GMT-07:00",
            "scheduledTime": "2023-05-30 00:37:43 GMT-07:00",
            "finalStatusTime": null,
            "payer": {
                "name": "username",
                "email": "username@liquido.com",
                "phone": "+56 234567890",
                "billingAddress": {  
                    "zipCode": "03400",
                    "state": "CDMX",
                    "city": "Álamos",
                    "street": "Simón Bolívar",
                    "number": "12121"
                }
            },
            "transferDetails": {
                "hites": {
                    "paymentUrl": "https://liquido.com/gmf-apm/payments/M-9ae481d9-b47f-4459-9b63-644977fe91ed",
                    "redirectUrl": "https://www.liquido.com"
                }
            },
            "transferStatus": "IN_PROGRESS",
            "description": "this is a test pay",
            "callbackUrl": "http://api.client.com/notifications"
        }
    }
}

HTTP Headers 字段说明

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

Request Body 字段说明

参数 必填 类型 描述
idempotencyKey String 商户系统创建的唯一ID, 长度不大于128个字节。
amount Long 收款金额,单位是货币最小粒度。 如 1 = 0.01CLP
country String 国家编号国际缩写码,遵循ISO 3166-1 alpha-2 code标准, 如智利CL
currency String 货币代码,如智利CLP
paymentMethod String 交易方式,枚举值HITES
paymentFlow String 交易流程, 如DIRECT 或 REDIRECT
payer JSON 买家个人信息
orderInfo JSON 订单信息
riskData JSON 风险控制信息
description String 描述
callbackUrl String 接收交易状态变更通知的地址,接收post请求
hites String hites信息.
Payer 对象字段说明
参数 必填 类型 描述
name String 名字,全称(入参名字规范:只允许大小写字母,数字和空格的组合。请勿包含西班牙语和葡萄牙语字母,以及其他特殊字符。)
email String 邮箱
phone String 电话号码,需包含“+56”的前缀。
billingAddress JSON 账单邮寄地址
BillingAddress 对象字段说明
参数 必填 类型 描述
zipCode String 邮政编码
state String
city String 城市
street String 街道
number String 门牌号
OrderInfo 对象字段说明
参数 必填 类型 描述
orderId String 订单号
shippingInfo JSON 运输信息
ShippingInfo 对象字段说明
参数 必填 类型 描述
name String 名称
phone String 电话号码,需包含“+56”的前缀。
email String 邮箱地址
address JSON 地址信息,结构和billingAddress一致
RiskData 对象字段说明
参数 必填 类型 描述
ipAddress String 客户请求源IP地址
Hites 对象字段说明
Parameter Required Type Description
redirectUrl String 支付完成后Liquido将重定向到的URL

Response Body 字段说明

参数 类型 描述
transferStatus String 汇款状态,枚举值,"SETTLED", "FAILED", "IN_PROGRESS"
transferStatusCode Integer 此次交易的状态码, 200表示交易成功或者进行中, 其他代表失败
transferErrorMsg String 此次交易失败原因
referenceId String 此次交易的ID
idempotencyKey String 此参数用于幂等目的,交易的唯一标识ID,长度不大于128个字节。
amount Long 收款金额
country String 国家编码 CL
currency String 收款货币代码,长度为3个字节,CLP
finalAmount Long 用于创建收款订单的最终金额。对于需要转换汇率的收款订单,这个字段的值表示源请求金额被转换后的金额。
finalCurrency String finalAmount的收款货币代码
paymentMethod String 支付方式. 枚举值, HITES
payer JSON 付款人信息
transferDetails JSON 交易类型的详细信息
description String 描述信息
callbackUrl String 商户接收通知的回调地址. 接收http的get请求
createTime String 创建时间
scheduledTime String 执行时间
finalStatusTime String 最终状态更新时间. 最终状态,包括"REFUNDED", "FAILED"
TransferDetails 对象字段说明
参数 类型 描述
hites JSON hites的详细信息
Hites 对象字段说明
参数 类型 描述
paymentUrl String 这个支付链接
redirectUrl String 支付完成后Liquido将重定向到的URL

支付状态

参数 描述
IN_PROGRESS 交易处理中
SETTLED 交易完成
REFUNDING 退款中
REFUNDED 已退款
CHARGED_BACK 拒付
FAILED 交易失败,异常

Notification 事件类型

CHARGE_SUCCEEDED,
CHARGE_FAILED,
CHARGE_CHARGED_BACK,
CHARGE_REFUND_SUCCEEDED,
CHARGE_REFUND_FAILED;
回到页面顶部