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:

ParameterRequiredTypeDescription
appidYstringThe unique identifier of the application
timestampYstringCurrent UTC 13-digit timestamp, valid within 5 minutes
signYstringSignature, the signature method can be referenced here

Body Parameters:

ParameterRequiredTypeDescription
payWayCodeYstringPayment method code
fiatYstring3-letter fiat code, e.g.: USD
sideYstringBUY/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.
}

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.