This page explains how to validate your TwoCoin widget integration before production rollout. Use this checklist to test core user flows, failure scenarios, and operational monitoring.
Validate the widget in staging first, then run a final smoke test in production after deployment.
| Environment | Purpose | What to Verify |
|---|---|---|
| Staging | Functional and regression validation | All URL params, event listeners, and end-to-end order lifecycle |
| Production | Post-release confirmation | Real domain + CSP + analytics + webhook delivery health |
Add a browser test that confirms the widget is reachable and interactive after each deploy.
// Example Playwright smoke test
import { test, expect } from '@playwright/test';
test('widget page renders and iframe loads', async ({ page }) => {
await page.goto('https://your-site.com/docs/widget/getting-started');
const frame = page.locator('iframe[title="TwoCoin Widget"]');
await expect(frame).toBeVisible();
});Test webhook handling with signature verification and idempotency logic before going live.
// Pseudo-test flow for webhook reliability
1. Create test order in widget
2. Capture webhook payload + signature
3. Verify signature on your server
4. Retry the same payload (duplicate) and ensure it is ignored safely
5. Confirm database status matches latest webhook stateIf 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).