跳转至

退款

该服务可以对已完成的支付发起退款。

以下付款方式将向客户进行银行转账退款, 需要额外提供银行账户信息

支付方式
CREDIT_CARD
NEQUI
PSE
BANCOLOMBIA_COLLECTION
PAY_CASH
BANCOLOMBIA_BUTTON

HTTP请求

POST /v1/payments/charges/refund

Request Headers
{
    "Content-Type": "application/json",
    "Authorization": "Bearer {{access_token}}",
    "x-api-key": "{{api_key}}"
}
Request Body
{
    "idempotencyKey": "2022030214000007-1",
    "referenceId": "2022030214000007",
    "amount": 300,
    "currency": "COP",
    "country": "CO",
    "description": "refund test",
    "additionalInfo": {
        "bankTransferAccountInfo": {
            "bankCode": "332",
            "beneficiaryName": "antonio silva",
            "bankAccountNumber": "286435",
            "bankAccountType": "CHECKING",
            "bankBranchId": "0001",
            "ispb": "13140088",
            "document": {
                "documentId": "42243309114",
                "type": "CC"
            }
        }
    },
    "callbackUrl": "https://api.client.com/callback/"
}
Response
{
    "transferStatusCode": 200,
    "transferErrorMsg": null,
    "idempotencyKey": "2022030214000007-1",
    "referenceId": "2022030214000007",
    "paymentMethod": "CREDIT_CARD",
    "amount": 300,
    "currency": "COP",
    "country": "CO",
    "createTime": "2022-03-01 21:18:56 GMT-08:00",
    "scheduledTime": "2022-03-01 21:18:56 GMT-08:00",
    "finalStatusTime": "2022-03-01 21:18:57 GMT-08:00",
    "payer": {
        "name": "username",
        "email": "username@liquido.com",
        "document" : "88778878",
        "phone": "+57 3123456789",
        "billingAddress": {  
            "zipCode": "111111",
            "state": "Cundinamarca",
            "city": "Bogotá",
            "street": "Apartamento 502, Torre I",
            "number": "Calle 34 # 56 - 78"
        }
    },
    "transferStatus": "SETTLED",
    "description": "refund test",
    "callbackUrl": "https://api.client.comcallback/"
}

通知 / 回调

Notification / Callback
{
    "eventType": "CHARGE_REFUND_SUCCEEDED",
    "data": {
        "chargeDetails" : {
            "amount" : 300,
            "callbackUrl" : "https://api.client.com/callback/",
            "country" : "CO",
            "createTime" : "2022-03-01 15:10:35 GMT+08:00",
            "currency" : "COP",
            "description" : "refund test",
            "finalStatusTime" : "2022-03-01 15:10:37 GMT+08:00",
            "idempotencyKey" : "2022030114000005-1",
            "payer" : {
                "email" : "username@liquido.com",
                "name" : "username"
            },
            "paymentMethod" : "CREDIT_CARD",
            "referenceId" : "2022030214000007",
            "scheduledTime" : "2022-03-01 15:10:35 GMT+08:00",
            "transferStatus" : "SETTLED",
            "transferStatusCode" : 200
        }
    }
}
HTTP Headers 字段说明
Key Value
Authorization "bearer" + " " + {{access_token}}
x-api-key {{api_key}}
Request Body 字段说明
参数 必填 类型 描述
idempotencyKey String 退款记录在的商家系统的唯一id。
referenceId String 需要退款的支付记录的idempotencyKey。
amount Long 退款金额
country String 国家编号国际缩写码,遵循ISO 3166-1 alpha-2 code标准, 如哥伦比亚CO
currency String 货币代码,如哥伦比亚比索COP
description String 描述
additionalInfo JSON 退款附加信息,如银行账号
callbackUrl String 接收交易状态变更通知的地址。接收post请求。
Response Body 字段说明
参数 类型 描述
idempotencyKey String 退款记录在的商家系统的唯一id。
referenceId String 需要退款的支付记录的idempotencyKey。
amount Long 退款金额
country String 国家编号国际缩写码,遵循ISO 3166-1 alpha-2 code标准, 如哥伦比亚CO
currency String 货币代码,如哥伦比亚比索COP
description String 描述
callbackUrl String 接收交易状态变更通知的地址。接收post请求。
createTime String 创建时间
scheduledTime String 执行时间
finalStatusTime String 最终状态更新时间. 最终状态,包括"SETTLED", "FAILED"
description String 退款原因
transferStatus String 退款状态,枚举值,"SETTLED", "FAILED", "IN_PROGRESS"
transferStatusCode Integer 此次交易的状态码, 200表示交易成功或者进行中, 其他代表失败
transferErrorMsg String 此次交易失败原因

对象字段说明

AdditionalInfo
Parameter Required Type Description
bankTransferAccountInfo JSON 银行转账账户信息
BankTransferAccountInfo
Parameter Required Type Description
bankCode String 银行代码,4位数字
beneficiaryName String 受益人名称
bankAccountNumber String 受益人账号
bankAccountType String 受益人账号类型, 如CHECKING, SAVINGS
bankBranchId String 银行分行Id
bankName String 银行名称
ispb String 银行的ISPB, 用途和bankCode一致
document JSON 支付人的身份信息
Document
Parameter Required Type Description
documentId String 证件号码.
type String 证件类型,如CC、CE、NIT或TI

Notification Event Type

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