Quickstart

Overview

This guide will walk you through integrating Unter payments into your application in under 15 minutes. You'll learn how to accept cryptocurrency payments with just a few API calls.

What you'll build: A simple payment flow that creates a payment request and processes the payment.

What you'll need:

  • An Unter merchant account with API keys

  • A basic understanding of REST APIs

  • A development environment (Node.js, Python, or PHP)

Step 1: Get Your API Key

  1. Log into the Unter merchant portal

  2. Navigate to Settings → API Keys

  3. Create a new API key with these permissions:

    • create_payments

    • view_payments

    • manage_payments

  4. Copy your API key - it starts with unter_ and you'll only see it once

  5. Store it securely in your environment variables

Step 2: Explore Available Chains and Tokens

Before creating payments, discover what cryptocurrencies you can receive:

This returns chains like Ethereum, Polygon, and Solana with their available tokens (USDC, ETH, USDT, etc.).

Key points:

  • No authentication required for chain/token endpoints

  • Use the numeric token_id when creating payment requests

  • Different chains support different tokens

Step 3: Create Your First Payment Request

Let's create a payment request for $10 USDC on Ethereum:

Find USDC on Ethereum

First, identify the token and chain IDs:

From the response, you'll see USDC has:

  • token_id: 1 (example)

  • chain_id: 1 (Ethereum)

  • decimals: 6

Create the Payment Request

Understanding the amount:

  • USDC has 6 decimals

  • $10.00 = 10,000,000 (add 6 zeros)

  • Always use strings, never floats

Success Response:

Step 4: Handle Webhook Events

Create a webhook endpoint and configure it in your settings to receive payment notifications:

JavaScript (Express.js)

Common Gotchas

1. Amount Format

Wrong: "amount": 10.5 (number) ✅ Correct: "amount": "10500000" (string in smallest unit)

2. Token/Chain Validation

Wrong: Using token_id without checking if it exists on the chain ✅ Correct: Validate token exists on specified chain first

3. Webhook Security

Wrong: Processing webhooks without signature verification ✅ Correct: Always verify webhook signatures

4. Error Handling

Wrong: Not handling API errors gracefully ✅ Correct: Implement proper try/catch with specific error handling

Next Steps

Now that you have a working integration:

  1. Set up proper webhook handling for production

  2. Learn about all API endpoints for advanced features

  3. Implement error handling for edge cases

  4. Add payment cancellation functionality

  5. Explore all supported chains and tokens

Last updated