> ## Documentation Index
> Fetch the complete documentation index at: https://docs.transaction.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Start accepting cryptocurrency payments in under 5 minutes

## Get started in three steps

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

### Step 1: Create your account

<AccordionGroup>
  <Accordion icon="user-plus" title="Register for Transaction API">
    Visit our [dashboard](https://dashboard.transaction.gg) and create your account. You'll need to provide:

    * Email address
    * Password
    * Complete email verification

    <Tip>We use Turnstile for bot protection during registration.</Tip>
  </Accordion>

  <Accordion icon="key" title="Get your API keys">
    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

    <Warning>Keep your secret key secure and never expose it in client-side code.</Warning>
  </Accordion>
</AccordionGroup>

### Step 2: Create your first payment

<AccordionGroup>
  <Accordion icon="credit-card" title="Create a payment">
    Use our `/payment/create` endpoint to generate a payment request:

    ```bash theme={null}
    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"
      }'
    ```

    <CodeGroup>
      ```json Response theme={null}
      {
        "success": true,
        "data": {
          "id": "pay_abc123def456",
          "expiresAt": "2024-01-01T01:00:00Z"
        }
      }
      ```
    </CodeGroup>
  </Accordion>

  <Accordion icon="coins" title="Select cryptocurrency">
    After creating a payment, select the cryptocurrency:

    ```bash theme={null}
    curl -X POST https://api.transaction.gg/payment/select-crypto \
      -H "Content-Type: application/json" \
      -d '{
        "crypto": "BTC"
      }'
    ```

    <CodeGroup>
      ```json Response theme={null}
      {
        "success": true,
        "data": {
          "id": "pay_abc123def456",
          "status": "pending",
          "amountCrypto": "0.00012345",
          "crypto": "BTC",
          "address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
          "checkoutUrl": "https://checkout.transaction.gg/pay_abc123def456"
        }
      }
      ```
    </CodeGroup>
  </Accordion>
</AccordionGroup>

### Step 3: Handle webhooks

<Accordion icon="webhook" title="Set up webhook endpoint">
  Configure your webhook URL in the merchant dashboard to receive real-time payment notifications:

  ```javascript theme={null}
  // 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');
  });
  ```

  <Note>Always verify webhook signatures to ensure the requests are from Transaction API.</Note>
</Accordion>

## Next steps

Now that you have the basics working, explore these advanced features:

<CardGroup cols={2}>
  <Card title="Authentication" icon="shield-check" href="/essentials/authentication">
    Learn about JWT tokens and API key authentication.
  </Card>

  <Card title="Webhooks" icon="webhook" href="/essentials/webhooks">
    Set up real-time payment notifications.
  </Card>

  <Card title="Product Management" icon="box" href="/api-reference/endpoint/product-create">
    Create products and prices for your store.
  </Card>

  <Card title="Customer Management" icon="users" href="/api-reference/endpoint/customer-create">
    Store customer information and payment history.
  </Card>
</CardGroup>

<Note>
  **Need help?** Check our [API reference](/api-reference/introduction) or contact [support](mailto:support@transaction.gg).
</Note>
