Skip to main content
This guide covers setting up your development environment for testing and integrating XentFi APIs.

Test Networks

XentFi provides test networks for all supported blockchains to help you develop and test without using real funds.

Available Testnets

Development vs Production Comparison

Environment Setup

1. Get Sandbox API Keys

1

Log into Dashboard

2

Create Sandbox Keys

Navigate to Settings → API Keys and select “Sandbox” environment
3

Save Credentials

Copy your sandbox apiKey and orgId

2. Configure Environment Variables

Create a .env file in your project:

3. Install SDK

4. Initialize Client

Local Development with Testnet

Getting Test Tokens

1

Create a Test Wallet

First, create a master wallet on your chosen testnet:
2

Get Wallet Address

Copy the walletAddress from the response.
3

Request Test Tokens

Visit the faucet for your chosen testnet and paste your wallet address.
4

Verify Balance

Webhook Testing with ngrok

For local webhook development, use ngrok to expose your local server:
Configure your webhook with the ngrok URL:

Sample Development Workflow

Testing Checklist

Before moving to production, ensure you’ve tested:
  • API key authentication works
  • Master wallet creation succeeds
  • Deposit address generation works
  • Payment link creation and access
  • Payment processing with test tokens
  • Webhook events received and verified
  • Signature verification implemented
  • Error handling for all scenarios
  • Rate limit handling
  • Idempotency keys working correctly
  • Balance checking functionality

Common Development Issues

Solution: Request more tokens from the faucet. Some faucets have daily limits.
Solution:
  • Verify ngrok is running
  • Check webhook URL is accessible
  • Verify signature verification
Solution:
  • Testnet may be congested
  • Increase gas limit
  • Wait and retry
Solution:
  • Sandbox has higher limits
  • Implement delays between requests
  • Contact support for temporary increase

Migrating to Production

1

Generate Production Keys

Create new API keys with “Production” environment in dashboard
2

Update Configuration

Change environment from sandbox to production
3

Deploy Webhooks

Update webhook URLs to production endpoints
4

Create Production Wallets

Deploy wallets on mainnet networks
5

Enable Monitoring

Turn on monitoring for all production wallets
6

Go Live

Update your application configuration and launch

Pre-Migration Checklist

  • All tests pass on testnet
  • Error handling implemented
  • Rate limit handling in place
  • Webhook signature verification working
  • Idempotency keys implemented
  • Monitoring and alerting configured
  • Security review completed
  • Backup and recovery procedures ready

Support During Development

Next Steps

Authentication

Learn about API security best practices

Rate Limits

Understand API rate limiting

Products

Explore all XentFi products

API Reference

Browse complete API documentation