Testing and Verifying Postbacks #
Once your postback endpoint is configured and activated, it’s critical to verify that everything works as expected — before relying on it in production.
This section walks you through how to test your integration and debug issues if postbacks are not received or processed.
What You Need Before Testing #
Make sure:
- Your Telegram Mini App is live or in testable state
- Monetag SDK is integrated and functional
- Postbacks are activated for your main zone (via support or manager)
- You have a working, publicly accessible postback URL
- You’re using a rewarded format: Rewarded Interstitial or Rewarded Popup
How to Trigger a Postback #
To test postback delivery, follow these steps:
- Open your Mini App inside Telegram
- Perform the action that triggers the ad (e.g. press a reward button)
- Wait for the ad to show or the popup to open
- Allow the ad to complete (for Interstitial) or accept the popup (for Popup)
- Wait a few seconds — the Monetag backend will process the event
If everything is set up correctly, your postback URL should be called automatically.
How to Monitor and Debug #
We recommend the following for all test and production environments:
✅ Log Every Request #
Make sure your backend logs all incoming GET requests to your postback URL:
console.log("Postback received:", req.query);
This is your primary tool to verify that events are delivered.
✅ Test Manually Using a URL #
You can simulate a postback by replacing macros in your URL with dummy values:
https://yourdomain.com/postback?
ymid=test123
&event=impression
&value=valued
&zone=1001
&sub=1101
&price=0.0042
&source=bonus_screen
&telegram_id=987654321
Paste the URL into a browser or use curl
:
curl "https://yourdomain.com/postback?ymid=test123&event=impression&value=valued&zone=1001"
This allows you to test your handler independently from ad events.
✅ Use Browser DevTools (Optional) #
If your backend doesn’t receive postbacks:
- Check for ad errors in the browser console (DevTools → Console)
- Verify that the SDK is loading the correct
zone_id
- Make sure the app is not blocking outgoing traffic
Common Issues #
No postback received
→ Check zone activation, ad format, event flow, and retry settings.404 or 500 errors in logs
→ Ensure your server route exists and responds with200 OK
.Duplicate postbacks
→ Make your logic idempotent usingymid
.Unexpected values in macros
→ Log and inspect real postback requests before applying business logic.telegram_id
is empty or null
→ This is normal if Telegram does not provide the ID for that session.
Final Verification Checklist #
- Ad is shown successfully inside your app
- Monetag SDK returns a frontend
.then()
callback (optional) - Postback is triggered and reaches your server
- All expected parameters are present (
ymid
,event_type
, etc.) - You confirm
reward_event_type === valued
before issuing a reward - Logging and monitoring are active
If you encounter issues during testing, contact your Monetag account manager or reach out via the Support Chat in your dashboard. Our team can simulate traffic or help verify zone configuration.