API VERSION 1.0.4

Institutional-grade Payments API

Welcome to the GammaPay developer portal. Our API is built on REST principles, designed to help you integrate seamlessly with over 20+ blockchain networks using a single unified interface.

GammaPay is a next-generation crypto payment gateway that allows merchants to accept over 20+ digital assets with instant fiat conversion. Built for speed and security, our API uses industry-standard HMAC signatures to ensure every request is authentic.

Getting Started in 3 Steps

  • Sign Up: Create an account at dashboard.gammapay.io
  • Create a Wallet: Generate a wallet for your preferred coin (e.g. USDT, BTC).
  • Get Keys: Access your api_key and api_secret from settings.

Sandbox (Testing)

Use for development. Transactions are on testnet networks (Sepolia, Nile, etc). No real funds required.

Production

Use for real business transactions. Settlements are made in mainnet assets.

Production Base URL

https://api.gammapay.io

SDK & Libraries

Official wrappers for Node.js, Python, and PHP coming soon.

Quick Start

Create a payment invoice in under 2 minutes. You'll need an active API Key and Secret from your wallet settings.

1

Create a Wallet & Get Credentials

To use the GammaPay API, you must first create a wallet and generate API keys in your dashboard.

  1. Log in to dashboard.gammapay.io.
  2. Navigate to Wallets → New Wallet in the sidebar.
  3. Select your preferred network and coin (e.g., USDT on TRON) and click Create.
  4. Click on your new wallet, then go to the API Keys tab.
  5. Here you will find your X-API-Key and your api_secret.
CRITICAL: Your api_secret is only shown once. Copy it and store it securely.
2

Generate HMAC Signature

The signature is generated by hashing the concatenation of your current timestamp, the compact JSON body, and your idempotency key (if provided) using your api_secret.

Python (End-to-End Signature)
import hmac, hashlib, time, json
import uuid

api_key    = "npk_live_xxxxxxxxxxxx"
api_secret = "npks_xxxxxxxxxxxxxxxx"

url        = "https://api.gammapay.io/v1/withdrawals"
body_data  = {
    "coin": "USDTTRC20",
    "amount": "50.0",
    "destination": "0x71C...",
    "speed": "medium"
}

timestamp  = str(int(time.time()))
body_json  = json.dumps(body_data, separators=(',', ':'))

# Required for withdrawals to prevent duplicate operations
idempotency_key = str(uuid.uuid4())

# Format: timestamp.body[.idempotency_key]
payload = f"{timestamp}.{body_json}"
if idempotency_key:
    payload += f".{idempotency_key}"

signature  = hmac.new(
    api_secret.encode(),
    payload.encode(),
    hashlib.sha256
).hexdigest()

print(f"X-Signature: sha256={signature}")
print(f"X-Timestamp: {timestamp}")
if idempotency_key:
    print(f"X-Idempotency-Key: {idempotency_key}")
3

Make Your First Request

Terminal / Shell
curl -X POST 'https://api.gammapay.io/v1/invoices' \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: npk_live_xxxxxxxxxxxx' \
  -H 'X-Timestamp: 1745223600' \
  -H 'X-Signature: sha256=a7f3d92e1b...' \
  -d '{"coin":"USDTTRC20","amount":"50.0","currency":"USD","wallet_id":"ef89..."}'
4

Listen to Webhook

When payment is detected, GammaPay sends a POST to your webhook URL.

Express.js
app.post('/webhook/gammapay', express.raw({ type: 'application/json' }), (req, res) => {
  const sig    = req.headers['x-neonpay-signature'];
  const ts     = req.headers['x-neonpay-timestamp'];
  const secret = process.env.WEBHOOK_SECRET;

  const expected = crypto.createHmac('sha256', secret)
    .update(`${ts}.${req.body}`).digest('hex');

  if (sig !== `sha256=${expected}`) {
    return res.status(401).send('Invalid signature');
  }

  const event = JSON.parse(req.body);
  if (event.event === 'transaction.confirmed') {
    // Fulfill order
  }
  res.sendStatus(200);
});
Response Format Notice (v1.0)

The current API returns { flag, msg, data }. This documentation uses the canonical format { success, message, data, meta } which is the target schema for v1.1.

Until migration is complete, treat flag === 1 as success: true and flag === 0 as success: false.

Authentication & Headers

GammaPay uses HMAC signature verification for all API endpoints.

  • Where to get your keys: Dashboard → Wallets → select wallet → API Keys tab.
  • What to send: Every API request must include the three HTTP headers below.
HeaderRequiredDescription
X-API-KeyYesYour public API key. Starts with `npk_live_` or `npk_test_`.
X-TimestampYesUnix timestamp in seconds. Rejected if skew > 300s.
X-SignatureYesHMAC-SHA256 signature prefixed with `sha256=`.
X-Idempotency-KeyConditionalRequired for withdrawals. UUID to prevent duplicate operations (24h TTL).

Rate Limits

Rate limits are applied per API key.

PlanRequests/minBurst (10s)
Free30050
Premium1000170
X-RateLimit-Limit: 300
X-RateLimit-Remaining: 287
X-RateLimit-Reset: 1745223660
Retry-After: 13 // Only present on 429 Error

Error Codes

CodeHTTPRetriableDescription
VALIDATION_ERROR400NoMissing or invalid fields.
INVALID_CREDENTIALS401NoAPI key missing, invalid, or inactive.
INVALID_SIGNATURE401NoHMAC signature mismatch.
NONCE_EXPIRED401NoTimestamp older than 5 minutes.
FORBIDDEN403NoAPI key lacks required scope.
NOT_FOUND404NoResource not found.
IDEMPOTENCY_CONFLICT409NoSame key with different payload.
INSUFFICIENT_AMOUNT400NoAmount below minimum.
INVOICE_EXPIRED410NoInvoice past expiry.
WALLET_LOCKED423YesWallet temporarily locked.
RATE_LIMIT_EXCEEDED429YesRetry with backoff.
SERVER_ERROR500YesInternal server error.

Wallets

A wallet is the fundamental unit in GammaPay. Each wallet is associated with a single coin/network and provides isolated API credentials, deposit addresses, webhook configuration, whitelist rules, and transaction history.

API Credentials

Each wallet has its own API key + secret pair, isolated from other wallets.

HD Addresses

Generate unlimited BIP44-derived deposit addresses. One per invoice, never reused.

Whitelist

Withdrawals only go to verified, email-confirmed addresses.

Wallet Tabs (Dashboard)

When you open a wallet, the detail page shows the wallet name, total balance, coin symbol, and 8 tabs for managing every aspect of that wallet:

TabPurpose
TransactionView all incoming deposits and outgoing withdrawals with search, status/direction filters, list/grid views, and detail side-panel.
AddressesGenerate new HD-derived deposit addresses with optional labels. QR codes auto-generated. Copy address, view HD index, list/grid toggle.
WhitelistManage withdrawal address whitelist. Add (requires 2FA + email verification), remove, verify pending addresses, copy, view status.
CredentialReveal API key + secret (password + 2FA required), rotate keys, toggle API withdraw permission, update wallet password.
WebhookSet/update webhook URL, test connection, reveal/rotate webhook secret, remove webhook, view full delivery log with retry status.
Deposit / WithdrawQuick deposit (QR code + address copy), withdraw to whitelisted addresses (requires 2FA), fee estimation, speed selection, recent withdrawal history.
API LogsFull audit trail of every API call: HTTP status, method + endpoint, source IP, response duration (ms), timestamp.
ChartVisual analytics with balance over time (area chart), daily inbound/outbound volume (bar chart), 7d/30d/90d range selector.

Creating a Wallet

The wallet creation wizard walks you through a 3-step process:

1 Wallet Basics

  • Select Currency: Choose from mainnet or testnet coins (BTC, ETH, USDT, etc.)
  • Wallet Name: A human-readable label
  • Password:Used to encrypt wallet keys. You'll need this to reveal API credentials later.
  • Invoice Branding (Optional): Upload a brand image (PNG or JPG, max 2MB) for your invoices.

2 Advanced Settings

  • Webhooks: Set your Endpoint URL for real-time notifications and choose the number of network confirmations required.
  • IP Whitelist: Restrict API access to specific IPs or domains. Leave blank to allow all traffic (not recommended).

3 Review

  • Summary: Final review of all configurations, including wallet identity, security, API configuration, platform fee, and estimated network gas before confirming creation.

API Credentials (Per-Wallet)

Every wallet has its own isolated API key pair. These credentials are used to authenticate API requests for that specific wallet.

Reveal Keys

Requires your dashboard password (+ 2FA code if enabled). The API secret is shown only once. After revealing, you cannot reveal again — only rotate.

Rotate Keys

Generates a new API key + secret pair. The previous keys are immediately invalidated. All active integrations must be updated. Requires password verification.

Enable API Withdraw

A toggle to allow or disallow withdrawals via API. When disabled, withdrawals can only be initiated from the dashboard UI. Acts as an additional safety layer.

Deposit Addresses

GammaPay uses BIP44 HD derivation (m/44'/coin_type'/0'/0/index) to generate unique deposit addresses for each wallet.

  • One address per invoice — addresses are never reused across invoices to maintain privacy and simplify tracking.
  • Labels:Optionally assign a label when generating an address (e.g., "Customer #1234").
  • QR Codes: Each address comes with an auto-generated QR code for easy display.
  • Monitoring: All generated addresses are automatically monitored by the blockchain scanner.
⚠️ CRITICAL: Cross-chain payments result in permanent fund loss. If a customer sends ETH to a TRON address, those funds cannot be recovered. Always display the correct network prominently on your checkout UI.

Wallet Settings & Controls

SettingTypeDescription
Daily Withdrawal LimitstringMax amount withdrawable in 24h. Blank = no limit.
Confirmation Threshold1–300Block confirmations required before triggering webhook/status update.
Transaction Speedlow|medium|highAffects network fee multiplier. High = faster confirmation, higher fee.
IP Whiteliststring[]Restrict API access to specific IPs/domains. Blank = allow all.
API Withdraw EnabledbooleanToggle whether withdrawals can be initiated via API.

Invoices API Reference

POST/v1/invoices

Generate a payment request.

Body FieldTypeDescription
coin *stringCoin symbol (e.g. USDTTRC20)
amount *stringAmount in coin or USD
currency stringDefault 'USD'. Use coin symbol for native.
expire_time integerMinutes until expiry (default 60)
notify_url stringWebhook callback URL
custom_data objectArbitrary JSON metadata
Example Request
curl -X POST 'https://api.gammapay.io/v1/invoices' \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: npk_live_xxxxxxxxxxxx' \
  -H 'X-Timestamp: 1745223600' \
  -H 'X-Signature: sha256=...' \
  -d '{"coin":"USDTTRC20","amount":"50.00","currency":"USD","notify_url":"https://yoursite.com/webhook"}'
Sample Response
{
  "flag": 1,
  "msg": "Invoice created.",
  "data": {
    "invoice_id": "NP-20260421-A7KZ",
    "url": "https://pay.gammapay.io/NP-20260421-A7KZ",
    "address": "bc1q...",
    "network": "TRON",
    "amount": { "coin": "99.9010", "fiat": "99.99", "fiat_currency": "USD" },
    "status": "pending",
    "expires_at": "2026-04-21T10:00:00Z"
  }
}
GET/v1/:coin/invoices/:invoice_id

Get detailed information about an invoice.

Sample Response
{
  "flag": 1,
  "data": {
    "invoice_id": "NP-20260421-A7KZ",
    "status": "paid",
    "received_amount_coin": "99.9010",
    "paid_at": "2026-04-21T09:12:00Z"
  }
}
GET/v1/:coin/invoices

List paginated invoices filtered by status or date.

Query ParameterTypeDescription
status stringpending, confirming, paid, expired, underpaid
Sample Response
{
  "flag": 1,
  "data": {
    "items": [...],
    "pagination": { "page": 1, "limit": 20, "total": 143, "total_pages": 8 }
  }
}

Invoice Status Flow

pending detected (in mempool) → confirming (on-chain) → paid

Alternate flows:
expired (no payment before expiry)
underpaid (expired with partial payment)

Edge Cases

  • Underpayment: Status becomes underpaid after expiry.
  • Overpayment: Marked paid. Excess funds credited to wallet balance.
  • Multiple Transactions: Remains confirming until total received ≥ expected.
  • Wrong Network/Token: Funds are lost permanently. Always display the correct network.

Withdrawals

Withdrawals allow you to send funds from your wallet to an external address. Due to security requirements:

  • 2FA is mandatory for all withdrawals (dashboard or API).
  • Whitelist required: Destination must be a verified whitelisted address.
  • Manual review: All withdrawals undergo internal security review (3-step approval).
  • One pending at a time: You cannot submit a new withdrawal while one is pending review.
  • Idempotency key required: The HMAC signature for withdrawals includes the idempotency key.

Withdrawal Signature (includes Idempotency Key)

Signature Formula
payload = timestamp + "." + rawBody + "." + idempotencyKey
signature = HMAC-SHA256(api_secret, payload)
POST/v1/withdrawals

Initiate a new withdrawal to a whitelisted external address.

Body FieldTypeDescription
destination_address *stringMust be a verified whitelisted address
amount *stringAmount in coin
note stringOptional note
Example Request
curl -X POST 'https://api.gammapay.io/v1/withdrawals' \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: npk_live_xxxxxxxxxxxx' \
  -H 'X-Timestamp: 1781926509' \
  -H 'X-Signature: sha256=1c42a9...' \
  -H 'X-Idempotency-Key: 9eb581a2-ca56-447f-908f-26959444b9a1' \
  -d '{"destination_address":"0x7066...","amount":"1","note":"Test"}'
Sample Response
{
  "flag": 1,
  "msg": "Withdrawal request submitted and pending admin review.",
  "data": {
    "id": "68a0cf9f-94eb-4f73-9c3b-e5f419beee99",
    "amount": "1.00000000",
    "status": "pending_review",
    "fee_amount": "0.002",
    "net_amount": "0.998",
    "created_at": "2026-06-20T03:35:09Z"
  }
}
GET/v1/withdrawals/:id

Retrieve details of a specific withdrawal.

Sample Response
{
  "flag": 1,
  "data": {
    "id": "68a0cf9f-...",
    "amount": "1.00000000",
    "status": "completed",
    "tx_hash": "0xeb563d72...",
    "reviewed_at": "2026-06-20T04:12:02Z",
    "confirmed_at": "2026-06-20T04:25:00Z"
  }
}
GET/v1/withdrawals

List paginated withdrawals.

Query ParameterTypeDescription
page intPage number
per_page intItems per page
Sample Response
{
  "flag": 1,
  "data": { "page": 1, "per_page": 20, "total": 11, "withdrawals": [...] }
}
POST/v1/withdrawals/estimate

Estimate the network fee for a withdrawal without creating it.

Body FieldTypeDescription
destination_address *stringDestination address
amount *stringAmount in coin
Sample Response
{
  "flag": 1,
  "data": {
    "amount": "0.5",
    "fee_amount": "0.001",
    "net_amount": "0.499",
    "withdrawal_speed": "standard"
  }
}

Withdrawal Address Whitelist

The whitelist is a critical security feature that ensures withdrawals can only be sent to pre-approved, verified addresses. This prevents unauthorized fund transfers even if API credentials are compromised.

How Whitelist Works — Complete Flow

  1. Prerequisite: 2FA must be enabled on your account before you can add any whitelist address.
  2. Enter Address + Label:Provide a valid blockchain address for your wallet's coin type and a descriptive label (max 50 chars).
  3. 2FA Verification: Enter your 6-digit authenticator code to confirm the request.
  4. Email Challenge: A verification email is sent to your registered email with:
    • A 6-character verification code
    • An anti-phishing image (to verify the email is genuine)
    • Details of the address being added
  5. Confirm Code: Enter the code from the email in the dashboard to verify ownership.
  6. Address Activated:Once verified, the address status changes to "Verified" and can be used for withdrawals.

Whitelist Address States

StatusMeaningCan Withdraw?
PendingAwaiting email verification. Code sent but not yet confirmed.No
VerifiedEmail confirmed. Address is active and ready for withdrawals.Yes
DisabledManually disabled or removed by the user.No

Adding a Whitelist Address

Requirements

  • Two-Factor Authentication (2FA) must be enabled on your account
  • Address must be a valid format for the wallet's blockchain network
  • Label is required (max 50 characters)
  • You must have access to your registered email for verification

Security Notes

  • Each address addition requires a fresh 2FA code — codes cannot be reused.
  • The email verification code expires after a limited time period.
  • Anti-phishing images in the email help verify authenticity — if the image doesn't match what you selected during 2FA setup, do NOT enter the code.
  • You can resend the verification email if the original didn't arrive (check spam folder first).

Verification Flow (Anti-Phishing)

The verification email contains an anti-phishing image that you selected when setting up 2FA. This ensures the email genuinely came from GammaPay and is not a phishing attempt.

Legitimate Email

  • Shows YOUR chosen anti-phishing image
  • Contains 6-character verification code
  • Shows the correct address being added
  • Comes from official GammaPay email domain

Phishing Warning Signs

  • Image doesn't match your selected security image
  • Urgency language or threats
  • Unfamiliar sender domain
  • Asks for password or full 2FA secret

Managing Whitelisted Addresses

  • View All: The whitelist tab shows all addresses with their label, truncated address, status, and date added.
  • Copy Address: Click the copy icon to copy the full address to clipboard.
  • Remove: Click the trash icon to remove an address. Confirmation dialog prevents accidental removal. Once removed, withdrawals to that address are immediately blocked.
  • Resend Verification: For pending addresses, you can resend the verification email from the verification modal.
  • Polling: The dashboard automatically polls for verification status — once you confirm via email, the UI updates without manual refresh.

Whitelist API Endpoints

GET/v1/dashboard/wallets/:wallet_id/whitelist

List all whitelisted addresses for a wallet.

Sample Response
{
  "flag": 1,
  "data": {
    "addresses": [
      {
        "id": "uuid",
        "address": "0x7066F72B...",
        "label": "Main Treasury",
        "email_confirmed": true,
        "is_active": true,
        "added_at": "2026-06-01T10:00:00Z"
      }
    ]
  }
}
POST/v1/dashboard/wallets/:wallet_id/whitelist

Add a new address to the whitelist. Requires 2FA code.

Body FieldTypeDescription
address *stringBlockchain address
label *stringLabel (max 50 chars)
totp_code *string6-digit 2FA code
Sample Response
{
  "flag": 1,
  "msg": "Verification email sent",
  "data": {
    "whitelist_id": "uuid",
    "category": "animals",
    "correct_picture": "photo-id",
    "options": ["photo-1", "photo-2", "photo-3"]
  }
}
DELETE/v1/dashboard/wallets/:wallet_id/whitelist/:address

Remove an address from the whitelist.

Webhooks (IPN)

Webhooks provide real-time notifications when transaction states change. Configure a webhook URL per wallet in the dashboard.

Dashboard Webhook Management

  • Set URL: Enter an HTTPS endpoint and run a connection test before saving.
  • Test: Sends a test payload to verify your endpoint responds with 200 OK.
  • Webhook Secret: Each wallet has a unique HMAC secret for verifying webhook authenticity. Reveal it with password + 2FA.
  • Rotate Secret: Invalidates the current secret and generates a new one.
  • Remove: Deletes the webhook configuration entirely.
  • Delivery Logs: View all webhook delivery attempts with status, response code, timestamps, and retry count.

Event Types

EventTrigger
transaction.confirmedPayment fully confirmed on-chain
transaction.detectedPayment detected in mempool (unconfirmed)
payment.underpaidInvoice expired with partial payment
withdrawal.createdNew withdrawal request submitted
withdrawal.completedWithdrawal broadcast and confirmed on-chain
withdrawal.failedWithdrawal rejected or broadcast failed

Sample Payloads

transaction.confirmed
{
  "event": "transaction.confirmed",
  "amount": "15.00000000",
  "coin": "USDTERC20_SEP",
  "confirmed_at": "2026-06-20T03:10:35Z",
  "net_amount": "14.97000000",
  "platform_fee": "0.03000000",
  "transaction_id": "ec0334e-3eb6-43cf-aa95-c7be9bec950b",
  "tx_hash": "0xeb563d72419ce89c591c6ed981c43672527050986c...",
  "wallet_id": "5e9c5b14-0bae-415d-aca2-725962c68ab8"
}

Webhook Signature Verification

  1. Extract X-Neonpay-Timestamp and X-Neonpay-Signature headers.
  2. Check |now - timestamp| < 300 seconds.
  3. Compute: HMAC-SHA256(webhook_secret, timestamp + "." + rawBody)
  4. Compare using timingSafeEqual.

Retry Schedule

AttemptDelay
1Immediate
21 minute
35 minutes
430 minutes
52 hours
612 hours

After 6 failed attempts, the event is moved to a dead letter queue and the merchant is alerted via email.

Security Features

GammaPay implements multiple layers of security to protect your funds and account. These features are available in the Security section of your dashboard.

Two-Factor Authentication

TOTP-based 2FA with anti-phishing image protection and backup recovery codes.

IP Whitelisting

Restrict API access to approved IP addresses only.

Login Shield

Blocks login from unrecognized devices until email confirmation.

Session Management

View and terminate active sessions. Configurable session timeout.

Two-Factor Authentication (2FA)

TOTP (Time-based One-Time Password) adds a second layer of security. It is required for withdrawals, whitelist management, and API key operations.

Setup Flow

  1. Verify Password: Enter your current account password to initiate setup.
  2. Scan QR Code: Scan the displayed QR code with your authenticator app (Google Authenticator, Authy, 1Password, etc.). Or manually enter the secret key.
  3. Select Anti-Phishing Image: Choose a personalized image from categories (Animals, Vehicles, Objects). This image appears in all security emails from GammaPay.
  4. Verify Code: Enter the 6-digit code from your authenticator app to confirm setup.
  5. Save Recovery Codes: Download and securely store your one-time backup recovery codes. These are the only way to regain access if you lose your authenticator device.
⚠️ IMPORTANT: Recovery codes are shown only once during setup. Store them in a password manager or physical safe. If lost, account recovery requires manual identity verification.

Anti-Phishing Image Protection

During 2FA setup, you select a personalized security image. This image is embedded in all official GammaPay emails (whitelist verification, login alerts, etc.).

How it protects you:

  • Every security-sensitive email from GammaPay includes YOUR chosen image.
  • If you receive an email claiming to be from GammaPay but the image is wrong or missing — it's a phishing attempt.
  • You can change your anti-phishing image at any time from Security settings.
  • Images are categorized into Animals, Vehicles, and Objects for easy selection.

IP Whitelisting (Account-Level)

When enabled, API requests are only accepted from IP addresses you specify. This is a global toggle that applies to all wallets on your account.

  • Toggle on/off from Security → IP Whitelisting
  • Configure IPs per-wallet in the wallet settings (Deposit & Withdraw tab → Security Whitelist section)
  • Supports both individual IPs and domains
  • Requests from non-whitelisted IPs receive a 403 Forbidden response

Login Shield

Login Shield adds an extra verification step when logging in from an unrecognized device or IP address.

  • When enabled, login from a new device/location triggers an email confirmation.
  • The account remains locked until the email link is clicked.
  • Prevents unauthorized access even if password is compromised (without 2FA).
  • Toggle on/off from Security settings.

Session Management

  • Active Sessions: View all currently active sessions (device, IP, browser, last active time).
  • Terminate Sessions: Remotely log out any active session from the Active Sessions page.
  • Session Timeout: Configure auto-logout after inactivity (configurable from Notifications settings).
  • Login History: Full audit log of all login attempts (successful and failed) with IP, timestamp, and device info.

API Logs

Every API request made against your wallet is logged and available for inspection in the API Logs tab of each wallet. This provides a complete audit trail for debugging and security monitoring.

Log Entry Fields

FieldDescription
Status CodeHTTP response code (200, 400, 401, 403, 429, 500, etc.)
Method & EndpointHTTP method (GET/POST/PATCH/DELETE) and the full endpoint path
IP AddressSource IP of the request
DurationRequest processing time in milliseconds
DateFull timestamp of when the request was received
DescriptionError description (shown for failed requests)

Debugging Tips

  • 401 errors: Check your HMAC signature calculation. Ensure timestamp skew is within 300 seconds.
  • 403 errors: Your IP may not be whitelisted, or the API key lacks required permissions.
  • 429 errors:You're hitting rate limits. Implement exponential backoff.
  • High latency: If duration exceeds 5000ms, check if your request payload is unusually large.
  • Unexpected IPs: If you see requests from unknown IPs, rotate your API keys immediately and enable IP whitelisting.

Notifications

Configure how and when GammaPay notifies you about account activity. Navigate to Settings → Notifications in your dashboard.

Notification Types

CategoryEmailPushDescription
SecurityLogin alerts, 2FA changes, password updates
TransactionsIncoming deposits, withdrawal confirmations
InvoicesInvoice paid, expired, underpaid
SystemMaintenance, feature updates, plan changes
Weekly SummaryWeekly digest of transaction volume and revenue

Configuration Options

  • Email on Login: Receive an email every time your account is accessed.
  • Transaction Alerts: Get notified for every incoming/outgoing transaction.
  • Language: Set preferred language for notifications.
  • Currency: Default fiat currency for amount displays.
  • Timezone: Affects all timestamp formatting in notifications.
  • Session Timeout: Auto-logout after configurable inactivity period (in minutes).

Payment Widgets

Widgets let you embed payment buttons, donation forms, and checkout experiences directly on your website without writing backend code. Create and manage widgets from the Widgets page in your dashboard.

Widget Types

💳 Payment Button

A simple pay button that triggers a crypto payment flow. Fixed or variable amount.

❤️ Donation

Accept donations with optional custom amounts. No fixed price required.

🛒 Checkout

Full checkout experience with item details, amount, and payment form.

🔄 Subscription

Recurring payment widget for subscription-based services.

Embedding a Widget

After creating a widget in the dashboard, copy the embed code and paste it into your website HTML:

Widget Embed Code
<script src="https://cdn.gammapay.io/widget.js"></script>
<div id="gammapay-widget"
  data-widget-id="your-widget-uuid"
  data-type="payment-button"
  data-currency="USDTERC20"
  data-amount="25.00"
  data-name="Premium Subscription">
</div>
  • Views & Conversions: Track widget performance (views, completed payments) from the dashboard.
  • Custom Styling: Widgets automatically adapt to your page theme.
  • Wallet Orders: All payments via widgets appear in the Widget Orders page.

Developer Guides

Accept a Payment (Full Flow)

  1. Create a wallet for the desired coin in the dashboard.
  2. Get your API credentials from the wallet's API Keys tab.
  3. Call POST /v1/invoices to create a payment request (passing the coin in the JSON body).
  4. Redirect the customer to the returned url or display the address with amount.
  5. Listen for the transaction.confirmed webhook event.
  6. Verify the webhook signature using your wallet's webhook secret.
  7. Fulfill the order once payment is confirmed.

Best Practice

Always use an X-Idempotency-Key when creating invoices to prevent double-charging on network retries.

Crypto vs USD Payments

USD Mode

Set currency: "USD". GammaPay locks the exchange rate at invoice creation and calculates the required crypto amount.

Native Coin Mode

Set currency: "USDTTRC20". No conversion. Customer pays the exact coin amount specified.

Handling Underpayments

  • Monitor for the payment.underpaid webhook event.
  • The webhook payload includes amount_received_coin and shortfall_coin.
  • You can manually mark the invoice as paid in the dashboard if the shortfall is negligible.
  • Otherwise, the invoice remains underpaid until the remaining balance is sent to the same address.

Test Your Integration

  • Use testnet coins: Create wallets for testnet assets (ETH Sepolia, USDT Nile, etc.).
  • Faucets: Get free testnet tokens from Sepolia faucets for ETH/ERC20 or Nile faucet for TRC20.
  • Webhook testing:Use the built-in "Test Webhook" button in the dashboard or tools like webhook.site.
  • API Logs: Monitor all requests in real-time from the API Logs tab.

Security Best Practices

  • Never share your api_secret — store it only on your backend server, never in frontend code or version control.
  • Enable 2FA immediately— it's required for withdrawals and provides critical protection.
  • Verify webhook signatures — always validate the HMAC signature before processing webhook events.
  • Use IP whitelisting — restrict API access to your known server IPs.
  • Set daily withdrawal limits — cap exposure in case of credential compromise.
  • Rotate keys periodically — rotate API keys and webhook secrets on a regular schedule.
  • Monitor API logs — watch for unexpected IPs or unusual request patterns.
  • Use idempotency keys — prevent duplicate charges from retry logic.

Glossary

HMAC
Hash-based Message Authentication Code. Used to sign API requests.
Nonce / Timestamp
A value used once to prevent replay attacks. GammaPay uses Unix timestamps.
Webhook
An HTTP callback that notifies your server of events automatically.
Mempool
The waiting area for transactions before they are added to a block.
Confirmations
The number of blocks added after yours. More = more secure.
Testnet
An alternative blockchain used for testing without using real value.
BIP44
HD wallet derivation standard used to generate unique addresses.
TOTP
Time-based One-Time Password. The standard behind 2FA authenticator apps.
Idempotency Key
A UUID ensuring the same operation isn't executed twice on retry.
Whitelist
A pre-approved list of addresses that can receive withdrawals.
GammaPay

© 2026 GammaPay Protocol. All rights reserved.