Skip to main content

Get started in three steps

Start accepting Bitcoin, Ethereum, Litecoin, and Solana payments with Transaction API.

Step 1: Create your account

Visit our dashboard and create your account. You’ll need to provide:
  • Email address
  • Password
  • Complete email verification
We use Turnstile for bot protection during registration.
Once registered, navigate to the API Keys section in your dashboard to get:
  • Public Key (pk_*) - For creating payments
  • Secret Key (sk_*) - For merchant operations
Keep your secret key secure and never expose it in client-side code.

Step 2: Create your first payment

Use our /payment/create endpoint to generate a payment request:
curl -X POST https://api.transaction.gg/payment/create \
  -H "Authorization: Bearer pk_your_public_key" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": "29.99",
    "currency": "USD",
    "customerId": "cus_customer_id",
    "orderId": "order_123",
    "successUrl": "https://yoursite.com/success",
    "returnUrl": "https://yoursite.com/cancel"
  }'
{
  "success": true,
  "data": {
    "id": "pay_abc123def456",
    "expiresAt": "2024-01-01T01:00:00Z"
  }
}
After creating a payment, select the cryptocurrency:
curl -X POST https://api.transaction.gg/payment/select-crypto \
  -H "Content-Type: application/json" \
  -d '{
    "crypto": "BTC"
  }'
{
  "success": true,
  "data": {
    "id": "pay_abc123def456",
    "status": "pending",
    "amountCrypto": "0.00012345",
    "crypto": "BTC",
    "address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
    "checkoutUrl": "https://checkout.transaction.gg/pay_abc123def456"
  }
}

Step 3: Handle webhooks

Configure your webhook URL in the merchant dashboard to receive real-time payment notifications:
// Example webhook handler (Node.js)
const crypto = require('crypto');

app.post('/webhook', (req, res) => {
  const signature = req.headers['x-webhook-signature'];
  const payload = JSON.stringify(req.body);
  
  // Verify webhook signature
  const expectedSignature = crypto
    .createHmac('sha256', process.env.WEBHOOK_SECRET)
    .update(payload)
    .digest('hex');
  
  if (signature !== expectedSignature) {
    return res.status(400).send('Invalid signature');
  }
  
  // Handle payment events
  if (req.body.event === 'payment.completed') {
    console.log('Payment completed:', req.body.payment.id);
    // Update your database, send confirmation email, etc.
  }
  
  res.status(200).send('OK');
});
Always verify webhook signatures to ensure the requests are from Transaction API.

Next steps

Now that you have the basics working, explore these advanced features:
Need help? Check our API reference or contact support.