API For Creating Virtual Card
Brief description
- Create a virtual card
Request method
- POST
open/api/card/create
Parameters
Parameter name | Required | Type | Length | Description |
---|---|---|---|---|
vid | Yes | string | Card segment id (USD) | |
+cardHolder | No | object | Cardholder | |
└firstName | Yes | string | 32 | Cardholder last name [a-zA-Z]{1,32} |
└lastName | Yes | string | 32 | Cardholder name [a-zA-Z]{1,32} |
deposit | Yes | String | 24 | Deposit amount (USD), 1000 represents 10.00 |
orderNo | Yes | string | 64 | Customized customer transaction flow id {1,64} |
callbackUrl | Yes | string | 256 | Callback address {1,256} |
Notes
-
deposit is the amount of virtual card recharge (initial deposit), 1 represents 1 cent, that is, 1000 represents 10.00, all amounts in this system (such as balance) use this rule
-
Single recharge amount range: 10 USD - 5000 USD
-
vid is the card segment id, query the card segments you can use by getting the card segment list
-
To improve the user experience, creating a virtual card is an asynchronous operation. After creating a virtual card, the card usually goes through [Opening card -> Creating cardholder -> Creating virtual card -> Activating card -> Activated
Request example
{
"cardHolder": {
"firstName": "Milton",
"lastName": "Schmitt"
},
"deposit": "1000",
"vid": "USD",
"orderNo": "v_5bc814",
"callbackUrl": "https://www.baidu.com"
}
Return parameter description
Parameter name | Type | Description |
---|---|---|
success | boolean | Success flag |
error | boolean | Error flag |
code | long | Return code |
msg | string | Return information |
traceId | string | traceId |
model | object | Return content |
Return object description
Parameter name | Type | Description |
---|---|---|
activeLink | string | Card activation link |
Return example
{
"code":"0",
"msg":"成功",
"model":{
"activeLink":"http://www.***.com/login?wallet=8012&token=eyJraWQiOiIybWE0ZW51MWtkdnc1Ym85eHNmcGkzZ2NqenJ0NnE3OHlsMGgiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiI3NGI5ZGM1ZmIyZTI5NjcxYjVjMzg0NGY3YTdkMzc2YSIsIm5hbWUiOiI1MDU4ODQ5NzhAcXEuY29tIiwiZW1haWwiOiI1MDU4ODQ5NzhAcXEuY29tIiwiYXVkIjoidXJuOm15LXJlc291cmNlLXNlcnZlciIsImlzcyI6Imh0dHBzOi8vd2ViM2F1dGguaW8iLCJpYXQiOjE3NDg5MzQxODcsImV4cCI6MTc0ODkzNzc4N30.i4hEwiajbiP4TbdxUFlxb-Xc7Bxf4-1TbELz9zn3tFexRePJxianb7n1_b9e8LCC5hrYWKD_12_YjNC2L7EtAbZgQ5p6Svy7TES7heL9x1MGRiiju_mIZOy712KLbnTo5_YmY4Nt4eO6-lhrUJPL5D8ZZe9k7DEA7ASuAfwf25fEhy1CGVUqRWSML6sq4o2tWLln1jjtKqZJWP95UBpsk_YIUUTTLAPifx0aqdFScdMpNjx_egBxYTG8E2ggqX5NUIoAu5wQgvrLqLaiRn7n7rKgdrFtIVNsQUjfnlc5_uZewYn_ZaVwu7wj78_5UBNy59nJtQGyPrFR2owAXY70HA"
},
"traceId":"665597457b9b37cb000187a035002030",
"success":true,
"error":false
}
Notes
- For more error codes, please see the error code description on the homepage
Updated 5 days ago