Testnet Environment
For: Developers who want to test blockchain integrations safely before going to production.
You'll learn: How to use Loyalteez testnet, what it's for, and how it differs from mainnet.
What is Testnet?โ
Testnet is a separate blockchain environment used for testing onchain assets and contract integrations in a safe environment, before deploying to production.
Why Use Testnet?โ
Think of testnet like:
- ๐งช A laboratory - Safe place to experiment
- ๐ฎ A sandbox - No real money at risk
- ๐ง A staging environment - Test before production
- ๐ A risk-free zone - Mistakes don't cost real tokens
Key Benefitsโ
โ
No Real Value - Test tokens have no monetary value
โ
Free Testing - No gas fees or transaction costs
โ
Safe Experimentation - Try different approaches without risk
โ
Production Parity - Same contracts, same behavior as mainnet
โ
Stripe Sandbox - Test payments without real charges
When to Use Testnetโ
โ Use Testnet For:โ
- Initial Integration - First time connecting to Loyalteez
- Testing New Features - Before rolling out to users
- Debugging Issues - Reproducing and fixing bugs
- Learning - Understanding how the system works
- Demo/Prototypes - Showing functionality to stakeholders
- CI/CD Testing - Automated test suites
โ Don't Use Testnet For:โ
- Production Rewards - Real users need mainnet
- Real Payments - Use mainnet Stripe for actual transactions
- Final User Testing - Use mainnet for production validation
Testnet vs Mainnetโ
| Feature | Testnet | Mainnet |
|---|---|---|
| Domain | .xyz | .app |
| Tokens | Test LTZ (no value) | Real LTZ (has value) |
| Payments | Stripe Sandbox | Stripe Live |
| Blockchain | Soneium Minato | Soneium Mainnet |
| Purpose | Testing & Development | Production |
| Cost | Free | Real gas fees |
Testnet Configurationโ
Base URLsโ
| Service | Testnet URL | Mainnet URL |
|---|---|---|
| Event Handler | https://api.loyalteez.xyz | https://api.loyalteez.app |
| Gas Relayer | https://relayer.loyalteez.xyz | https://relayer.loyalteez.app |
| Pregeneration | https://register.loyalteez.xyz | https://register.loyalteez.app |
| Partner Portal | https://partners.loyalteez.xyz | https://partners.loyalteez.app |
| SDK | https://api.loyalteez.xyz/sdk.js | https://api.loyalteez.app/sdk.js |
Blockchain Configurationโ
Network: Soneium Minato Testnet
Chain ID: 1946
RPC URL: https://rpc.minato.soneium.org/
Block Explorer: https://soneium-minato.blockscout.com/
Contract Addresses (Testnet)โ
| Contract | Address | Description |
|---|---|---|
| Loyalteez Token | 0x8C894048a1313Df870f293a6Db6E744B244F6cf0 | Test LTZ token (EIP-2612 Permit) |
| PerkNFT | 0x4204EDEa4A7bE70f544bfe8BEFA8C43F3C198B1b | Perk NFT contract |
| PointsSale | 0x5121F2f9D59E558a2aE83EE31111DEF781923de2 | Points sale contract (V3) |
| USDC | 0xE9A198d38483aD727ABC8b0B1e16B2d338CF0391 | Test USDC token |
Note: These are testnet contracts deployed on November 17, 2025. They are separate from mainnet contracts and use test tokens only.
Stripe Sandbox Integrationโ
โ ๏ธ Important: Testnet Uses Stripe Sandboxโ
Testnet environments (.xyz domains) use Stripe's sandbox/test mode, not live payments.
What This Meansโ
โ
No Real Charges - Test payments don't charge real credit cards
โ
Test Cards - Use Stripe's test card numbers
โ
Safe Testing - Experiment with payment flows safely
โ
Same API - Same endpoints, same behavior as production
Test Card Numbersโ
Use these Stripe test cards for testing:
| Card Number | Result |
|---|---|
4242 4242 4242 4242 | Success |
4000 0000 0000 0002 | Card declined |
4000 0000 0000 9995 | Insufficient funds |
Expiry: Any future date (e.g., 12/34)
CVC: Any 3 digits (e.g., 123)
ZIP: Any 5 digits (e.g., 12345)
Stripe Testnet Endpointsโ
Testnet Stripe Checkout:
POST https://api.loyalteez.xyz/loyalteez-api/create-checkout
Testnet Stripe Mint:
POST https://api.loyalteez.xyz/loyalteez-api/stripe-mint
Remember: All payments on
.xyzdomains use Stripe sandbox mode automatically.
How to Use Testnetโ
Step 1: Sign Up for Testnetโ
- Go to partners.loyalteez.xyz
- Sign up with your email
- Get your Brand ID (testnet Brand ID is separate from mainnet)
Step 2: Update Your Integrationโ
JavaScript SDK:
<!-- Testnet SDK -->
<script src="https://api.loyalteez.xyz/sdk.js"></script>
<script>
Loyalteez.init('YOUR_BRAND_ID', {
apiUrl: 'https://api.loyalteez.xyz' // Testnet API
});
</script>
REST API:
// Testnet endpoint
fetch('https://api.loyalteez.xyz/loyalteez-api/manual-event', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
brandId: 'YOUR_BRAND_ID',
eventType: 'test_event',
userEmail: '[email protected]'
})
});
Step 3: Test Your Integrationโ
- Send test events - Use test emails (e.g.,
[email protected]) - Check transactions - View on Soneium Minato Block Explorer
- Verify rewards - Check Partner Portal for testnet data
- Test payments - Use Stripe test cards
Step 4: Switch to Mainnetโ
Once testing is complete:
- Update URLs - Change
.xyzto.app - Update Brand ID - Get your mainnet Brand ID
- Update Contracts - Use mainnet contract addresses
- Switch Stripe - Use live Stripe keys (not sandbox)
Environment Detectionโ
Automatic Detectionโ
The SDK can automatically detect testnet vs mainnet based on the domain:
// Automatically detects based on current domain
Loyalteez.init('YOUR_BRAND_ID');
// If on partners.loyalteez.xyz โ uses testnet
// If on partners.loyalteez.app โ uses mainnet
Manual Configurationโ
You can also explicitly set the environment:
// Force testnet
Loyalteez.init('YOUR_BRAND_ID', {
apiUrl: 'https://api.loyalteez.xyz',
environment: 'testnet'
});
// Force mainnet
Loyalteez.init('YOUR_BRAND_ID', {
apiUrl: 'https://api.loyalteez.app',
environment: 'mainnet'
});
Testnet Limitationsโ
What Works the Sameโ
โ
All API endpoints
โ
Contract interactions
โ
Wallet creation
โ
Event tracking
โ
Gas relayer
โ
Perk claiming
What's Differentโ
โ ๏ธ Separate Data - Testnet data is isolated from mainnet
โ ๏ธ Test Tokens - LTZ tokens have no real value
โ ๏ธ Stripe Sandbox - Payments don't charge real cards
โ ๏ธ Separate Brand IDs - Need different Brand ID for testnet
Testing Checklistโ
Before moving to production, test:
- Event Tracking - Events are recorded correctly
- Wallet Creation - Wallets are created automatically
- LTZ Distribution - Tokens are sent to user wallets
- Perk Claims - Users can claim perks with LTZ
- Stripe Payments - Payment flow works (sandbox)
- Gas Relayer - Gasless transactions work
- Error Handling - Errors are handled gracefully
- Edge Cases - Test unusual scenarios
Common Testnet Questionsโ
"Do I need a separate account?"โ
Yes. Testnet and mainnet are completely separate:
- Different Partner Portal accounts
- Different Brand IDs
- Different data
- Different wallets
"Can I use the same Brand ID?"โ
No. Testnet and mainnet have separate Brand IDs. You'll need to:
- Sign up on testnet โ Get testnet Brand ID
- Sign up on mainnet โ Get mainnet Brand ID
"Are testnet tokens worth anything?"โ
No. Testnet LTZ tokens have no monetary value. They're for testing only.
"Can I transfer testnet tokens to mainnet?"โ
No. Testnet and mainnet are completely separate blockchains. Tokens cannot be transferred between them.
"How do I get testnet LTZ?"โ
Testnet LTZ is distributed automatically when you:
- Track events via API
- Use the Partner Portal to distribute rewards
- Test payment flows (Stripe sandbox)
"Is testnet slower than mainnet?"โ
Usually yes. Testnet networks are typically less optimized than mainnet. Expect slightly longer transaction times.
Migration from Testnet to Mainnetโ
Step-by-Step Guideโ
- Complete Testing - Ensure all features work on testnet
- Document Configuration - Note all settings, Brand IDs, etc.
- Sign Up for Mainnet - Create account on
partners.loyalteez.app - Update Configuration - Change all
.xyzURLs to.app - Update Contract Addresses - Use mainnet contract addresses
- Update Stripe Keys - Switch from test to live Stripe keys
- Deploy - Push to production
- Monitor - Watch for any issues
Configuration Comparisonโ
| Setting | Testnet | Mainnet |
|---|---|---|
| API URL | api.loyalteez.xyz | api.loyalteez.app |
| SDK URL | api.loyalteez.xyz/sdk.js | api.loyalteez.app/sdk.js |
| Partner Portal | partners.loyalteez.xyz | partners.loyalteez.app |
| Chain ID | 1946 | 1868 |
| RPC URL | rpc.minato.soneium.org | rpc.soneium.org |
| Stripe Mode | Sandbox | Live |
Best Practicesโ
โ Doโ
- Test thoroughly - Use testnet for all initial development
- Test edge cases - Try unusual scenarios
- Test error handling - See how errors are handled
- Document issues - Note any problems you find
- Use test data - Don't use real user emails on testnet
โ Don'tโ
- Don't skip testnet - Always test before production
- Don't use real data - Use test emails, test cards
- Don't assume parity - Testnet may have slight differences
- Don't rush - Take time to test properly
Supportโ
Testnet Issues?โ
- Documentation: Check this guide and other docs
- Partner Portal: Use testnet portal at
partners.loyalteez.xyz - Block Explorer: Check transactions on Soneium Minato Explorer
Still Stuck?โ
Email [email protected] with:
- Your testnet Brand ID
- What you're trying to do
- Error messages (if any)
- Steps to reproduce
Quick Referenceโ
Testnet URLsโ
API: https://api.loyalteez.xyz
SDK: https://api.loyalteez.xyz/sdk.js
Portal: https://partners.loyalteez.xyz
Relayer: https://relayer.loyalteez.xyz
Pregeneration: https://register.loyalteez.xyz
Testnet Contractsโ
Loyalteez: 0x8C894048a1313Df870f293a6Db6E744B244F6cf0
PerkNFT: 0x4204EDEa4A7bE70f544bfe8BEFA8C43F3C198B1b
PointsSale: 0x5121F2f9D59E558a2aE83EE31111DEF781923de2
USDC: 0xE9A198d38483aD727ABC8b0B1e16B2d338CF0391
Testnet Networkโ
Chain ID: 1946
Network: Soneium Minato
RPC: https://rpc.minato.soneium.org/
Explorer: https://soneium-minato.blockscout.com/
Next Stepsโ
- Quick Start Guide - Get started with testnet
- API Reference - Testnet API endpoints
- SDK Reference - JavaScript SDK for testnet
- Testing Guide - Best practices for testing
Ready to test? Start at partners.loyalteez.xyz ๐