Payment Method Form Query
Introduction
Currently, onramp only supports Credit Cards, Google Pay, and Apple Pay.
API Description
Request Method: GET
Request Path: /open/api/v4/merchant/payment/requiredField
Request Parameters
Header Parameters:
Parameter | Required | Type | Description |
---|---|---|---|
appid | Y | string | The unique identifier of the application |
timestamp | Y | string | Current UTC 13-digit timestamp, valid within 5 minutes |
sign | Y | string | Signature, the signature method can be referenced here |
Body Parameters:
Parameter | Required | Type | Description |
---|---|---|---|
payWayCode | Y | string | Payment method code |
fiat | Y | string | 3-letter fiat code(ISO 4217), e.g.: USD |
side | Y | string | BUY/SELL |
Response Parameters
Examples
GooglePay, ApplePay
{
"success": true,
"returnCode": "0000",
"returnMsg": "SUCCESS",
"extend": "",
"data": [] // When the returned data is empty, no card or account submission is required.
}
Google Pay and Apple Pay don't need to call the "Submit Form" interface.
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": [ // Fields for submitting card or account form
{
"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": { // Data sources for some form fields
"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"
}
]
}
}
}
Notes:
When multiple fields have the same "formElement": "select"
and the dataSourceKey
is the same, it means that multiple fields use the same dropdown list for values.
Updated about 1 month ago