Virtual Card API Middleware
This REST API provides integration for issuing and managing virtual cards on ekame.net.
All endpoints require Bearer token authentication.
Base URL: https://ekame.net/wp-json/vc-api/v1/
Authentication
Get Token
Each request must include your API token as a Bearer token in the Authorization header:
Authorization: Bearer your_api_token
If the token is missing or invalid, the API will respond with a 401 error.
{
"code": "rest_forbidden",
"message": "API token is required in the Authorization header (Bearer token)",
"data": { "status": 401 }
}
Get Available BINs
GET /get-bins
Returns a list of available card BINs and their fees.
| Parameter | Type | Required | Description |
| - | - | - | No parameters |
curl -H "Authorization: Bearer <token>" \
https://ekame.net/wp-json/vc-api/v1/get-bins
Response Example:
{
"success": true,
"data": [
{
"bin": "559292",
"actualOpenCardPrice": "4.00",
"actualRechargeFeeRate": "6%"
}
]
}
Issue Card
POST /issue-card
Issues a new virtual card for the authenticated user.
| Parameter | Type | Required | Description |
| cardBin | string | Yes | BIN identifier from get-bins |
| amount | number | Yes | Initial card balance (USD) |
curl -X POST -H "Authorization: Bearer <token>" \
-d '{"cardBin":"559292","amount":100}' \
https://ekame.net/wp-json/vc-api/v1/issue-card
Response Example:
{
"success": true,
"card_id": "VCC250727001",
"state": 1,
"create_time": "2025-07-27 11:32:49"
}
Card Details
POST /card-details
Returns information for a specific card by card ID.
| Parameter | Type | Required | Description |
| card_id | string | Yes | Card ID |
curl -X POST -H "Authorization: Bearer <token>" \
-d '{"card_id":"VCC250727001"}' \
https://ekame.net/wp-json/vc-api/v1/card-details
Response Example:
{
"success": true,
"data": {
"card_id": "VCC250727001",
"state": 1,
"userBankCardId": "123456"
}
}
Recharge Card
POST /recharge-card
Recharges a virtual card balance.
| Parameter | Type | Required | Description |
| amount | number | Yes | Recharge amount |
| cardId | string | Yes (if cardNum not set) | Card ID |
| cardNum | string | Yes (if cardId not set) | Card Number |
curl -X POST -H "Authorization: Bearer <token>" \
-d '{"amount": 100, "cardId": "VCC250727001"}' \
https://ekame.net/wp-json/vc-api/v1/recharge-card
Response Example:
{
"success": true,
"data": {
"id": "111222333",
"userBankCardId": "4654654",
"state": "1",
"createTime": "2023-01-01 00:00:00",
"modifyTime": "2023-01-01 00:00:00",
"bankCard": {
"id": "111222333",
"organization": "VISA",
"state": "1",
"number": "55727101520444444",
"expiryDate": "10/25",
"cvv": "456",
"remark": "card 1",
"createTime": "2023-01-01 00:00:00",
"modifyTime": "2023-01-01 00:00:00",
"cardBalance": "100"
}
}
}
List User Cards
GET /my-cards
Returns a list of all virtual cards belonging to the authenticated user.
| Parameter | Type | Required | Description |
| - | - | - | No parameters |
curl -H "Authorization: Bearer <token>" \
https://ekame.net/wp-json/vc-api/v1/my-cards
Response Example:
{
"success": true,
"cards": [
{
"card_bin": "559292",
"balance_now": "100.00",
"card_id": "VCC250727001",
"userBankId": "123456",
"created_at": "2025-07-27 11:32:49"
}
]
}
Get Card by userBankId
GET /get-card?userBankId=...
Returns card details by userBankId (must belong to authenticated user).
| Parameter | Type | Required | Description |
| userBankId | string | Yes | User bank card ID |
curl -H "Authorization: Bearer <token>" \
"https://ekame.net/wp-json/vc-api/v1/get-card?userBankId=123"
Response Example:
{
"success": true,
"data": {
"id": "VCC250727001",
"state": "1",
"balance": "100.00",
"number": "55727101520444444",
"expiryDate": "10/25",
"cvv": "456",
"organization": "VISA",
"createTime": "2023-01-01 00:00:00"
}
}
Transaction History
GET /consume?number=...
Returns paginated transaction history for a card number.
| Parameter | Type | Required | Description |
| number | string | Yes | Card number |
| page | integer | No | Page number (default: 0) |
| pageSize | integer | No | Number of records per page (default: 20) |
curl -H "Authorization: Bearer <token>" \
"https://ekame.net/wp-json/vc-api/v1/consume?number=55727101520444444"
Response Example:
{
"success": true,
"total": 136,
"rows": [
{
"id": "UO250727193249000001",
"transactionId": "03ac2f57-8ca2-43d0-a618-f16a48500a77",
"cardNum": "55727101520444444",
"type": "Fee_Consumption",
"status": "Finish",
"amount": 0,
"merchantName": "Amazon",
"remark": "",
"recordTime": "2025-07-27T11:32:49.000+00:00",
"fee": 0
}
]
}