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

# Quickstart

> Start accepting payments in under 5 minutes

## Create Your Account

<Steps>
  <Step title="Register as a Seller">
    Visit [card2crypto.cc/register](https://card2crypto.cc/register) and create your account

    ```bash theme={null}
    Required Information:
    - Email address
    - Business name
    - Shop/website URL
    - Estimated monthly volume
    ```
  </Step>

  <Step title="Wait for Approval">
    Your application will be reviewed by our team within 24-48 hours. You'll receive an email notification once approved.
  </Step>

  <Step title="Create Your Shop">
    Once approved, log in and create your shop to generate production API credentials.

    <Warning>
      You can only create ONE shop per account. Your API keys are production-ready immediately.
    </Warning>
  </Step>

  <Step title="Configure Crypto Addresses">
    Set up your Bitcoin and/or Litecoin withdrawal addresses in Settings to receive payouts.
  </Step>
</Steps>

## Get Your API Key

Navigate to your [Dashboard](https://card2crypto.cc/dashboard/shops) and copy your production API key:

```bash theme={null}
c2c_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6...
```

<Warning>
  Never expose your API key in client-side code or public repositories. Always use it server-side only.
</Warning>

## Make Your First Payment

### 1. Create a Payment

Make a POST request to create a payment:

<CodeGroup>
  ```javascript Node.js theme={null}
  const response = await fetch('https://card2crypto.cc/api/v1/payments', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer c2c_live_your_api_key_here',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      amount: 5000, // $50.00 in cents
      currency: 'usd',
      customer_email: 'customer@example.com',
      description: 'Order #1234',
      success_url: 'https://yoursite.com/success',
      cancel_url: 'https://yoursite.com/cancel'
    })
  });

  const payment = await response.json();
  console.log(payment.checkout_url);
  ```

  ```php PHP theme={null}
  <?php
  $data = [
      'amount' => 5000, // $50.00 in cents
      'currency' => 'usd',
      'customer_email' => 'customer@example.com',
      'description' => 'Order #1234',
      'success_url' => 'https://yoursite.com/success',
      'cancel_url' => 'https://yoursite.com/cancel'
  ];

  $ch = curl_init('https://card2crypto.cc/api/v1/payments');
  curl_setopt($ch, CURLOPT_POST, 1);
  curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
  curl_setopt($ch, CURLOPT_HTTPHEADER, [
      'Authorization: Bearer c2c_live_your_api_key_here',
      'Content-Type: application/json'
  ]);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

  $response = curl_exec($ch);
  $payment = json_decode($response, true);

  echo $payment['checkout_url'];
  ?>
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      'https://card2crypto.cc/api/v1/payments',
      headers={
          'Authorization': 'Bearer c2c_live_your_api_key_here',
          'Content-Type': 'application/json'
      },
      json={
          'amount': 5000,  # $50.00 in cents
          'currency': 'usd',
          'customer_email': 'customer@example.com',
          'description': 'Order #1234',
          'success_url': 'https://yoursite.com/success',
          'cancel_url': 'https://yoursite.com/cancel'
      }
  )

  payment = response.json()
  print(payment['checkout_url'])
  ```
</CodeGroup>

### 2. Redirect to Checkout

The API returns a `checkout_url`. Redirect your customer to this URL:

```javascript theme={null}
window.location.href = payment.checkout_url;
```

The customer will see a checkout page where they can enter their card details.

### 3. Handle Webhooks

Set up a webhook endpoint to receive payment notifications:

<CodeGroup>
  ```javascript Node.js theme={null}
  const crypto = require('crypto');

  app.post('/webhooks/card2crypto', (req, res) => {
    // Verify signature
    const signature = req.headers['x-card2crypto-signature'];
    const payload = JSON.stringify(req.body);

    const expectedSignature = crypto
      .createHmac('sha256', process.env.WEBHOOK_SECRET)
      .update(payload)
      .digest('hex');

    if (signature !== expectedSignature) {
      return res.status(401).send('Invalid signature');
    }

    // Process webhook
    const { event, payment } = req.body;

    if (event === 'payment.completed') {
      console.log(`Payment ${payment.id} completed!`);
      // Update your database, send confirmation email, etc.
    }

    res.status(200).send('OK');
  });
  ```

  ```php PHP theme={null}
  <?php
  $signature = $_SERVER['HTTP_X_CARD2CRYPTO_SIGNATURE'];
  $payload = file_get_contents('php://input');

  $expectedSignature = hash_hmac('sha256', $payload, getenv('WEBHOOK_SECRET'));

  if ($signature !== $expectedSignature) {
      http_response_code(401);
      die('Invalid signature');
  }

  $data = json_decode($payload, true);

  if ($data['event'] === 'payment.completed') {
      error_log("Payment {$data['payment']['id']} completed!");
      // Update your database, send confirmation email, etc.
  }

  http_response_code(200);
  ?>
  ```
</CodeGroup>

<Note>
  Learn more about webhook security in the [Webhook Security](/webhooks/security) guide.
</Note>

## Test Your Integration

Use the [Payment Testing Tool](https://card2crypto.cc/test-payment) in your dashboard to quickly test payment creation without writing code.

<Warning>
  All payments are live and real. Test with small amounts like \$0.50 to verify your integration works correctly.
</Warning>

## Next Steps

<CardGroup cols={2}>
  <Card title="API Reference" icon="code" href="/api-reference/payments/create">
    Complete API endpoint documentation
  </Card>

  <Card title="Webhook Events" icon="webhook" href="/webhooks/events">
    All webhook event types and payloads
  </Card>

  <Card title="Integration Guides" icon="book" href="/guides/nodejs">
    Platform-specific integration tutorials
  </Card>

  <Card title="Error Handling" icon="triangle-exclamation" href="/resources/errors">
    Common errors and how to fix them
  </Card>
</CardGroup>
