Card

(payProduct=18)

支付流程

1、用户在商户网站/应用下单,并选择Card支付;

2、商户向Supefina发起Card支付请求;

3、Supefina返回Card支付URL地址;

4、商户将该地址在用户侧打开;

5、用户按照页面提示进行验证和支付;

6、用户支付成功;

7、Supefina将支付成功信息通知商户。

请求地址

环境名称
URL

SandBox

POST https://api.supefina.tech/api/supefina/transactions/payin

正式环境

POST https://api.supefina.net/api/supefina/transactions/payin

请求参数

请求头

Key
Value

Content-Type

application/json

请求体

变量名
类型
必填
描述

countryId

String

国家编号 参照:字典表-国家编号 墨西哥:MEX

currency

String

币种 参照:字典表-货币 墨西哥比索:MXN

orderAmount

String

订单金额 单位比索,需要分可以传入小数,支持两位小数

merId

String

商户ID 商户ID获取路径:Supefina商户后台-商户管理-基本信息-商户ID

merOrderNo

String

商户订单号

nonceStr

String

随机字符串 长度不能超过32位

payProduct

String

支付类型 Card:18

checkOut

Boolean

收银台 true:需要收银台 false:不需要收银台 传true

returnUrl

Boolean

支付完成返回地址

callbackUrl

String

回调地址

详见通知回调说明

productName

String

商品名称 最大50个字符

productQuantity

Integer

商品数量 范围[0,1000]

email

String

顾客邮箱 3-256个字符 电商行业必传

receiverAddressMain

String

收件地址,街道 0-50个字符 电商行业必传

receiverAddressExtra

String

收件地址,小区,门牌号 0-50个字符 电商行业必传

receiverCity

String

收件人城市 0-50个字符,可包括空格、连字符、撇号、逗号和点 电商行业必传

receiverProvince

String

收件人所在省 0-40个字符 参数:https://en.wikipedia.org/wiki/ISO_3166-2 例:NY 电商行业必传

receiverCountry

String

收件人国家 参照:字典表-国家编号 例:BRA 电商行业必传

receiverZipCode

String

邮政编码 0-12个字母或数字 电商行业必传

receiverPhone

String

收件人电话 5-20个字符,区添加区号。如:+1 111111111 电商行业必传

alias

String

用户名 0-60个字符 游戏行业必传

newUser

Boolean

是否一个月内的用户 true:新用户 false:老用户 游戏行业必传

hasDispute

Boolean

是否有过历史争议,包含以下任一条: 1、利用作弊工具、游戏漏洞等进行不正当行为; 2、骚扰其他玩家、进行恶意行为或破坏游戏体验的行为; 3、玩家有不当言论、违反游戏规则、频繁被举报; true:有过 false:没有 游戏行业必传

hasRefund

Boolean

是否有过退款 true:有过 false:没有 游戏行业必传

hasSingedLong

Boolean

注册时间是否超过三个月 true:超过 false:未超过 游戏行业必传

sign

String

customerName

String

用户名字

description

String

描述

不能带特殊符号,长度不超过200字符

请求示例

{
	"callbackUrl": "https://test.com",
	"checkOut": true,
	"countryId": "MEX",
	"currency": "MXN",
	"merId": "8302858375850055",
	"merOrderNo": "20240509087436S20P0154104514",
	"nonceStr": "555016487033129560298749615154",
	"orderAmount": "200",
	"payProduct": "18",
	"returnUrl": "https://www.bing.com/",
	"productName": "testName",
	"productQuantity": 10,
	"email": "[email protected]",
	"receiverAddressMain": "Sample street 357",
	"receiverAddressExtra": "Apt 2",
	"receiverCity": "Example city",
	"receiverProvince": "Example state",
	"receiverCountry": "MXN",
	"receiverZipCode": "01254",
	"receiverPhone": "1234567890",
	"alias": "test alias",
	"newUser": false,
	"hasDispute": true,
	"hasRefund": false,
	"hasSingedLong": true,
	"sign": "6FD59D9111C58A608147EB05AFC1458E",
	"customerName": "Aaliyah Rogers",
	"description":"Supefina"
}

响应参数

变量名
类型
描述

code

String

响应编码 具体参照:响应状态码

data

Object

响应数据

amount

BigDecimal

订单金额

currency

String

币种 参照:字典表-货币 墨西哥比索:MXN

merCode

String

商户ID

merOrderNo

String

商户订单号

url

String

交易链接

msg

String

响应信息

响应示例

{
    "code": "200",
    "data": {
        "amount": 200,
        "currency": "MXN",
        "merCode": "8302858375850055",
        "merOrderNo": "20240509087436S20P0154104514",
        "url": "https://h5.supefina.net/supefina?token=b3909bfa4683e3443a57"
    },
    "msg": "success "
}

回调通知

提交方式:POST

变量名
类型
描述

amount

String

订单金额

countryId

String

国家编号 参照:字典表-国家编号 墨西哥:MEX

fee

String

预收手续费

identifier

String

付款参考 Clabe

merId

String

商户ID

merOrderId

String

商户订单号

nonceStr

String

随机字符串 长度不能超过32位

realityAmount

String

实收金额

realityFee

String

实收手续费

reference

String

标识符

sign

String

签名

supefinaOrderId

String

supefina订单号

transactionType

String

交易类型 01:代收 02:代付

回调通知示例

{
    "amount": "200.00",
    "countryId": "MEX",
    "fee": "11.48",
    "identifier": "078018503",
    "merId": "8302858375850055",
    "merOrderId": "20240509087436S20P0154104514",
    "nonceStr": "f861c17d-64eb-494a-be67-79066b",
    "realityAmount": "200.00",
    "realityFee": "11.48",
    "reference": "0117ed5c-3bce-4d5c-8740-a346ce76e8b4",
    "sign": "8AC0AEB3BF6CC99632C8D7FDF4CED101",
    "status": "01",
    "supefinaOrderId": "202405090301003498176b135384e",
    "transactionType": "01"
}

回调通知响应

商户成功收到回调后需同步返回指定字符串:SUCCESS 不返回或返回其他内容默认通知失败 如:

public String test(){
	return "SUCCESS";
}

测试数据

测试环境提供了完整的支付功能,但它只是模拟处理,没有实际的银行交易。

可以使用以下信用卡信息来测试付款。

Visa

Card PAN
3-D Secure result
Transaction result

4000000000000085

3-D secure version 2, challenge flow, full authentication

Payment has CONFIRMED status

4580000000000059

3-D secure version 2, frictionless flow, attempt

Payment has CONFIRMED status

4000000000000093

3-D secure version 2, frictionless flow, success

Payment has CONFIRMED status

Mastercard

Card PAN
3-D Secure result
Transaction result

5100000000000065

3-D secure version 2, challenge flow, full authentication

Payment has CONFIRMED status

2400000000000069

3-D secure version 2, frictionless flow, attempt

Payment has CONFIRMED status

5100000000000073

3-D secure version 2, frictionless flow, success

Payment has CONFIRMED status

Maestro

Card PAN
3-D Secure result
Transaction result

5000000000000025

3-D secure version 2, challenge flow, full authentication

Payment has CONFIRMED status

5000000000000033

3-D secure version 2, frictionless flow, success

Payment has CONFIRMED status

5666666666666955

3-D secure version 2, challenge flow, full authentication

Payment has DECLINED status

Discover

Card PAN
3-D Secure result
Transaction result

6500000000000895

3-D secure version 2, challenge flow, full authentication

Payment has CONFIRMED status

6500000000000069

3-D secure version 2, frictionless flow, attempt

Payment has CONFIRMED status

6011000000000053

3-D secure version 2, frictionless flow, success

Payment has CONFIRMED status

JCB

Card PAN
3-D Secure result
Transaction result

3528000000000015

3-D secure version 2, challenge flow, full authentication

Payment has CONFIRMED status

3528000000000023

3-D secure version 2, frictionless flow, success

Payment has CONFIRMED status

3528000000000049

3-D secure version 2, frictionless flow, attempt

Payment has CONFIRMED status

UnionPay

Card PAN
3-D Secure result
Transaction result

6222020000000085

3-D secure version 2, challenge flow, full authentication

Payment has CONFIRMED status

8171000000000000079

3-D secure version 2, frictionless flow, attempt

Payment has CONFIRMED status

6200000000000053

3-D secure version 2, frictionless flow, success

Payment has CONFIRMED status

Amex

Card PAN
3-D Secure result
Transaction result

370000000000085

3-D secure version 2, challenge flow, full authentication

Payment has CONFIRMED status

340000000000033

3-D secure version 2, frictionless flow, success

Payment has CONFIRMED status

340000000000009

3-D secure version 2, frictionless flow, attempt

Payment has CONFIRMED status

在测试过程中,商户使用任意持卡人姓名、有效期和安全码与这些卡信息进行支付。为了完成认证,3-DS安全认证也通过一个页面模拟,该页面只显示两个按钮,一个按钮用于成功认证,另一个按钮用于认证失败。请注意,当商户选择认证失败时,无论使用了哪个PAN,支付总是会被拒绝。

如果测试过程中,遇到了异常状态码,请直接联系Supefina运营人员处理。

最后更新于