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

# Quickstart Guide

> Get started with Juicyway API in minutes.

This guide will help you start accepting payments with our API quickly and securely. Follow these steps to begin processing transactions.

## Step 1: Create Your Account

<Steps>
  <Step title="Sign Up">
    Create your Juicyway business account:

    * For live transactions: [Production Dashboard](https://app.juicyway.com)
    * For testing: [Sandbox Dashboard](https://sandbox.juicyway.com/)
  </Step>

  <Step title="Complete KYC">
    After signing up:

    1. Navigate to the KYC banner on the home page
    2. Upload dummy data
    3. Submit for immediate approval
  </Step>

  <Step title="Get API keys ">
    After signing up:

    1. Navigate to Settings → API Keys.
    2. Fetch test and live API keys.
    3. Store keys securely - never expose them in client-side code.
  </Step>

  <Step title="Set up Webhooks ">
    Configure webhooks to receive real-time payment updates:

    1. Go to Settings → Webhooks
    2. Add your webhook URL
  </Step>
</Steps>

## Step 2: Make Your First API Call

Test your integration with this simple API call:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://api-sandbox.spendjuice.com/payment-sessions" \
  -H "Authorization:  YOUR_TEST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "customer": {
      "first_name": "John",
      "last_name": "Doe",
      "email": "john.doe@example.com",
      "phone_number": "+2348118873422",
      "billing_address": {
        "line1": "123 Test Lane",
        "city": "Test City",
        "state": "Test State",
        "country": "NG",
        "zip_code": "12345"
      },
      "ip_address": "127.0.0.1"
    },
    "description": "Test Payment",
    "currency": "NGN",
    "amount": 100000,
    "payment_method": {
      "type": "card"
    },
    "reference": "test-payment-123"
  }'
  ```

  ```javascript Node.js theme={null}
  const axios = require('axios');

  const response = await axios.post(
    'https://api-sandbox.spendjuice.com/payment-sessions',
    {
      customer: {
        first_name: 'John',
        last_name: 'Doe',
        email: 'john.doe@example.com',
        phone_number: '+2348118873422',
        billing_address: {
          line1: '123 Test Lane',
          city: 'Test City',
          state: 'Test State',
          country: 'NG',
          zip_code: '12345'
        }
      },
      description: 'Test Payment',
      currency: 'NGN',
      amount: 100000,
      payment_method: {
        type: 'card'
      },
      reference: 'test-payment-123'
    },
    {
      headers: {
        'Authorization': ` YOUR_TEST_API_KEY`,
        'Content-Type': 'application/json'
      }
    }
  );
  ```

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

  response = requests.post(
      'https://api-sandbox.spendjuice.com/payment-sessions',
      json={
          'customer': {
              'first_name': 'John',
              'last_name': 'Doe',
              'email': 'john.doe@example.com',
              'phone_number': '+2348118873422',
              'billing_address': {
                  'line1': '123 Test Lane',
                  'city': 'Test City',
                  'state': 'Test State',
                  'country': 'NG',
                  'zip_code': '12345'
              }
          },
          'description': 'Test Payment',
          'currency': 'NGN',
          'amount': 100000,
          'payment_method': {
              'type': 'card'
          },
          'reference': 'test-payment-123'
      },
      headers={
          'Authorization': ' YOUR_TEST_API_KEY',
          'Content-Type': 'application/json'
      }
  )
  ```
</CodeGroup>

## Step 3: Test Card Payments

Use these test cards to simulate different payment scenarios:

<AccordionGroup>
  <Accordion title="Successful Payment">
    **VISA Test Card**

    * Card Number: 4012000033330026
    * Expiry: 01/39
    * CVV: 100
  </Accordion>

  <Accordion title="Failed Payment">
    **Failed Card**

    * Card Number: 4000000000000002
    * Expiry: 01/25
    * CVV: 100
  </Accordion>

  <Accordion title="3DS Authentication">
    **3DS Card**

    * Card Number: 4761530000000008
    * Expiry: 05/25
    * CVV: 100
    * Test OTP: 123456
  </Accordion>
</AccordionGroup>

## Step 4: Handle Webhooks

<Note>
  Set up webhook handling to receive real-time payment updates. Here's a basic example:
</Note>

```javascript theme={null}
app.post('/webhooks', (req, res) => {
  const payload = req.body;
  const checksum = payload.checksum;
  const businessId = process.env.BUSINESS_ID;
  
  // Validate webhook signature
  if (!validateSignature(payload, checksum, businessId)) {
    return res.status(401).send('Invalid signature');
  }
  
  // Handle different event types
  switch(payload.event) {
    case 'payment.session.succeeded':
      // Handle successful payment
      break;
    case 'payment.session.failed':
      // Handle failed payment
      break;
  }
  
  res.status(200).send('Webhook received');
});
```

## Next Steps

1. Review our [API Authentication](/authentication) guide for secure API access
2. Set up comprehensive [Webhook Handling](/webhooks)
3. Learn about [Error Handling](/errors)
4. Explore supported [Payment Methods](/payments/overview)

<Card title="Need Help?">
  For additional assistance:

  * Review our [Error Handling Guide](/errors)
  * Contact [support@juicyway.com](mailto:support@juicyway.com)
</Card>
