Support & FAQ
Comprehensive support resources, troubleshooting guides, and frequently asked questions for Bebas Kirim partners.
Quick Support
Emergency Support
- Critical Issues: support@bebas-kirim.com
- Phone: +62-21-1234-5678 (24/7)
- WhatsApp: +62-812-3456-7890
Standard Support
- Email: partners@bebas-kirim.com
- Response Time: 2-4 hours (business hours)
- Live Chat: Available in partner dashboard
Developer Support
- Technical Issues: dev@bebas-kirim.com
- API Issues: api@bebas-kirim.com
- Documentation: docs@bebas-kirim.com
Support Channels
| Channel | Response Time | Availability | Best For |
|---|---|---|---|
| 2-4 hours | 24/7 | General inquiries | |
| Live Chat | 5-15 minutes | Business hours | Quick questions |
| Phone | Immediate | 24/7 | Critical issues |
| 5-30 minutes | 24/7 | Urgent issues | |
| Community | 1-24 hours | 24/7 | Peer support |
| Documentation | Self-service | 24/7 | Technical reference |
Getting Help
1. Before Contacting Support
javascript
// Enable debug mode for detailed logs
const client = new BebasKirim({
apiKey: 'your-api-key',
debug: true,
logger: {
log: (level, message, data) => {
console.log(`[${level}] ${message}`, data);
}
}
});
// Check API status
const status = await client.health.check();
console.log('API Status:', status);2. Information to Provide
When contacting support, include:
markdown
**Required Information:**
- Partner ID: [Your partner ID]
- API Key (last 4 digits): [****1234]
- Environment: [sandbox/production]
- Timestamp: [YYYY-MM-DD HH:MM:SS UTC]
- Request ID: [From response headers]
- Error Code: [If applicable]
**Optional Information:**
- Code snippet (minimal reproducible example)
- Full error response
- Steps to reproduce
- Expected vs actual behavior3. Support Ticket Template
markdown
**Subject**: [Brief description of issue]
**Description**:
[Detailed description of the issue]
**Steps to Reproduce**:
1. [Step 1]
2. [Step 2]
3. [Step 3]
**Expected Behavior**:
[What should happen]
**Actual Behavior**:
[What actually happens]
**Code Example**:
```javascript
// Your code hereError Response:
json
// Full error responseEnvironment:
- SDK Version: [e.g., 2.1.0]
- Language: [e.g., Node.js 18.17.0]
- OS: [e.g., Ubuntu 20.04]
## Frequently Asked Questions
### Authentication & API Keys
#### Q: How do I get my API key?
**A**:
1. Log into your [partner dashboard](https://partner.bebaskirim.com)
2. Navigate to Settings > API Keys
3. Click "Generate New Key"
4. Copy and store securely - you won't see it again!
#### Q: Can I have multiple API keys?
**A**: Yes, you can create multiple keys for different environments or applications. Each key can have different permissions.
#### Q: My API key was compromised, what should I do?
**A**:
1. Immediately revoke the key in your dashboard
2. Generate a new key
3. Update your applications with the new key
4. Monitor for any unauthorized usage
#### Q: How do I test my API key?
```javascript
const client = new BebasKirim({
apiKey: 'your-api-key',
environment: 'sandbox'
});
// Test authentication
try {
const response = await client.auth.test();
console.log('API key is valid:', response);
} catch (error) {
console.error('Invalid API key:', error.message);
}Rate Limiting
Q: What are the rate limits?
A:
- Sandbox: 100 requests per minute
- Production: 1000 requests per minute
- Enterprise: Custom limits available
Q: How do I handle rate limit errors?
javascript
const client = new BebasKirim({
apiKey: 'your-api-key',
retries: 3,
retryDelay: 1000
});
try {
const result = await client.orders.create(orderData);
} catch (error) {
if (error instanceof BebasKirim.RateLimitError) {
console.log('Rate limited. Retry after:', error.retryAfter);
// Implement exponential backoff
await delay(error.retryAfter * 1000);
}
}Q: Can I increase my rate limits?
A: Yes, contact support@bebas-kirim.com with:
- Your partner ID
- Current usage patterns
- Required limit increase
- Business justification
Webhooks
Q: How do I set up webhooks?
A:
- Go to partner dashboard > Webhooks
- Add your webhook URL
- Select events to subscribe to
- Test with sample payload
- Save configuration
Q: My webhooks aren't being received
A: Check:
- URL accessibility: Ensure your endpoint is publicly accessible
- HTTPS: Webhooks require HTTPS URLs
- Response: Your endpoint must return 200 status
- Timeout: Response within 30 seconds
- Signature verification: Ensure proper signature validation
Q: How do I verify webhook signatures?
javascript
const crypto = require('crypto');
function verifyWebhookSignature(payload, signature, secret) {
const expectedSignature = crypto
.createHmac('sha256', secret)
.update(payload, 'utf8')
.digest('hex');
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(`sha256=${expectedSignature}`)
);
}
// Usage
app.post('/webhook', (req, res) => {
const signature = req.headers['x-bebas-kirim-signature'];
const payload = JSON.stringify(req.body);
if (!verifyWebhookSignature(payload, signature, 'your-webhook-secret')) {
return res.status(400).send('Invalid signature');
}
// Process webhook
res.status(200).send('OK');
});Orders & Shipping
Q: How do I create an order?
javascript
const order = await client.orders.create({
items: [{
product_id: 'PROD-123',
quantity: 2
}],
shipping_address: {
name: 'John Doe',
address: 'Jl. Example No. 123',
city: 'Jakarta',
postal_code: '12345',
phone: '081234567890'
},
courier: {
code: 'jne',
service: 'REG'
}
});Q: Can I cancel an order?
A: Orders can be cancelled within 1 hour of creation or before pickup:
javascript
await client.orders.cancel('ORDER-123');Q: How do I get shipping rates?
javascript
const rates = await client.shipping.calculate({
origin: 'JKT',
destination: 'SUB',
weight: 1000,
courier: 'jne'
});Q: What couriers are supported?
A:
- JNE: REG, YES, OKE, SS
- TIKI: REG, ONS, SDS, HDS
- POS: REG, YES, ONS
- SiCepat: REG, YES, OKE, GOKIL
- J&T: REG, YES, OKE
- Wahana: REG, YES, OKE
Error Handling
Q: What do the error codes mean?
| Code | Description | Solution |
|---|---|---|
INVALID_API_KEY | Invalid or missing API key | Check your API key |
RATE_LIMIT_EXCEEDED | Too many requests | Implement backoff |
INVALID_PARAMETER | Missing or invalid parameters | Check request format |
INSUFFICIENT_BALANCE | Not enough credits | Top up your account |
SERVICE_UNAVAILABLE | Temporary service issue | Retry later |
INVALID_COURIER | Unsupported courier | Use supported courier |
Q: How do I debug API errors?
javascript
try {
const result = await client.orders.create(orderData);
} catch (error) {
console.error('Error details:', {
code: error.code,
message: error.message,
status: error.status,
details: error.details,
requestId: error.requestId
});
}Testing
Q: How do I test in sandbox?
A:
- Use sandbox environment:
environment: 'sandbox' - Use test API key from dashboard
- Test data is automatically cleaned up after 24 hours
Q: Can I reset my sandbox data?
A: Yes, in your sandbox dashboard:
- Go to Settings > Sandbox
- Click "Reset All Data"
- Confirm reset action
Q: How do I test webhooks in development?
javascript
// Use ngrok for local testing
// 1. Install: npm install -g ngrok
// 2. Run: ngrok http 3000
// 3. Use ngrok URL as webhook URL
const ngrok = require('ngrok');
ngrok.connect(3000).then(url => {
console.log('Webhook URL:', `${url}/webhook`);
});Billing & Credits
Q: How does billing work?
A:
- Prepaid: Purchase credits in advance
- Postpaid: Monthly billing (enterprise only)
- Pay-as-you-go: Automatic credit deduction
Q: How do I check my balance?
javascript
const balance = await client.account.getBalance();
console.log('Available credits:', balance.available);
console.log('Used credits:', balance.used);Q: How do I add credits?
A:
- Go to partner dashboard > Billing
- Select amount to add
- Choose payment method
- Complete payment
- Credits added instantly
Integration Issues
Q: My integration stopped working
A: Check:
- API key validity: May have expired
- Rate limits: Check if exceeded
- API changes: Review changelog
- Network issues: Check connectivity
- SSL certificates: Ensure valid certificates
Q: How do I migrate from v1 to v2 API?
A: See Migration Guide for detailed instructions.
Q: Can I use the API with serverless functions?
A: Yes, the API works with:
- AWS Lambda
- Google Cloud Functions
- Azure Functions
- Vercel Functions
- Netlify Functions
Example:
javascript
// AWS Lambda
exports.handler = async (event) => {
const client = new BebasKirim({
apiKey: process.env.BEBAS_KIRIM_API_KEY,
environment: 'production'
});
const result = await client.shipping.calculate(JSON.parse(event.body));
return {
statusCode: 200,
body: JSON.stringify(result)
};
};Troubleshooting Guide
1. Network Issues
Symptom: Connection timeouts
javascript
// Solution: Increase timeout
const client = new BebasKirim({
apiKey: 'your-api-key',
timeout: 60000, // 60 seconds
retries: 3
});Symptom: SSL certificate errors
bash
# Check SSL certificate
curl -v https://api.bebaskirim.com
# Update certificates (Ubuntu/Debian)
sudo apt-get update
sudo apt-get install ca-certificates2. Authentication Issues
Symptom: 401 Unauthorized
javascript
// Debug authentication
const client = new BebasKirim({
apiKey: 'your-api-key',
debug: true
});
// Check API key format
console.log('API key format:', /^bk_[a-zA-Z0-9]{32}$/.test('your-api-key'));3. Data Issues
Symptom: Invalid city codes
javascript
// Get valid city codes
const cities = await client.locations.getCities();
console.log('Available cities:', cities.data.map(c => `${c.code}: ${c.name}`));Symptom: Weight calculation errors
javascript
// Validate weight
const weight = 1000; // grams
if (weight < 100 || weight > 30000) {
throw new Error('Weight must be between 100g and 30kg');
}4. Performance Issues
Symptom: Slow API responses
javascript
// Implement caching
const NodeCache = require('node-cache');
const cache = new NodeCache({ stdTTL: 300 }); // 5 minutes
async function getCachedRates(request) {
const key = JSON.stringify(request);
const cached = cache.get(key);
if (cached) {
return cached;
}
const rates = await client.shipping.calculate(request);
cache.set(key, rates);
return rates;
}Community Resources
1. GitHub Discussions
2. Discord Community
- Server: Bebas Kirim Developers
- Channels:
- #general
- #api-help
- #showcase
- #announcements
3. Stack Overflow
- Tag your questions with
bebas-kirim - Browse existing questions
4. Blog & Tutorials
Status & Monitoring
1. API Status Page
- URL: status.bebaskirim.com
- Features:
- Real-time status
- Incident history
- Subscribe to updates
- Performance metrics
2. Health Check Endpoint
javascript
// Check API health
const health = await client.health.check();
console.log('API Status:', health.status);
console.log('Response Time:', health.response_time);3. Monitoring Integration
javascript
// Sentry integration
const Sentry = require('@sentry/node');
Sentry.init({
dsn: 'your-sentry-dsn',
integrations: [
new Sentry.Integrations.Http({ tracing: true })
]
});
// Monitor API calls
client.on('request', (request) => {
Sentry.addBreadcrumb({
category: 'api',
message: `API request: ${request.method} ${request.url}`,
data: request
});
});
client.on('error', (error) => {
Sentry.captureException(error);
});Contact Information
Business Hours
- Monday-Friday: 9:00 AM - 6:00 PM (WIB)
- Saturday: 9:00 AM - 1:00 PM (WIB)
- Sunday: Closed
Emergency Contacts
- Critical Issues: Available 24/7
- Phone: +62-21-1234-5678
- WhatsApp: +62-812-3456-7890
Office Locations
- Jakarta: Jl. Sudirman No. 123, Jakarta 10220
- Surabaya: Jl. Raya Darmo No. 456, Surabaya 60264
- Bandung: Jl. Asia Afrika No. 789, Bandung 40112