⽀付⽅式表单查询

介绍

⽬前onramp仅⽀持信用卡、GooglePay、ApplePay

接口说明

请求方式: GET

请求路径: /open/api/v4/merchant/payment/requiredField

请求参数

Header参数:

参数名必选类型说明
appidYstring应用的唯一标识
timestampYstring当前 UTC 13 位时间戳, 5 分钟内有效
signYstring签名,签名方式可参考:这里

Body参数:

参数名必选类型说明
payWayCodeYstring支付方式code
fiatYstring3字母法币 code,例如:USD
sideYstringBUY/SELL

返回参数

示例

GooglePay 、ApplePay

{
    "success": true,
    "returnCode": "0000",
    "returnMsg": "SUCCESS",
    "extend": "",
    "data": [] //当返回data是空时,不需要做卡或者账⼾提交操作
}

Card

{
    "success": true,
    "returnCode": "0000",
    "returnMsg": "SUCCESS",
    "extend": "",
    "data": {
        "fields": [
            {
                "fieldName": "firstName",
                "fieldType": "String",
                "regex": "^[a-zA-Z]{1,128}$",
                "formElement": "text"
            },
            {
                "fieldName": "lastName",
                "fieldType": "String",
                "regex": "^[a-zA-Z]{1,128}$",
                "formElement": "text"
            },
            {
                "fieldName": "cardNumber",
                "fieldType": "String",
                "regex": "^[0-9]{16}$",
                "formElement": "text"
            },
            {
                "fieldName": "phoneAreaCode",
                "fieldType": "String",
                "regex": "^[0-9]{16}$",
                "formElement": "text"
            },
            {
                "fieldName": "bankId",
                "fieldType": "String",
                "regex": "^[0-9]{16}$",
                "formElement": "select",
            },
            {
                "fieldName": "expireDate",
                "fieldType": "String",
                "regex": "^[0-9]{4}-(0[1-9]|1[0-2])$",
                "formElement": "text"
            }
        ],
        "dataSource": {}
    }

Account

{
    "success": true,
    "returnCode": "0000",
    "returnMsg": "SUCCESS",
    "extend": "",
    "data": {
        "fields": [ //提交卡、账⼾表单字段列表
            {
                "fieldName": "accountNo",
                "fieldType": "string",
                "regex": "^\\d{9,16}$",
                "formElement": "input"
            },
            {
                "fieldName": "country",
                "fieldType": "string",
                "regex": "",
                "formElement": "select",
                "dataSourceKey": "countryList"
            },
            {
                "fieldName": "accountType",
                "fieldType": "string",
                "regex": "",
                "formElement": "select",
                "dataSourceKey": "accountTypeList"
            },
            {
                "fieldName": "bankId",
                "fieldType": "string",
                "regex": "",
                "formElement": "select",
                "dataSourceKey": "bankList"
            },
            {
                "fieldName": "bankName",
                "fieldType": "string",
                "regex": "",
                "formElement": "select",
                "dataSourceKey": "bankList"
            }
        ],
        "dataSource": { // 提交表单部分数据源
            "bankList": [
                {
                    "locationId": "4172",
                    "bankId": "4172",
                    "bankName": "DBS Bank Ltd, HK Branch",
                    "bankBranch": "Hong Kong DBS Bank Ltd, HK
Branch",
 "address": "Hong Kong DBS Bank Ltd, HK
Branch",
 "city": "Hong Kong",
                    "currency": "HKD",
                    "countryCode": "HK",
                    "country": "HK",
                    "transactionType": "B2C",
                    "channelCode": "57"
                },
                {
                    "locationId": "4173",
                    "bankId": "4173",
                    "bankName": "The Shizuoka Bank, Ltd.",
                    "bankBranch": "Hong Kong The Shizuoka Bank,
Ltd.",
 "address": "Hong Kong The Shizuoka Bank,
Ltd.",
 "city": "Hong Kong",
                    "currency": "HKD",
                    "countryCode": "HK",
                    "country": "HK",
                    "transactionType": "B2C",
                    "channelCode": "57"
                },
                {
                    "locationId": "4174",
                    "bankId": "4174",
                    "bankName": "The Hachijuni Bank Ltd",
                    "bankBranch": "Hong Kong The Hachijuni Bank
Ltd",
 "address": "Hong Kong The Hachijuni Bank
Ltd",
 "city": "Hong Kong",
                    "currency": "HKD",
                    "countryCode": "HK",
                    "country": "HK",
                    "transactionType": "B2C",
                    "channelCode": "57"
                }
            ],
            "accountTypeList": [
                {
                    "fieldName": "accountType",
                    "value": "SAVINGS",
                    "desc": "savings"
                },
                {
                    "fieldName": "accountType",
                    "value": "CHECKING",
                    "desc": "checking"
                },
                {
                    "fieldName": "accountType",
                    "value": "DEPOSIT",
                    "desc": "deposit"
                }
            ],
            "countryList": [
                {
                    "desc": "United States of America",
                    "value": "US",
                    "fieldName": "country"
                },
                {
                    "desc": "Angola",
                    "value": "AO",
                    "fieldName": "country"
                },
                {
                    "desc": "Aruba",
                    "value": "AW",
                    "fieldName": "country"
                }
            ]
        }
    }
}

备注:
当存在多个字段的"formElement": "select"并且dataSourceKey是相同的值,代表多个
字段需要通过同⼀个下拉列表进⾏赋值