Skip to content

Support & FAQ

Comprehensive support resources, troubleshooting guides, and frequently asked questions for Bebas Kirim partners.

Quick Support

Emergency Support

Standard Support

Developer Support

Support Channels

ChannelResponse TimeAvailabilityBest For
Email2-4 hours24/7General inquiries
Live Chat5-15 minutesBusiness hoursQuick questions
PhoneImmediate24/7Critical issues
WhatsApp5-30 minutes24/7Urgent issues
Community1-24 hours24/7Peer support
DocumentationSelf-service24/7Technical 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 behavior

3. 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 here

Error Response:

json
// Full error response

Environment:

  • 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:

  1. Go to partner dashboard > Webhooks
  2. Add your webhook URL
  3. Select events to subscribe to
  4. Test with sample payload
  5. Save configuration

Q: My webhooks aren't being received

A: Check:

  1. URL accessibility: Ensure your endpoint is publicly accessible
  2. HTTPS: Webhooks require HTTPS URLs
  3. Response: Your endpoint must return 200 status
  4. Timeout: Response within 30 seconds
  5. 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?

CodeDescriptionSolution
INVALID_API_KEYInvalid or missing API keyCheck your API key
RATE_LIMIT_EXCEEDEDToo many requestsImplement backoff
INVALID_PARAMETERMissing or invalid parametersCheck request format
INSUFFICIENT_BALANCENot enough creditsTop up your account
SERVICE_UNAVAILABLETemporary service issueRetry later
INVALID_COURIERUnsupported courierUse 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:

  1. Use sandbox environment: environment: 'sandbox'
  2. Use test API key from dashboard
  3. Test data is automatically cleaned up after 24 hours

Q: Can I reset my sandbox data?

A: Yes, in your sandbox dashboard:

  1. Go to Settings > Sandbox
  2. Click "Reset All Data"
  3. 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:

  1. Go to partner dashboard > Billing
  2. Select amount to add
  3. Choose payment method
  4. Complete payment
  5. Credits added instantly

Integration Issues

Q: My integration stopped working

A: Check:

  1. API key validity: May have expired
  2. Rate limits: Check if exceeded
  3. API changes: Review changelog
  4. Network issues: Check connectivity
  5. 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-certificates

2. 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

3. Stack Overflow

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