API Documentation
Official documentation for Visa API endpoints. Integrate payments, verify transactions, and manage KHQR codes efficiently with comprehensive examples and guides.
Quick Start
Get started with Visa API in minutes. Follow these steps to make your first API call and integrate payments into your application.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| bank_account | String | Required | Bank account for payment (e.g., lim_visa1@trmc) |
| merchant_name | String | Required | Name displayed to customer |
| amount | Number | Optional | Payment amount (0 for static QR) |
Example Request
# Working cURL example with JSON format
curl -X POST "https://www.visatopup.shop/api/bakong/create_payment" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY_HERE" \
-d '{
"bank_account": "lim_visa1@trmc",
"merchant_name": "VISA TOPUP",
"amount": 10
}'
Example Response
Authentication
Visa API uses API keys for authentication. Include your API key in all requests to the API.
Getting Your API Key
1. Sign up for a Visa API account
2. Go to your Dashboard → API Keys
3. Generate a new API key
4. Keep your API key secure and never share it publicly
Using Your API Key
Include your API key in the Authorization header of all requests:
Authorization: Bearer YOUR_API_KEY_HERE
Content-Type: application/json
Security Best Practices
- Never commit API keys to version control
- Use environment variables for API keys
- Rotate API keys regularly
- Use different keys for development and production
- Restrict API key permissions when possible
Bakong API
Complete API reference for Bakong KHQR payment integration. Generate QR codes, check payment status, and manage transactions.
Parameters
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
| bank_account | String | Required | Bank account for payment | lim_visa1@trmc |
| merchant_name | String | Required | Name displayed to customer | VISA TOPUP |
| amount | Float | Optional | Payment amount (0 for static QR) | 0 |
| merchant_city | String | Optional | Merchant city | Sihanoukville |
| currency | String | Optional | Currency code | USD |
Example Request
curl -X POST "https://www.visatopup.shop/api/bakong/create_payment" \
-H "Authorization: Bearer YOUR_API_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{
"bank_account": "lim_visa1@trmc",
"merchant_name": "Game Store",
"amount": 9.99,
"currency": "USD"
}'
Example Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| md5_hash | String | Required | MD5 hash from create_payment response |
Example Request
curl -X POST "https://www.visatopup.shop/api/bakong/check_payment/md5" \
-H "Authorization: Bearer YOUR_API_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{
"md5_hash": "e99a18c428cb38d5f260853678922e03"
}'
Example Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| transaction_id | String | Required | Transaction ID from create_payment response |
Example Request
curl -X POST "https://www.visatopup.shop/api/bakong/check_payment/transaction_id" \
-H "Authorization: Bearer YOUR_API_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{
"transaction_id": "TRX1704067200"
}'
Example Response
Game Verification API
Verify user accounts for popular games. Supports Mobile Legends, Free Fire, PUBG Mobile, Honor of Kings, Magic Chess GoGo, Bloodstrike and more.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| player_id | String/Number | Required | Mobile Legends player ID |
| zone_id | String/Number | Required | Mobile Legends zone/server ID |
Example Request
curl -X POST "https://www.visatopup.shop/api/check_username/ml" \
-H "Authorization: Bearer YOUR_API_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{
"player_id": "123456789",
"zone_id": "8888"
}'
Example Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| player_id | String/Number | Required | Free Fire player ID |
Example Request
curl -X POST "https://www.visatopup.shop/api/check_username/ff" \
-H "Authorization: Bearer YOUR_API_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{
"player_id": "987654321"
}'
Example Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| player_id | String/Number | Required | PUBG Mobile player ID |
| zone_id | String | Optional | PUBG Mobile zone ID (optional) |
Example Request
curl -X POST "https://www.visatopup.shop/api/check_username/pubg" \
-H "Authorization: Bearer YOUR_API_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{
"player_id": "555555555"
}'
Example Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| player_id | String/Number | Required | Honor of Kings player ID |
Example Request
curl -X POST "https://www.visatopup.shop/api/check_username/hok" \
-H "Authorization: Bearer YOUR_API_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{
"player_id": "777777777"
}'
Example Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| player_id | String/Number | Required | Magic Chess GoGo player ID |
| zone_id | String | Optional | Zone ID (optional, default: empty) |
Example Request
curl -X POST "https://www.visatopup.shop/api/check_username/mcg" \
-H "Authorization: Bearer YOUR_API_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{
"player_id": "999999999",
"zone_id": "1001"
}'
Example Response
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| player_id | String/Number | Required | Bloodstrike player ID |
Example Request
curl -X POST "https://www.visatopup.shop/api/check_username/bloodstrike" \
-H "Authorization: Bearer YOUR_API_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{
"player_id": "888888888"
}'
Example Response
Error Handling
Common error responses and how to handle them in your application.
Common Error Codes
| Status Code | Error Code | Description | Solution |
|---|---|---|---|
| 400 | BAD_REQUEST | Invalid request parameters | Check required parameters and data types |
| 401 | UNAUTHORIZED | Invalid or missing authentication | Check API key or authentication headers |
| 403 | FORBIDDEN | Access denied to resource | Check permissions or account status |
| 404 | NOT_FOUND | Resource not found | Check endpoint URL and resource ID |
| 405 | METHOD_NOT_ALLOWED | HTTP method not supported | Use correct HTTP method (GET, POST, etc.) |
| 429 | TOO_MANY_REQUESTS | Rate limit exceeded | Wait before making more requests |
| 500 | INTERNAL_ERROR | Server error | Contact support if persists |
Error Response Format
Rate Limiting
API rate limits to ensure fair usage and system stability.
Rate Limits
| Endpoint Category | Limit | Window | Notes |
|---|---|---|---|
| Bakong Payment Creation | 100 requests | 1 minute | Per merchant account |
| Payment Verification | 300 requests | 1 minute | Unlimited for paid plans |
| Game Verification | 200 requests | 1 minute | Per game endpoint |
| All Other Endpoints | 500 requests | 1 minute | Overall API limit |
Rate Limit Headers
Webhooks
Receive real-time notifications for payment events and game verifications.
Webhook Events
| Event Type | Trigger | Payload |
|---|---|---|
| payment.created | New payment QR created | Payment details + QR data |
| payment.paid | Payment successfully completed | Transaction details + amount |
| payment.expired | Payment QR expired | Transaction ID + expiry time |
| payment.failed | Payment failed or cancelled | Error details + transaction ID |
| verification.success | Game account verified | Game + username + player ID |
| verification.failed | Game account verification failed | Game + player ID + error |
Webhook Payload Example
Pricing
Transparent pricing plans for all API usage. No hidden fees.
Pricing Plans
| Feature | Free | Pro | Enterprise |
|---|---|---|---|
| Monthly Requests | $0 | $0 | Unlimited |
| Bakong Transactions | $2/month | $5/5month | Unlimited |
| Game Verifications | $0 | $0 | Unlimited |
| Webhooks | ✓ | ✓ | ✓ |
| API Support | Community | 24/7 Priority | |
| Rate Limits | Advanced | Increased | Custom |
| Price | $2/month | $5/5month | Custom |
Frequently Asked Questions
Common questions about Visa API integration and usage.
General Questions
Q: How do I get an API key?
A: Sign up on our website and generate your API key from the dashboard. Free tier available for testing.
Q: What games are supported?
A: Mobile Legends, Free Fire, PUBG Mobile, Honor of Kings, Magic Chess GoGo, Bloodstrike, and more.
Q: How long do payments take to process?
A: Bakong payments are instant. Game top-ups typically complete within 1-5 minutes.
Q: Is there a sandbox/test environment?
A: Yes, use the test API endpoint with test credentials provided in your dashboard.
Technical Questions
Q: What is the expiry time for payment QR codes?
A: QR codes expire after 30 minutes by default. You can check status using MD5 hash or transaction ID.
Q: Can I use the API for production immediately?
A: Yes, after testing with the free tier. Upgrade to Pro for higher limits and priority support.
Q: How do webhooks work?
A: Configure a webhook URL in your dashboard to receive real-time notifications for payments and verifications.
Changelog
Version history and recent updates to the Visa API.
Recent Updates
v2.0.0 - December 2025
- Added Magic Chess GoGo verification
- Added Bloodstrike verification
- Improved payment verification accuracy
- Added webhook support for all events
- Enhanced rate limiting system
- Updated documentation with examples
- Added country detection for Mobile Legends
v1.5.0 - November 2025
- Added PUBG Mobile verification
- Improved error handling and messages
- Added country detection for ML
- Performance optimizations
- Fixed QR code generation issues
v1.0.0 - October 2025
- Initial release of Visa API
- Bakong KHQR payment integration
- Mobile Legends and Free Fire verification
- Basic payment status checking
- Documentation and examples