Integration FAQ
Common questions and answers about integrating with the OpenDev platform.
OAuth Integration
Q: Which OAuth providers are supported?
A: OpenDev supports the following OAuth providers:
- Google - For global users
- Facebook - For global users
- Apple Sign In - For iOS, macOS, and Web
- WeChat - For Chinese market users
- QQ - For Chinese market users
Q: What callback URL format should I use?
A: The callback URL format depends on your environment:
Production: https://yourdomain.com/auth/{provider}/callback
Development: http://localhost:3000/auth/{provider}/callback
Replace {provider} with: google, facebook, apple, wechat, or qq.
Q: How do I handle OAuth errors?
A: Common OAuth errors and solutions:
| Error Code | Description | Solution |
|---|---|---|
invalid_client |
Client ID or Secret is incorrect | Verify your OAuth credentials in OpenDev |
redirecturimismatch |
Callback URL doesn't match | Ensure the callback URL in provider console matches OpenDev config |
access_denied |
User denied authorization | Handle gracefully and show user-friendly message |
invalid_scope |
Requested scope not allowed | Check provider documentation for valid scopes |
Q: Can I use the same OAuth configuration for multiple environments?
A: It's recommended to use separate OAuth applications for each environment:
- Development - For local testing
- Staging - For pre-production testing
- Production - For live users
This ensures better security and easier debugging.
Q: How do I refresh an expired OAuth token?
A: Token refresh depends on the provider:
- Google/Facebook: Use the refresh token to obtain a new access token
- Apple: Refresh tokens are long-lived; re-authentication may be needed
- WeChat/QQ: Tokens typically have 30-day validity; refresh using the provided refresh token
Payment Integration
Q: What payment methods are supported?
A: OpenDev supports:
- Stripe - Credit cards, wallets (Web, Desktop)
- Google Play Billing - Android in-app purchases
- Apple In-App Purchase - iOS/macOS purchases
- WeChat Pay - Chinese mobile payments
Q: How do I test payments in development?
A: Each payment provider offers sandbox/test modes:
| Provider | Test Mode Setup |
|---|---|
| Stripe | Use test API keys (start with sktest) |
| Google Play | Add test accounts in Google Play Console |
| Apple IAP | Use Sandbox environment in App Store Connect |
| WeChat Pay | Apply for sandbox merchant account |
Q: How do I handle payment webhooks?
A: Webhook handling best practices:
- Verify signatures - Always validate webhook signatures
- Idempotency - Handle duplicate webhooks gracefully
- Quick response - Return 200 status within 5 seconds
- Async processing - Queue heavy processing for background jobs
- Logging - Log all webhook events for debugging
Q: What happens if a payment fails?
A: Payment failure handling:
- Client-side: Show appropriate error message to user
- Retry logic: Implement exponential backoff for retries
- Webhook: Listen for
payment_failedevents - User notification: Send email/push notification about failed payment
Q: How do I handle refunds?
A: Refund process varies by provider:
- Stripe: Use Stripe Dashboard or API to initiate refunds
- Google Play: Process through Google Play Console
- Apple IAP: Handle through App Store Connect
- WeChat Pay: Use merchant portal or API
SDK Integration
Q: Which platforms are supported?
A: OpenDev SDKs are available for:
- iOS (Swift/Objective-C)
- Android (Kotlin/Java)
- Desktop - Windows & macOS
- Web (JavaScript/TypeScript)
- Server (Node.js, Python, Java)
Q: What is the minimum SDK version requirement?
A: Minimum requirements:
- iOS: iOS 12.0+
- Android: API Level 21 (Android 5.0)+
- Desktop: Windows 10+, macOS 10.14+
- Web: ES6+ browsers
Q: How do I update the SDK?
A: SDK update process:
- Check the SDK Downloads page for latest versions
- Download the new SDK package
- Replace existing SDK files in your project
- Update configuration if required (check release notes)
- Test thoroughly before deploying
Q: How do I debug SDK issues?
A: Debugging tips:
- Enable debug logging: Set
debug: truein SDK configuration - Check console logs: Look for error messages and stack traces
- Verify configuration: Ensure app ID and credentials are correct
- Network inspection: Use Charles/Fiddler to inspect API calls
- Contact support: Provide logs and reproduction steps
Configuration
Q: How do I generate a configuration package?
A: Steps to generate configuration:
- Go to OpenDev Dashboard > Apps
- Select your application
- Navigate to Configuration Delivery tab
- Choose environment (Development/Production)
- Click Generate Configuration
- Download and integrate into your app
Q: What is the config.json format?
A: The configuration file contains:
{
"appId": "your-app-id",
"channelId": "channel-identifier",
"environment": "production",
"oauth": {
"providers": ["google", "apple"]
},
"payment": {
"providers": ["stripe"]
}
}
Q: How often should I update the configuration?
A: Configuration update recommendations:
- Development: Update frequently during development
- Production: Update when adding new features or providers
- Hotfixes: Push config updates for urgent fixes
Use CDN delivery for dynamic configuration updates without app releases.
Troubleshooting
Q: API requests are returning 401 Unauthorized
A: Common causes and solutions:
- Expired token: Refresh your access token
- Invalid credentials: Verify API key/secret
- Missing headers: Ensure
Authorization: Bearer {token}header is set - Wrong environment: Check you're using correct environment credentials
Q: Webhooks are not being received
A: Webhook troubleshooting:
- URL accessibility: Ensure webhook URL is publicly accessible
- HTTPS required: Most providers require HTTPS
- Firewall rules: Check firewall allows incoming connections
- Retry mechanism: Check provider's retry policy and logs
Q: How do I report a bug or request a feature?
A: Contact methods:
- Email: contact@zinben.com
- Dashboard: Use the feedback form in OpenDev Dashboard
- Documentation: Submit corrections through feedback links
Last updated: January 2026