🌐 Virtual Card API Middleware — Documentation
Welcome!
This API allows you to easily issue, top-up, and manage your virtual cards securely and reliably.
🔐 Authentication
All requests must include a Bearer token in the Authorization
header.
Example:
http
Get TokenAuthorization: Bearer YOUR_API_TOKEN
If the token is missing or invalid, the server will return a 401 Unauthorized error.
📚 Available Endpoints
1. List BIN Options
GET /wp-json/vc-api/v1/get-bins
- Description: Retrieve a list of available card BINs you can use for issuing cards.
- No parameters required.
Example Response:
json
{ "success": true, "data": [ { "bin": "428836", "actualRechargeFeeRate": "5%", "actualOpenCardPrice": "2.00" } ] }
2. Issue a New Card
POST /wp-json/vc-api/v1/issue-card
- Description: Issue a new virtual card.
- Required parameters:
cardBin
(string) — The BIN to use.amount
(float) — Initial balance to load onto the card.email
(optional, string) — Email address linked to the card.
Body Example:
json
{ "cardBin": "428836", "amount": 10.00, "email": "user@example.com" }
Example Response:
json
{ "success": true, "id": "250308034109062070", "state": 1, "create_time": "2025-03-07T19:41:10.000+00:00" }
3. Get Card Issuance Details
POST /wp-json/vc-api/v1/card-details
- Description: Retrieve details about a card you have issued.
- Required parameter:
card_id
(string) — The order ID received when issuing the card.
Body Example:
json
{ "card_id": "250308034109062070" }
Example Response:
json
{ "success": true, "data": { "id": "250308034109062070", "state": 10, "userBankCardId": "464654546" } }
4. Recharge a Card
POST /wp-json/vc-api/v1/recharge-card
- Description: Add more funds to an existing card.
- Required parameters:
amount
(float) — Amount to add.- Either
userBankCardId
orcardNum
must be provided.
Body Example:
json
{ "amount": 20.00, "cardId": "250308034109062070" }
Example Response:
json
{ "success": true, "message": "Recharge Success" }
5. Get Card Details by userBankId
GET /wp-json/vc-api/v1/get-card
- Description: Retrieve information about a specific active card by its userBankId.
- Required parameter:
userBankId
(string) — The ID associated with your card.
Query Example:
http
/wp-json/vc-api/v1/get-card?userBankId=464654546
Example Response:
json
{ "success": true, "data": { "id": "250308034109062070", "state": 1, "balance": "2.10", "number": "4288360072991626", "expiryDate": "03/28", "cvv": "457", "organization": "VISA", "createTime": "2025-03-07T19:41:10.000+00:00" } }
6. List My Cards
GET /wp-json/vc-api/v1/my-cards
- Description: List all virtual cards associated with your user account.
Example Response:
json
{ "success": true, "cards": [ { "id": 1, "card_bin": "428836", "balance": "10.00", "card_id": "250308034109062070", "created_at": "2025-03-07 22:00:00" } ] }
⚠️ Important Notes
- All requests must be authenticated.
- The minimum recharge amount is $10.
- You can only issue cards if you have sufficient account balance.
- Your API token must always be kept secure.
- If anything goes wrong, the API will return a proper error message with a status code.
📞 Need Help?
If you encounter any issues, please contact support through your dashboard or email.
🚀 Start Building Now!
With this API, you can create and manage your own virtual cards with ease.
Issue, top-up, view, and manage — all in one place! 🎯