Developer Documentation

API & Webhooks

Integrate crypto payments into your application with our robust Merchant API. Create orders, customize the checkout experience, and listen for real-time updates.

Overview

CryptoGateway exposes a powerful Merchant API designed for simplicity and reliability. You can create payment orders, query their status, and manage your integration seamlessly.

Merchant API
Restful endpoints to create orders and check statuses.
/api/v1
Hosted Checkout
Secure, pre-built payment pages for your customers.
/pay/:id

Authentication

Authenticate your requests by including your secret API key in the x-api-key header.

BASH
curl -X GET "https://coinfat.com/api/v1/networks" \
  -H "x-api-key: YOUR_API_KEY"

Never share your API keys in client-side code (browsers, mobile apps). Keep them secure on your backend.

Networks API

GET

/api/v1/networks

Get supported networks and tokens
Example Response
{
  "success": true,
  "networks": [
    {
      "id": 1,
      "name": "Ethereum",
      "symbol": "ETH",
      "is_active": true,
      "tokens": [
        {
          "id": 1,
          "name": "USDT",
          "symbol": "USDT",
          "is_native": false,
          "is_stablecoin": false,
          "contract_address": "0xdac17f958d2ee523a2206206994597c13d831ec7"
        }
      ]
    }
  ]
}

Merchant API

POST

/api/v1/orders

Create a new payment order
Body Parameters application/json
amount
REQUIREDNumber. The amount to charge.
title
REQUIREDString. Order title/description.
tokenId
Integer. Optional specific token ID.
returnUrl
String. Redirect URL after payment.
Example Request
curl -X POST "https://coinfat.com/api/v1/orders" \
  -H "content-type: application/json" \
  -H "x-api-key: YOUR_KEY" \
  -d '{
    "amount": 49,
    "title": "Premium Plan",
    "metadata": { "user_id": "123" }
  }'

GET

/api/v1/orders/:id

Retrieve order details
Response Fields
status
pending | completed | expired
payment_url
The hosted checkout page URL.
Example Response
{
  "id": "ORD_12345",
  "status": "pending",
  "amount": 49,
  "currency": "USDT",
  "payment_url": "https://...",
  "created_at": "2026-01-09T12:00:00Z"
}

API Explorer

Test endpoints directly from your browser.

Interactive

Configuration

QUICK ACTIONS
POST /api/v1/orders
RESPONSE Ready
// Waiting for request...

Webhooks

Listen for events on your server to update order statuses in real-time.

Headers

  • X-Signature HMAC-SHA256 hex signature of the payload.
  • Content-Type application/json
Node.js Verification Example
const crypto = require("crypto");

function verify(rawBody, secret, signature) {
  const hash = crypto
    .createHmac("sha256", secret)
    .update(rawBody)
    .digest("hex");

  return crypto.timingSafeEqual(
    Buffer.from(hash, "hex"),
    Buffer.from(signature, "hex")
  );
}