Create a virtual card
Brief Description
Create a virtual card
Request URL
/card/pay/api/core/create
Request Method
POST
Parameters
| Parameter Name | Required | Type | Length | Description |
|---|---|---|---|---|
| cardVid | Yes | string | 32 | Card segment ID |
| orderNo | Yes | string | 32 | Custom customer transaction ID |
| cardFirstName | Yes | string | 32 | First name on the card |
| cardLastName | Yes | string | 32 | Last name on the card |
| amount | Yes | string | 32 | Amount of the coin order |
| cardCurrency | Yes | string | 12 | Card currency (eg USD) |
| cryptoCurrency | Yes | string | 12 | Cryptocurrency code (eg ETH) |
| network | Yes | string | 32 | Network |
| callbackUrl | Yes | string | 256 | Callback URL |
Notes
vidis 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 Name | Type | Description |
|---|---|---|
| success | boolean | Success flag |
| error | boolean | Error flag |
| msg | string | Message of the response |
| code | integer | Response code |
| +model | object | Data object returned |
| └ tradeNo | string | Transaction number |
| └ address | string | Coin transfer address |
| └ customerPayNum | string | Merchant 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
Updated about 3 hours ago