Skip to main content
Welcome to TapRails! Follow this guide to prepare your account and infrastructure for contactless payments.

1. Dashboard Setup

Before integrating the SDK, you must register your company and obtain API keys.
  1. Sign Up: Create an account on the TapRails Dashboard.
  2. Verify Email: Activate your account via the link sent to your email.
  3. Company Profile: Complete your profile by selecting between Custodial (POOL) or Non-Custodial (Session Key) mode.
  4. Get API Keys: Navigate to Settings > API Keys to find your Public and Secret keys.
Never expose your Secret Key (sk_...) in client-side code, mobile apps, or public repositories.

2. Environment Configuration

TapRails provides two environments. Use the appropriate Base URL and API keys for your stage of development.
EnvironmentBase URLPublic Key Prefix
Sandbox (Test)https://test.taprails.com/api/v1pk_test_...
Production (Live)https://api.taprails.com/api/v1pk_live_...

3. Pre-fund Your Treasury (POOL mode)

If you are using POOL (Custodial) mode, you must deposit USDC into your treasury wallet before processing payments.
  1. Go to the Dashboard > Treasury section.
  2. Copy your deposit address.
  3. Send USDC on the Base network to this address.
  4. Funds typically appear in your dashboard within 60 seconds.

4. Create your first Merchant

Before you can use the SDK, you must create a merchant. This provisions a dedicated wallet for the merchant and returns a merchant_id required for SDK initialization. Use your Secret Key (sk_...) to call the Management API:
curl -X POST https://api.taprails.com/api/v1/management/merchants/create \
  -H "x-api-key: sk_live_your_secret_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Coffee Haven",
    "email": "owner@coffeehaven.com"
  }'
The response will contain your merchant_id (e.g., mch_abc123). Keep this handy for the next step.

5. Configure Webhooks

To receive real-time updates for payment confirmations or pool events, configure your webhook endpoint in Settings > Webhooks.
  1. Enter your server’s endpoint URL (e.g., https://api.yourcompany.com/webhooks/taprails).
  2. Select the events you wish to subscribe to (e.g., payment.confirmed, pool.low_balance).
  3. Save the Webhook Secret to verify incoming requests.

Next Steps

Now that your account is set up and you have a merchant_id, you are ready to integrate the SDK into your application.

React Native SDK

Install the package and start accepting payments in your React Native app.

Management API

Explore the full Management API to manage merchants and payments.