API - 支付
POST/v3/merchants/<merchant_id>/payments:::tip[]
- 签名构建因子是入参列表中所有参数;
- 访问时需要将
替换为商户号;
:::
环境域名地址
- 生产环境:
https://gpapi.lianlianpay.com/v3/merchants/<merchant_id>/payments - 沙箱环境:
https://celer-api.LianLianpay-inc.com/v3/merchants/<merchant_id>/payments
接口协议结构体
详情可查看请求与响应结构
请求参数
格式化时间戳,格式为:yyyyMMddHHmmss
由商家自定义,保证在商户端唯一
由连连全球收单创建分配
由连连全球收单创建分配
用于商家服务端接收支付结果通知的地址
支付成功后,用户跳转到支付成功地址,默认POST请求,注意此参数中不允许出现“#”符号
收银台模式必传,用户在收银台取消支付后,跳转到取消地址
Direct API与iframe模式必传,详情可查看支付方式,当收银台模式传入该参数,收银台则指定展示该支付方式,默认不传展示全部
Direct API模式必传
传递referers地址,json对象字符化
由商家自定义
由商家自定义,使用保存卡功能必传
格式为:yyyyMMddHHmmss
在收银台页面订单信息中显示
单位精确到小数点后两位,金额必须大于0
总长度不能超过40960
收货人信息,商品为实物必传
支付方式为国际卡,且Direct API与iframe模式必传,收银台模式选传;
支付方式为本地支付时,建议填写,有助于提高交易成功率;
个人 I =Individual
公司 C=Corporation
当 customer_type = “I” 时必传
当 customer_type = “I” 时必传
个人格式为:first_name+空格+last_name,公司填写公司名称
男性:male;女性:female;未知的:undefined;
支付方式为pix,boleto时必传
邮箱和手机号至少传一个
邮箱和手机号至少传一个
支付方式为微信小程序支付时必传
美国地区必传
支付方式为国际卡,且Direct API与iframe模式必传
Direct API与Iframe模式必传
默认不分期,则传“1”
信用卡订阅参数必须传入,订阅模式传入:subscription
Direct API模式必传
Direct API模式必填
本地支付方式,且Direct API与iframe模式必传
本地支付方式,且Direct API与iframe模式必传
当客户端类型为APP时必传
支付方式为国际卡,且Direct API模式必传
支付方式为国际卡,且Direct API模式必传
支付方式为国际卡,且Direct API模式必传
不传默认为true
支付方式为国际卡,且Direct API模式必传
支付方式为国际卡,且Direct API模式必传
支付方式为国际卡,且Direct API模式必传
支付方式为国际卡,且Direct API模式必传,浏览器本地时间与协调世界时(UTC)之间的时间差,以分钟为单位计算,例如:UTC+8 的北京时间 → -480 (8小时 × 60分钟),UTC-5 的纽约时间 → +300 (5小时 × 60分钟)
支付方式为国际卡,且Direct API模式必传
{
"merchant_transaction_id": "20200808000000008",
"merchant_id": "202103310000001001",
"sub_merchant_id": "202103313321536404",
"notification_url": "https://acquiring.lianlianpay.com/notification",
"redirect_url": "https://acquiring.lianlianpay.com/redirect",
"cancel_url": "https://acquiring.lianlianpay.com/cancel",
"country": "US",
"payment_method": "nostrud magna dolor",
"additional_info": "{\"site_url\":\"https://www.antoinetton.com\"}",
"merchant_order": {
"merchant_order_id": "20200808000888888",
"merchant_user_no": "100036",
"merchant_order_time": "20221231135923",
"order_description": "测试订单",
"order_amount": null,
"order_currency_code": "USD",
"products": [
{
"product_id": "50306",
"name": "测试商品",
"description": "测试商品描述",
"price": null,
"quantity": null,
"category": "36321643",
"sku": "775A3TM4",
"url": "https://acquiring.lianlianpay.com/xxx.jpg",
"shipping_provider": "other"
},
{
"product_id": "50306",
"name": "测试商品",
"description": "测试商品描述",
"price": null,
"quantity": null,
"category": "36321643",
"sku": "775A3TM4",
"url": "https://acquiring.lianlianpay.com/xxx.jpg",
"shipping_provider": "other"
}
],
"shipping": {
"first_name": "san",
"last_name": "Zhang",
"name": "Zhang san",
"phone": "+8618600000000",
"cycle": "24h",
"address": {
"line1": "美国纽约市XXXX",
"line2": "美国纽约市XXXX",
"country": "US",
"city": "NY",
"state": "UT",
"postal_code": "10001",
"district": "Alagoas"
}
}
},
"customer": {
"customer_type": "I",
"first_name": "san",
"last_name": "Zhang",
"full_name": "Zhang san",
"gender": "male",
"id_type": "CPF",
"id_no": "110102199503312837",
"email": "zhangsan@gmail.com",
"phone": "+8618600000000",
"company": "sint nostrud",
"open_id": "27",
"address": {
"line1": "美国纽约市XXXX",
"line2": "美国纽约市XXXX",
"country": "US",
"city": "NY",
"state": "UT",
"postal_code": "10001",
"district": "Alagoas"
}
},
"payment_data": {
"card": {
"holder_name": "Zhang san",
"id_type": "CPF",
"id_no": "1234567890",
"card_no": "4200000000000000",
"card_type": "C",
"bank_code": "214",
"card_brand": "visa",
"card_expiration_year": "30",
"card_expiration_month": "12",
"cvv": null,
"phone_number": "+8618600000000",
"email": "zhangsan@gmail.com",
"card_token": "越野车",
"billing_address": {
"line1": "美国纽约市XXXX",
"line2": "美国纽约市XXXX",
"country": "US",
"city": "NY",
"state": "UT",
"postal_code": "10001",
"district": "Alagoas"
}
},
"installments": null
},
"terminal_data": {
"user_order_ip": "",
"user_client_mode": "",
"user_client_app_type": "",
"user_client_android_imei": "",
"user_client_android_sim_id": "",
"user_client_ios_machine_id": "",
"user_client_browser_accept_header": "",
"user_client_browser_color_depth": null,
"user_client_browser_java_enabled": true,
"user_client_browser_js_enabled": true,
"user_client_browser_language": "",
"user_client_browser_screen_height": null,
"user_client_browser_screen_width": null,
"user_client_browser_time_zone_offset": "",
"user_client_browser_user_agent": ""
}
}示例代码
返回响应
需要技术支持时候,请提供至LianLian Pay技术人员
支付提交成功才有返回值
用户需要跳转此地址完成支付,当3ds_status= challenge时,存放的为3DS 安全认证url
CHALLENGE:需要3ds认证;
空值:不需要3ds认证
扩展参数,json 格式字符串,SDK支付所需参数名称sdk_data
{
"return_code": "SUCCESS",
"return_message": "Success",
"trace_id": "14831.109.16406762306420461",
"order": {
"ll_transaction_id": "202112280336075",
"merchant_transaction_id": "202112281523270200",
"payment_data": {
"payment_currency_code": "USD",
"payment_amount": "1.00",
"exchange_rate": "1.00000000",
"payment_time": "20211228152354",
"payment_status": "PS",
"settlement_currency_code": "USD",
"settlement_amount": "1.00",
"account_date": "20211228"
},
"payment_url": "https://celer-gateway.lianlianpay-inc.com/publish/f654db4c584547149c41951cfe122ec7"
}
}
// 以上例子返回了一个支付成功结果,可以看到 payment_status 为 PS,也就是支付成功,此种请求为同步返回,商户可直接更新自己对应的订单,更多的支付返回结果为中间状态也就是 PP,此种结果为等待异步通知支付的结果;