Skip to main content

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โ€‹

FeatureTestnetMainnet
Domain.xyz.app
TokensTest LTZ (no value)Real LTZ (has value)
PaymentsStripe SandboxStripe Live
BlockchainSoneium MinatoSoneium Mainnet
PurposeTesting & DevelopmentProduction
CostFreeReal gas fees

Testnet Configurationโ€‹

Base URLsโ€‹

ServiceTestnet URLMainnet URL
Event Handlerhttps://api.loyalteez.xyzhttps://api.loyalteez.app
Gas Relayerhttps://relayer.loyalteez.xyzhttps://relayer.loyalteez.app
Pregenerationhttps://register.loyalteez.xyzhttps://register.loyalteez.app
Partner Portalhttps://partners.loyalteez.xyzhttps://partners.loyalteez.app
SDKhttps://api.loyalteez.xyz/sdk.jshttps://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)โ€‹

ContractAddressDescription
Loyalteez Token0x8C894048a1313Df870f293a6Db6E744B244F6cf0Test LTZ token (EIP-2612 Permit)
PerkNFT0x4204EDEa4A7bE70f544bfe8BEFA8C43F3C198B1bPerk NFT contract
PointsSale0x5121F2f9D59E558a2aE83EE31111DEF781923de2Points sale contract (V3)
USDC0xE9A198d38483aD727ABC8b0B1e16B2d338CF0391Test 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 NumberResult
4242 4242 4242 4242Success
4000 0000 0000 0002Card declined
4000 0000 0000 9995Insufficient 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 .xyz domains use Stripe sandbox mode automatically.


How to Use Testnetโ€‹

Step 1: Sign Up for Testnetโ€‹

  1. Go to partners.loyalteez.xyz
  2. Sign up with your email
  3. 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โ€‹

  1. Send test events - Use test emails (e.g., [email protected])
  2. Check transactions - View on Soneium Minato Block Explorer
  3. Verify rewards - Check Partner Portal for testnet data
  4. Test payments - Use Stripe test cards

Step 4: Switch to Mainnetโ€‹

Once testing is complete:

  1. Update URLs - Change .xyz to .app
  2. Update Brand ID - Get your mainnet Brand ID
  3. Update Contracts - Use mainnet contract addresses
  4. 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:

  1. Sign up on testnet โ†’ Get testnet Brand ID
  2. 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โ€‹

  1. Complete Testing - Ensure all features work on testnet
  2. Document Configuration - Note all settings, Brand IDs, etc.
  3. Sign Up for Mainnet - Create account on partners.loyalteez.app
  4. Update Configuration - Change all .xyz URLs to .app
  5. Update Contract Addresses - Use mainnet contract addresses
  6. Update Stripe Keys - Switch from test to live Stripe keys
  7. Deploy - Push to production
  8. Monitor - Watch for any issues

Configuration Comparisonโ€‹

SettingTestnetMainnet
API URLapi.loyalteez.xyzapi.loyalteez.app
SDK URLapi.loyalteez.xyz/sdk.jsapi.loyalteez.app/sdk.js
Partner Portalpartners.loyalteez.xyzpartners.loyalteez.app
Chain ID19461868
RPC URLrpc.minato.soneium.orgrpc.soneium.org
Stripe ModeSandboxLive

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โ€‹

Ready to test? Start at partners.loyalteez.xyz ๐Ÿš€