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_keyandapi_secretfrom 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.ioSDK & 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.
Create a Wallet & Get Credentials
To use the GammaPay API, you must first create a wallet and generate API keys in your dashboard.
- Log in to dashboard.gammapay.io.
- Navigate to Wallets → New Wallet in the sidebar.
- Select your preferred network and coin (e.g., USDT on TRON) and click Create.
- Click on your new wallet, then go to the API Keys tab.
- Here you will find your
X-API-Keyand yourapi_secret.
api_secret is only shown once. Copy it and store it securely.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.
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}")Make Your First 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=a7f3d92e1b...' \
-d '{"coin":"USDTTRC20","amount":"50.0","currency":"USD","wallet_id":"ef89..."}'Listen to Webhook
When payment is detected, GammaPay sends a POST to your webhook URL.
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);
});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.
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.
| Header | Required | Description |
|---|---|---|
| X-API-Key | Yes | Your public API key. Starts with `npk_live_` or `npk_test_`. |
| X-Timestamp | Yes | Unix timestamp in seconds. Rejected if skew > 300s. |
| X-Signature | Yes | HMAC-SHA256 signature prefixed with `sha256=`. |
| X-Idempotency-Key | Conditional | Required for withdrawals. UUID to prevent duplicate operations (24h TTL). |
Rate Limits
Rate limits are applied per API key.
| Plan | Requests/min | Burst (10s) |
|---|---|---|
| Free | 300 | 50 |
| Premium | 1000 | 170 |
X-RateLimit-Remaining: 287
X-RateLimit-Reset: 1745223660
Retry-After: 13 // Only present on 429 Error
Error Codes
| Code | HTTP | Retriable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | Missing or invalid fields. |
| INVALID_CREDENTIALS | 401 | No | API key missing, invalid, or inactive. |
| INVALID_SIGNATURE | 401 | No | HMAC signature mismatch. |
| NONCE_EXPIRED | 401 | No | Timestamp older than 5 minutes. |
| FORBIDDEN | 403 | No | API key lacks required scope. |
| NOT_FOUND | 404 | No | Resource not found. |
| IDEMPOTENCY_CONFLICT | 409 | No | Same key with different payload. |
| INSUFFICIENT_AMOUNT | 400 | No | Amount below minimum. |
| INVOICE_EXPIRED | 410 | No | Invoice past expiry. |
| WALLET_LOCKED | 423 | Yes | Wallet temporarily locked. |
| RATE_LIMIT_EXCEEDED | 429 | Yes | Retry with backoff. |
| SERVER_ERROR | 500 | Yes | Internal 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:
| Tab | Purpose |
|---|---|
| Transaction | View all incoming deposits and outgoing withdrawals with search, status/direction filters, list/grid views, and detail side-panel. |
| Addresses | Generate new HD-derived deposit addresses with optional labels. QR codes auto-generated. Copy address, view HD index, list/grid toggle. |
| Whitelist | Manage withdrawal address whitelist. Add (requires 2FA + email verification), remove, verify pending addresses, copy, view status. |
| Credential | Reveal API key + secret (password + 2FA required), rotate keys, toggle API withdraw permission, update wallet password. |
| Webhook | Set/update webhook URL, test connection, reveal/rotate webhook secret, remove webhook, view full delivery log with retry status. |
| Deposit / Withdraw | Quick deposit (QR code + address copy), withdraw to whitelisted addresses (requires 2FA), fee estimation, speed selection, recent withdrawal history. |
| API Logs | Full audit trail of every API call: HTTP status, method + endpoint, source IP, response duration (ms), timestamp. |
| Chart | Visual 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.
Wallet Settings & Controls
| Setting | Type | Description |
|---|---|---|
| Daily Withdrawal Limit | string | Max amount withdrawable in 24h. Blank = no limit. |
| Confirmation Threshold | 1–300 | Block confirmations required before triggering webhook/status update. |
| Transaction Speed | low|medium|high | Affects network fee multiplier. High = faster confirmation, higher fee. |
| IP Whitelist | string[] | Restrict API access to specific IPs/domains. Blank = allow all. |
| API Withdraw Enabled | boolean | Toggle whether withdrawals can be initiated via API. |
Invoices API Reference
/v1/invoicesGenerate a payment request.
| Body Field | Type | Description |
|---|---|---|
| coin * | string | Coin symbol (e.g. USDTTRC20) |
| amount * | string | Amount in coin or USD |
| currency | string | Default 'USD'. Use coin symbol for native. |
| expire_time | integer | Minutes until expiry (default 60) |
| notify_url | string | Webhook callback URL |
| custom_data | object | Arbitrary JSON metadata |
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"}'{
"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"
}
}/v1/:coin/invoices/:invoice_idGet detailed information about an invoice.
{
"flag": 1,
"data": {
"invoice_id": "NP-20260421-A7KZ",
"status": "paid",
"received_amount_coin": "99.9010",
"paid_at": "2026-04-21T09:12:00Z"
}
}/v1/:coin/invoicesList paginated invoices filtered by status or date.
| Query Parameter | Type | Description |
|---|---|---|
| status | string | pending, confirming, paid, expired, underpaid |
{
"flag": 1,
"data": {
"items": [...],
"pagination": { "page": 1, "limit": 20, "total": 143, "total_pages": 8 }
}
}Invoice Status Flow
pending → detected (in mempool) → confirming (on-chain) → paidAlternate flows:
→
expired (no payment before expiry)→
underpaid (expired with partial payment)Edge Cases
- Underpayment: Status becomes
underpaidafter expiry. - Overpayment: Marked
paid. Excess funds credited to wallet balance. - Multiple Transactions: Remains
confirminguntil 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)
payload = timestamp + "." + rawBody + "." + idempotencyKey
signature = HMAC-SHA256(api_secret, payload)/v1/withdrawalsInitiate a new withdrawal to a whitelisted external address.
| Body Field | Type | Description |
|---|---|---|
| destination_address * | string | Must be a verified whitelisted address |
| amount * | string | Amount in coin |
| note | string | Optional note |
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"}'{
"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"
}
}/v1/withdrawals/:idRetrieve details of a specific withdrawal.
{
"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"
}
}/v1/withdrawalsList paginated withdrawals.
| Query Parameter | Type | Description |
|---|---|---|
| page | int | Page number |
| per_page | int | Items per page |
{
"flag": 1,
"data": { "page": 1, "per_page": 20, "total": 11, "withdrawals": [...] }
}/v1/withdrawals/estimateEstimate the network fee for a withdrawal without creating it.
| Body Field | Type | Description |
|---|---|---|
| destination_address * | string | Destination address |
| amount * | string | Amount in coin |
{
"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
- Prerequisite: 2FA must be enabled on your account before you can add any whitelist address.
- Enter Address + Label:Provide a valid blockchain address for your wallet's coin type and a descriptive label (max 50 chars).
- 2FA Verification: Enter your 6-digit authenticator code to confirm the request.
- 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
- Confirm Code: Enter the code from the email in the dashboard to verify ownership.
- Address Activated:Once verified, the address status changes to "Verified" and can be used for withdrawals.
Whitelist Address States
| Status | Meaning | Can Withdraw? |
|---|---|---|
| Pending | Awaiting email verification. Code sent but not yet confirmed. | No |
| Verified | Email confirmed. Address is active and ready for withdrawals. | Yes |
| Disabled | Manually 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
/v1/dashboard/wallets/:wallet_id/whitelistList all whitelisted addresses for a wallet.
{
"flag": 1,
"data": {
"addresses": [
{
"id": "uuid",
"address": "0x7066F72B...",
"label": "Main Treasury",
"email_confirmed": true,
"is_active": true,
"added_at": "2026-06-01T10:00:00Z"
}
]
}
}/v1/dashboard/wallets/:wallet_id/whitelistAdd a new address to the whitelist. Requires 2FA code.
| Body Field | Type | Description |
|---|---|---|
| address * | string | Blockchain address |
| label * | string | Label (max 50 chars) |
| totp_code * | string | 6-digit 2FA code |
{
"flag": 1,
"msg": "Verification email sent",
"data": {
"whitelist_id": "uuid",
"category": "animals",
"correct_picture": "photo-id",
"options": ["photo-1", "photo-2", "photo-3"]
}
}/v1/dashboard/wallets/:wallet_id/whitelist/:addressRemove 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
| Event | Trigger |
|---|---|
| transaction.confirmed | Payment fully confirmed on-chain |
| transaction.detected | Payment detected in mempool (unconfirmed) |
| payment.underpaid | Invoice expired with partial payment |
| withdrawal.created | New withdrawal request submitted |
| withdrawal.completed | Withdrawal broadcast and confirmed on-chain |
| withdrawal.failed | Withdrawal rejected or broadcast failed |
Sample Payloads
{
"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
- Extract
X-Neonpay-TimestampandX-Neonpay-Signatureheaders. - Check
|now - timestamp| < 300seconds. - Compute:
HMAC-SHA256(webhook_secret, timestamp + "." + rawBody) - Compare using
timingSafeEqual.
Retry Schedule
| Attempt | Delay |
|---|---|
| 1 | Immediate |
| 2 | 1 minute |
| 3 | 5 minutes |
| 4 | 30 minutes |
| 5 | 2 hours |
| 6 | 12 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
- Verify Password: Enter your current account password to initiate setup.
- Scan QR Code: Scan the displayed QR code with your authenticator app (Google Authenticator, Authy, 1Password, etc.). Or manually enter the secret key.
- Select Anti-Phishing Image: Choose a personalized image from categories (Animals, Vehicles, Objects). This image appears in all security emails from GammaPay.
- Verify Code: Enter the 6-digit code from your authenticator app to confirm setup.
- 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.
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
| Field | Description |
|---|---|
| Status Code | HTTP response code (200, 400, 401, 403, 429, 500, etc.) |
| Method & Endpoint | HTTP method (GET/POST/PATCH/DELETE) and the full endpoint path |
| IP Address | Source IP of the request |
| Duration | Request processing time in milliseconds |
| Date | Full timestamp of when the request was received |
| Description | Error 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
| Category | Push | Description | |
|---|---|---|---|
| Security | ✓ | ✓ | Login alerts, 2FA changes, password updates |
| Transactions | ✓ | ✓ | Incoming deposits, withdrawal confirmations |
| Invoices | ✓ | ✓ | Invoice paid, expired, underpaid |
| System | ✓ | ✓ | Maintenance, feature updates, plan changes |
| Weekly Summary | ✓ | — | Weekly 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:
<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)
- Create a wallet for the desired coin in the dashboard.
- Get your API credentials from the wallet's API Keys tab.
- Call
POST /v1/invoicesto create a payment request (passing the coin in the JSON body). - Redirect the customer to the returned
urlor display theaddresswith amount. - Listen for the
transaction.confirmedwebhook event. - Verify the webhook signature using your wallet's webhook secret.
- 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.underpaidwebhook event. - The webhook payload includes
amount_received_coinandshortfall_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.