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

# Quick Start

> Make your first cryptocurrency payment in minutes

## Get Started in Three Steps

Get up and running with Tender's API and accept your first cryptocurrency payment.

***

### Step 1: Get Your API Credentials

<AccordionGroup>
  <Accordion icon="key" title="Generate credentials from dashboard">
    1. Log in to your [Tender Merchant Dashboard](https://sandbox-merchant.tender.cash) (sandbox) or [merchant.tender.cash](https://merchant.tender.cash) (live)
    2. Navigate to **Settings** → **API Credentials**
    3. Click **Generate New Credentials**
    4. Select **Test Environment** for development
    5. Save your **Access ID** and **Access Secret** securely

    <Tip>Use the test environment while integrating. It uses testnet cryptocurrencies with no real value.</Tip>
  </Accordion>

  <Accordion icon="shield" title="Store credentials securely">
    Never hardcode credentials. Use environment variables:

    ```bash .env theme={null}
    TENDER_ACCESS_ID=your_access_id_here
    TENDER_ACCESS_SECRET=your_access_secret_here
    TENDER_BASE_URL=https://sandbox-api.tender.cash
    ```
  </Accordion>
</AccordionGroup>

***

### Step 2: Make Your First API Call

Choose your preferred language and make a request to create an agent:

<CodeGroup>
  ```javascript Node.js theme={null}
  import crypto from 'crypto';
  import { v4 as uuidv4 } from 'uuid';

  // Your credentials
  const accessId = process.env.TENDER_ACCESS_ID;
  const accessSecret = process.env.TENDER_ACCESS_SECRET;

  // Generate signature
  const requestId = uuidv4();
  const timeStamp = new Date().toISOString();

  const payload = {
    timeStamp,
    requestId,
    accessId
  };

  const signature = crypto
    .createHmac('sha256', accessSecret)
    .update(JSON.stringify(payload))
    .digest('base64');

  // Make API request
  const response = await fetch('https://sandbox-api.tender.cash/v1/api/agent/create', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'x-access-id': accessId,
      'x-request-id': requestId,
      'x-timestamp': timeStamp,
      'authorization': signature
    },
    body: JSON.stringify({
      type: 'online',
      name: 'Lagos Fashion Store',
      email: 'lagosfashion@store.com',
      phoneNumber: '0123246784824',
      location: 'Lagos',
      country: 'Nigeria',
      avatar: 'https:///imagesamp.lo.co',
      currency: 'NGN',
      password: '12345678'
    })
  });

  const data = await response.json();
  console.log('Agent created:', data);
  ```

  ```python Python theme={null}
  import hmac
  import hashlib
  import base64
  import json
  import uuid
  from datetime import datetime
  import requests
  import os

  # Your credentials
  access_id = os.getenv('TENDER_ACCESS_ID')
  access_secret = os.getenv('TENDER_ACCESS_SECRET')

  # Generate signature
  request_id = str(uuid.uuid4())
  timestamp = datetime.utcnow().isoformat() + 'Z'

  payload = {
      "timeStamp": timestamp,
      "requestId": request_id,
      "accessId": access_id
  }

  message = json.dumps(payload)
  signature = base64.b64encode(
      hmac.new(
          access_secret.encode('utf-8'),
          message.encode('utf-8'),
          hashlib.sha256
      ).digest()
  ).decode('utf-8')

  # Make API request
  response = requests.post(
      'https://sandbox-api.tender.cash/v1/api/agent/create',
      headers={
          'Content-Type': 'application/json',
          'x-access-id': access_id,
          'x-request-id': request_id,
          'x-timestamp': timestamp,
          'authorization': signature
      },
      json={
          'type': 'online',
          'name': 'Lagos Fashion Store',
          'email': 'lagosfashion@store.com',
          'phoneNumber': '0123246784824',
          'location': 'Lagos',
          'country': 'Nigeria',
          'avatar': 'https:///imagesamp.lo.co',
          'currency': 'NGN',
          'password': '12345678'
      }
  )

  data = response.json()
  print('Agent created:', data)
  ```

  ```php PHP theme={null}
  <?php
  // Your credentials
  $accessId = getenv('TENDER_ACCESS_ID');
  $accessSecret = getenv('TENDER_ACCESS_SECRET');

  // Generate signature
  $requestId = sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
      mt_rand(0, 0xffff), mt_rand(0, 0xffff),
      mt_rand(0, 0xffff),
      mt_rand(0, 0x0fff) | 0x4000,
      mt_rand(0, 0x3fff) | 0x8000,
      mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)
  );
  $timeStamp = date('c');

  $payload = [
      'timeStamp' => $timeStamp,
      'requestId' => $requestId,
      'accessId' => $accessId
  ];

  $message = json_encode($payload);
  $signature = base64_encode(hash_hmac('sha256', $message, $accessSecret, true));

  // Make API request
  $ch = curl_init('https://sandbox-api.tender.cash/v1/api/agent/create');
  curl_setopt($ch, CURLOPT_POST, 1);
  curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
      'type' => 'online',
      'name' => 'Lagos Fashion Store',
      'email' => 'lagosfashion@store.com',
      'phoneNumber' => '0123246784824',
      'location' => 'Lagos',
      'country' => 'Nigeria',
      'avatar' => 'https:///imagesamp.lo.co',
      'currency' => 'NGN',
      'password' => '12345678'
  ]));
  curl_setopt($ch, CURLOPT_HTTPHEADER, [
      'Content-Type: application/json',
      'x-access-id: ' . $accessId,
      'x-request-id: ' . $requestId,
      'x-timestamp: ' . $timeStamp,
      'authorization: ' . $signature
  ]);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

  $response = curl_exec($ch);
  curl_close($ch);

  $data = json_decode($response, true);
  echo 'Agent created: ' . print_r($data, true);
  ?>
  ```
</CodeGroup>

**Expected Response:**

```json theme={null}
{
  "status": "success",
  "message": "success",
  "data": {
    "id": "66f33b1fa9446a6b6b8f32cd",
    "name": "Lagos Fashion Store",
    "email": "jsmith@example.com",
    "phoneNumber": "0123246784824",
    "location": "Lagos",
    "country": "Nigeria",
    "active": true,
    "agentId": "vbibtucm9yn",
    "merchantId": "6538e8f9bdec6d1a21978a64",
    "currency": "NGN",
    "totalSales": "0.00 NGN",
    "defaultFiatCurrency": {
      "currency": "NGN",
      "useSystemRate": true,
      "rate": "0"
    },
    "createdAt": "2023-11-07T05:31:56Z"
  }
}
```

***

### Step 3: Initiate Your First Payment

Now let's create a cryptocurrency payment. Payment endpoints use [Basic (Access ID) authentication](/api-reference/authentication#basic-access-id-authentication), so only your `x-access-id` header is required — no signature:

```javascript theme={null}
const paymentResponse = await fetch('https://sandbox-api.tender.cash/v1/api/payment/initiate', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-access-id': accessId
  },
  body: JSON.stringify({
    amount: "10.00",
    chain: "ethereum",
    coin: "usdc"
  })
});

const payment = await paymentResponse.json();
console.log('Payment initiated:', payment);
```

**Expected Response:**

```json theme={null}
{
  "status": "success",
  "message": "success",
  "data": {
    "txId": "66aec7de809b7f45c42a49f9",
    "type": "receive",
    "chain": "ethereum",
    "amount": "10.00",
    "usdAmount": "10.00",
    "walletAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
    "status": "pending",
    "agentId": "abc123xyz"
  }
}
```

<Tip>
  The `walletAddress` is where your customer should send the cryptocurrency. Monitor the transaction status using webhooks or the validation endpoint.
</Tip>

***

## Next Steps

Now that you've made your first requests, explore more features:

<CardGroup cols={2}>
  <Card title="Authentication" icon="lock" href="/api-reference/authentication">
    Deep dive into HMAC signature authentication
  </Card>

  <Card title="Payment APIs" icon="money-bill-transfer" href="/api-reference/endpoint/initiate-payment">
    Explore all payment endpoints and options
  </Card>

  <Card title="Configure Webhooks" icon="webhook" href="/get-started/webhooks">
    Set up real-time event notifications
  </Card>

  <Card title="Supported Chains" icon="link" href="/api-reference/endpoint/fetch-chains">
    View all supported blockchains and currencies
  </Card>
</CardGroup>

***

## Testing Your Integration

Before going to production:

<Steps>
  <Step title="Test all payment flows">
    Test with different blockchains and currencies in the test environment
  </Step>

  <Step title="Set up webhooks">
    Configure and test webhook delivery for transaction events
  </Step>

  <Step title="Handle errors">
    Implement proper error handling for failed transactions
  </Step>

  <Step title="Security review">
    Ensure API credentials are stored securely and never exposed
  </Step>

  <Step title="Go live">
    Switch to production credentials and base URL
  </Step>
</Steps>

***

## Need Help?

<Card title="Contact Support" icon="headset">
  * **Email**: [support@tender.cash](mailto:support@tender.cash)
  * **Documentation**: [docs.tender.cash](https://docs.tender.cash)
  * **API Reference**: Browse complete API documentation
</Card>
