This page provides solutions for common issues you might encounter when integrating or using the TwoCoin widget. If you're experiencing problems, refer to the troubleshooting steps below.

Widget Not Loading

If the widget fails to load on your website, check these common causes:

Iframe Loading Issues

Check that the widget iframe is correctly configured with the right URL:

<iframe src="https://your-widget-domain.com/widget" width="100%" height="800px"></iframe>

Solution: Verify that the iframe src URL is correct and accessible. Check the browser console for any loading errors or CSP violations.

Iframe Display Issues

The iframe may not display properly due to sizing or CSS issues.

Solution: Ensure the iframe has proper width and height attributes, and that the parent container has sufficient space. Set frameBorder="0" for a clean appearance.

Content Security Policy (CSP) Blocking

Your website's Content Security Policy may be blocking the widget from loading.

Solution: Update your CSP to allow iframes from your-widget-domain.com.

URL Parameter Issues

The widget may not reflect URL parameters or display incorrectly configured options.

Solution: Verify your URL parameters are correctly formatted:

<!-- Check parameter format -->
<iframe 
  src="https://your-widget-domain.com/widget?fromCurrency=USD&toCurrency=BTC&country=US"
  width="100%" 
  height="800px">
</iframe>

Widget Error Messages

Common error messages and their solutions:

Error MessagePossible CauseSolution
Invalid merchant IDThe merchant ID provided is incorrect or inactiveVerify your merchant ID in the TwoCoin dashboard and ensure it is active
API request failedNetwork connectivity issues or API endpoint problemsCheck your internet connection and confirm the TwoCoin API status
Unsupported currencyThe specified currency is not supportedCheck the list of supported currencies and update your configuration
Invalid wallet addressThe cryptocurrency wallet address format is invalidValidate the wallet address format for the specific cryptocurrency
Rate limit exceededToo many API requests in a short timeImplement request throttling and exponential backoff in your code

Payment Issues

Troubleshoot problems related to payments and transactions:

Payment Not Processing

If payments are not being processed after the user submits payment details:

  • Check that the payment method is available in the user's country
  • Verify that the cryptocurrency is supported for the chosen payment method
  • Confirm the payment amount is within the allowed limits
  • Check for any payment provider outages in the TwoCoin status page

Order Stuck in Processing

If an order remains in the "processing" state for an extended period:

  • Check the order status in the TwoCoin merchant dashboard
  • Verify that webhook deliveries are not being blocked by your server
  • Some payment methods may take longer to process (e.g., bank transfers)
  • Contact TwoCoin support if an order remains stuck for more than 24 hours

Webhook Issues

If you're not receiving webhook notifications for order status updates:

Webhook Configuration

  • Verify that your webhook URL is correctly configured in the TwoCoin dashboard
  • Ensure your endpoint is publicly accessible and returns a 200 response
  • Check that your server is not blocking POST requests to the webhook endpoint

Webhook Processing

  • Log all incoming webhook requests for debugging purposes
  • Verify that signature verification is implemented correctly
  • Check server logs for any errors in webhook processing
// Example webhook debugging code
app.post('/webhooks/twocoin', express.raw({type: 'application/json'}), (req, res) => {
  // Log incoming webhook data
  console.log('Webhook received:', {
    headers: req.headers,
    body: req.body.toString(),
    timestamp: new Date().toISOString()
  });

  try {
    // Process webhook normally
    // ...

    // Respond with success
    res.status(200).send('Webhook received');
  } catch (error) {
    // Log errors but still return 200 to acknowledge receipt
    console.error('Webhook processing error:', error);
    res.status(200).send('Webhook received with processing error');
  }
});

Browser Compatibility Issues

The TwoCoin widget is designed to work in all modern browsers, but you may encounter issues in older browsers:

BrowserMinimum VersionKnown Issues
Chrome60+None
Firefox60+None
Safari11+May have issues with certain animations
Edge16+None
Internet ExplorerNot supportedWidget will not function in Internet Explorer

Mobile-Specific Issues

If you're encountering problems with the widget on mobile devices:

  • Layout Issues: Ensure the container has a responsive width (e.g., 100%) and adequate padding
  • Input Fields: Check that form inputs are easily tappable and not too close together
  • Performance: Mobile devices may experience slower loading times; consider implementing a loading state
  • Redirects: Ensure that redirect URLs work properly on mobile browsers

Debugging Tools

Use browser developer tools to debug iframe integration issues:

// Check if iframe is loading correctly
const iframe = document.querySelector('iframe');
console.log('Iframe src:', iframe.src);
console.log('Iframe dimensions:', iframe.width, 'x', iframe.height);

// Listen for iframe load events
iframe.addEventListener('load', function() {
  console.log('Widget iframe loaded successfully');
});

iframe.addEventListener('error', function() {
  console.error('Widget iframe failed to load');
});

// Check for console errors from the iframe
// (Note: Cross-origin restrictions may limit visibility)

Getting Further Help

If you've tried the troubleshooting steps above and are still experiencing issues, you can:

  • Contact TwoCoin support through the merchant dashboard
  • Reach out via Telegram at @cs_2coin
  • Send detailed information about the issue, including:
    • -
      Browser version and device information
    • -
      Error messages and console logs
    • -
      Steps to reproduce the issue
    • -
      Any recent changes to your integration

Next Steps

Support

If you encounter any issues or have questions not addressed in this documentation, please contact our support team on Telegram at https://t.me/cs_2coin (@cs_2coin).