跳转至

重复支付

PayCash重复支付所生成的交易号(reference number)可被多次支付,并在Liquido后台中被记录为多笔收款订单。

支付者在墨西哥的线下支付网点进行支付时,需要同时提供本接口生成的交易号(reference number/referencia)以及一个网点对应的协议号(agreement code/convenio)给收银员以完成交易。 交易号能在接口返回的“referenceNumber”字段获取。而协议号则需以线下支付网点对应,具体请参考协议号对照表

HTTP 请求

POST /v1/payments/charges/references

Request Headers
{
    "Content-Type": "application/json",
    "Authorization": "Bearer {{access_token}}",
    "x-api-key": "{{api_key}}"
}
Request Body
{
    "idempotencyKey": "0ecdc84c-ef06-b07c-09ab-0217f93d7ca1",
    "paymentMethod": "PAY_CASH",
    "country": "MX",
    "currency": "MXN",
    "amount": 0,
    "expirationDate": "2024-09-30",
    "description": "this is a test reference",
    "callbackUrl": "https://api.client.com/callback/"
}
Content-Type: application/json
{
    "transferStatusCode": 200,
    "idempotencyKey": "0ecdc84c-ef06-b07c-09ab-0217f93d7ca1",
    "country": "MX",
    "currency": "MXN",
    "createTime": "2023-09-22 09:23:27 UTC",
    "status": "ACTIVE",
    "description": "this is a test reference",
    "callbackUrl": "https://api.client.com/callback/",
    "transferDetails": {
        "payCash": {
            "amount": 0,
            "expirationDate": "2024-09-30",
            "reference": "1264245500260"
        }
    }
}

通知 / 回调

Content-Type: application/json
{
    "eventType": "CHARGE_SUCCEEDED",
    "data": {
        "chargeDetails": {
            "transferStatusCode": 200,
            "idempotencyKey": "ref_NooT2GTS3OeqxGVx6mHPgo6P4",
            "referenceId": "0ecdc84c-ef06-b07c-09ab-0217f93d7ca1",
            "paymentFlow": "DIRECT",
            "paymentMethod": "PAY_CASH",
            "amount": 20000,
            "currency": "MXN",
            "finalAmount": 20000,
            "finalCurrency": "MXN",
            "country": "MX",
            "createTime": "2023-09-22 09:32:00 UTC",
            "finalStatusTime": "2023-09-22 09:32:00 UTC",
            "payer": {},
            "transferStatus": "SETTLED",
            "description": "this is a test reference",
            "callbackUrl": "https://api.client.com/callback/",
            "transferDetails": {
                "payCash": {
                    "referenceNumber": "1264245500260",
                    "expirationDate": "2024-09-30",
                    "recurring": true,
                    "paymentTime": "2023-09-23 09:30:59"
                }
            }
        }
    }
}

HTTP Headers 字段说明

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

Request Body 字段说明

参数 必填 类型 描述
idempotencyKey String 商户系统创建的唯一ID, 长度不大于128个字节。
paymentMethod String 支付方式. 枚举值 PAY_CASH
country String 国家编号国际缩写码,遵循ISO 3166-1 alpha-2 code标准, 如墨西哥MX
currency String 货币代码,如墨西哥MXN
amount Long 交易金额,单位是货币最小粒度,如 100 = 1MXN。默认值为0。
若金额为‘0’,消费者可以拿着交易号去线下网点支付任意金额,例如:消费者可以第一次去支付100MXN,然后第二次去支付200MXN。
若金额不为‘0’,比如此处值为‘50000’,意味着消费者去线下网点支付时,每次都只能支付固定金额500MXN。
expirationDate String 交易过期时间,格式:yyyy-MM-dd
description String 支付描述
callbackUrl String 接收交易状态变更通知的地址。接收post请求。

Response Body 字段说明

参数 类型 描述
transferStatusCode Integer 此次交易的状态码, 200表示交易成功或者进行中, 其他代表失败
idempotencyKey String 此参数用于幂等目的,交易的唯一标识ID,长度不大于128个字节。
country String 国家编码 MX
currency String 收款货币代码,长度为3个字节,MXN
createTime String 创建时间
status String 交易状态
description String 描述信息
transferDetails JSON 交易类型的详细信息
callbackUrl String 接收交易状态变更通知的地址。接收post请求。

对象字段说明

TransferDetails
参数 类型 描述
payCash JSON PayCash支付的详细信息
PayCash
参数 类型 描述
amount Long 交易金额
expirationDate String 过期日期 墨西哥时间 "yyyy-MM-dd"
reference String 这是一个可以被多次重复使用的交易号。支付者在支付时,需要提供的交易号(reference number/referencia)。需要注意的是除此之外,用户还需根据其支付网点,提交对应的协议号

状态

参数 描述
ACTIVE 交易已成功创建,是正常进行中的交易状态。
EXPIRED 交易过期
CANCELLED 交易取消
FAILED 交易失败,异常

Notification 事件类型

CHARGE_SUCCEEDED,
CHARGE_FAILED,
CHARGE_CHARGED_BACK,
CHARGE_REFUND_SUCCEEDED,
CHARGE_REFUND_FAILED;

协议号对照表

线下网点 协议号
7-ELEVEN Don't need an agreement code.
Kiosko Don't need an agreement code.
Farmacias YZA Don't need an agreement code.
BBVA (PRACTICAJA - BANCA DIGITAL) 1420712
Caja Cerano Don't need an agreement code.
Caja Morelia Valladolid Don't need an agreement code.
Caja Oblatos Don't need an agreement code.
SMB Rural Don't need an agreement code.
CALIMAX Don't need an agreement code.
Circulo K Don't need an agreement code.
Tiendas Extra Don't need an agreement code.
CITY CLUB Don't need an agreement code.
FARMACIA LA MAS BARATA Don't need an agreement code.
FARMACIAS ROMA Don't need an agreement code.
HSBC 7755
Santander (VENTANILLA - SUPERNET) 7292
SORIANA Don't need an agreement code.
SUPER CITY Don't need an agreement code.
SUPER DEL NORTE Don't need an agreement code.
Telecomm 3724
Bodega Aurrera 198
Walmart 198
Sam's Club 198
Walmart express 198
Via servicios Don't need an agreement code.
BANORTE (VENTANILLA -BANCA DIGITAL) 3724
AFIRME (BANCA DIGITAL) Don't need an agreement code.
回到页面顶部