Create a virtual card

Brief Description

Create a virtual card

Request URL

/card/pay/api/core/create

Request Method

POST

Parameters

Parameter NameRequiredTypeLengthDescription
cardVidYesstring32Card segment ID
orderNoYesstring32Custom customer transaction ID
cardFirstNameYesstring32First name on the card
cardLastNameYesstring32Last name on the card
amountYesstring32Amount of the coin order
cardCurrencyYesstring12Card currency (eg USD)
cryptoCurrencyYesstring12Cryptocurrency code (eg ETH)
networkYesstring32Network
callbackUrlYesstring256Callback URL

Notes

  • vid is the card segment ID obtainable through querying the list of available card segments
  • To enhance user experience creating a virtual card is an asynchronous operation After creating a virtual card the card typically goes through the following states: **OpenCard

Request Example

{
    orderNun: 123143135
    amount: 1
    callbackUrl: http://**com/callbcak
    cardFirstName: zhang
    cardLastName: shan
    cardVid: vab_0d943d725792
    cardCurrency: USD
    cryptoCurrency: ETH
    network: BSC
}

Response Parameter Description

Parameter NameTypeDescription
successbooleanSuccess flag
errorbooleanError flag
msgstringMessage of the response
codeintegerResponse code
+modelobjectData object returned
└ tradeNostringTransaction number
└ addressstringCoin transfer address
└ customerPayNumstringMerchant number

Response Example

{  
    success: true  
    error:false  
    msg: Success  
    code: 0  
    model: {  
        tradeNo: 123133213131313131  
        customerPayNum:2233111445  
        address:0xa6d057a1e3d807c31233b2e5892efc5672a24b61  
    }  
    traceId: 1646648711017  
}

Note
For more error codes in the response please refer to the error code description on the homepage