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

# Quick Start

> Create your first payment in under 5 minutes

# Quick Start

This guide will help you create your first payment using the LuxCore API.

## Prerequisites

<Steps>
  <Step title="Obtain your API keys">
    API keys are provided by the LuxCore team during your merchant onboarding. Contact your account manager or reach out to [developers@lux-core.io](mailto:developers@lux-core.io) to request access.
  </Step>

  <Step title="Choose your environment">
    Use a test key (`qp_test_sk_*`) for development. Switch to a production key (`qp_prod_sk_*`) when you're ready for production.
  </Step>
</Steps>

<Info>
  Merchant accounts and API keys are created by the LuxCore team. Self-registration is not available.
</Info>

## Create Your First Payment

<Warning>
  **All amounts are in minor units** (centavos, cents). For example, to charge 1,000.00 ARS, pass `amount: 100000`. Passing `1000` would create a payment for only 10.00 ARS.
</Warning>

Let's create a bank transfer deposit payment (customer pays to you):

<Tabs>
  <Tab title="ARS (Argentina)">
    <CodeGroup>
      ```bash cURL theme={null}
      curl -X POST "https://api.lux-core.io/api/v1/payments" \
        -H "X-API-Key: qp_test_sk_your_api_key_here" \
        -H "Content-Type: application/json" \
        -d '{
          "amount": 100000,
          "currency": "ARS",
          "method": "bank_transfer",
          "type": "deposit",
          "merchant_reference": "order_12345",
          "customer": {
            "name": "Juan Perez",
            "email": "juan@example.com"
          }
        }'
      ```

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

      url = "https://api.lux-core.io/api/v1/payments"
      headers = {
          "X-API-Key": "qp_test_sk_your_api_key_here",
          "Content-Type": "application/json"
      }
      payload = {
          "amount": 100000,  # $1,000.00 ARS (amount in centavos)
          "currency": "ARS",
          "method": "bank_transfer",
          "type": "deposit",
          "merchant_reference": "order_12345",
          "customer": {
              "name": "Juan Perez",
              "email": "juan@example.com"
          }
      }

      response = requests.post(url, json=payload, headers=headers)
      print(response.json())
      ```

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

      const response = await axios.post(
        'https://api.lux-core.io/api/v1/payments',
        {
          amount: 100000, // $1,000.00 ARS (amount in centavos)
          currency: 'ARS',
          method: 'bank_transfer',
          type: 'deposit',
          merchant_reference: 'order_12345',
          customer: {
            name: 'Juan Perez',
            email: 'juan@example.com'
          }
        },
        {
          headers: {
            'X-API-Key': 'qp_test_sk_your_api_key_here',
            'Content-Type': 'application/json'
          }
        }
      );

      console.log(response.data);
      ```
    </CodeGroup>
  </Tab>

  <Tab title="MXN (Mexico)">
    <CodeGroup>
      ```bash cURL theme={null}
      curl -X POST "https://api.lux-core.io/api/v1/payments" \
        -H "X-API-Key: qp_test_sk_your_api_key_here" \
        -H "Content-Type: application/json" \
        -d '{
          "amount": 100000,
          "currency": "MXN",
          "method": "spei",
          "type": "deposit",
          "merchant_reference": "order_12345",
          "customer": {
            "name": "Juan Perez",
            "email": "juan@example.com"
          }
        }'
      ```

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

      url = "https://api.lux-core.io/api/v1/payments"
      headers = {
          "X-API-Key": "qp_test_sk_your_api_key_here",
          "Content-Type": "application/json"
      }
      payload = {
          "amount": 100000,  # $1,000.00 MXN (amount in centavos)
          "currency": "MXN",
          "method": "spei",
          "type": "deposit",
          "merchant_reference": "order_12345",
          "customer": {
              "name": "Juan Perez",
              "email": "juan@example.com"
          }
      }

      response = requests.post(url, json=payload, headers=headers)
      print(response.json())
      ```

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

      const response = await axios.post(
        'https://api.lux-core.io/api/v1/payments',
        {
          amount: 100000, // $1,000.00 MXN (amount in centavos)
          currency: 'MXN',
          method: 'spei',
          type: 'deposit',
          merchant_reference: 'order_12345',
          customer: {
            name: 'Juan Perez',
            email: 'juan@example.com'
          }
        },
        {
          headers: {
            'X-API-Key': 'qp_test_sk_your_api_key_here',
            'Content-Type': 'application/json'
          }
        }
      );

      console.log(response.data);
      ```
    </CodeGroup>
  </Tab>

  <Tab title="UYU (Uruguay)">
    <CodeGroup>
      ```bash cURL theme={null}
      curl -X POST "https://api.lux-core.io/api/v1/payments" \
        -H "X-API-Key: qp_test_sk_your_api_key_here" \
        -H "Content-Type: application/json" \
        -d '{
          "amount": 100000,
          "currency": "UYU",
          "method": "bank_transfer",
          "type": "deposit",
          "merchant_reference": "order_12345",
          "customer": {
            "name": "Juan Perez",
            "email": "juan@example.com"
          }
        }'
      ```

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

      url = "https://api.lux-core.io/api/v1/payments"
      headers = {
          "X-API-Key": "qp_test_sk_your_api_key_here",
          "Content-Type": "application/json"
      }
      payload = {
          "amount": 100000,  # $1,000.00 UYU (amount in centésimos)
          "currency": "UYU",
          "method": "bank_transfer",
          "type": "deposit",
          "merchant_reference": "order_12345",
          "customer": {
              "name": "Juan Perez",
              "email": "juan@example.com"
          }
      }

      response = requests.post(url, json=payload, headers=headers)
      print(response.json())
      ```

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

      const response = await axios.post(
        'https://api.lux-core.io/api/v1/payments',
        {
          amount: 100000, // $1,000.00 UYU (amount in centésimos)
          currency: 'UYU',
          method: 'bank_transfer',
          type: 'deposit',
          merchant_reference: 'order_12345',
          customer: {
            name: 'Juan Perez',
            email: 'juan@example.com'
          }
        },
        {
          headers: {
            'X-API-Key': 'qp_test_sk_your_api_key_here',
            'Content-Type': 'application/json'
          }
        }
      );

      console.log(response.data);
      ```
    </CodeGroup>
  </Tab>

  <Tab title="AUD (Australia)">
    <CodeGroup>
      ```bash cURL theme={null}
      curl -X POST "https://api.lux-core.io/api/v1/payments" \
        -H "X-API-Key: qp_test_sk_your_api_key_here" \
        -H "Content-Type: application/json" \
        -d '{
          "amount": 100000,
          "currency": "AUD",
          "method": "bank_transfer",
          "type": "deposit",
          "merchant_reference": "order_12345",
          "customer": {
            "name": "James Smith",
            "email": "james@example.com"
          }
        }'
      ```

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

      url = "https://api.lux-core.io/api/v1/payments"
      headers = {
          "X-API-Key": "qp_test_sk_your_api_key_here",
          "Content-Type": "application/json"
      }
      payload = {
          "amount": 100000,  # $1,000.00 AUD (amount in cents)
          "currency": "AUD",
          "method": "bank_transfer",
          "type": "deposit",
          "merchant_reference": "order_12345",
          "customer": {
              "name": "James Smith",
              "email": "james@example.com"
          }
      }

      response = requests.post(url, json=payload, headers=headers)
      print(response.json())
      ```

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

      const response = await axios.post(
        'https://api.lux-core.io/api/v1/payments',
        {
          amount: 100000, // $1,000.00 AUD (amount in cents)
          currency: 'AUD',
          method: 'bank_transfer',
          type: 'deposit',
          merchant_reference: 'order_12345',
          customer: {
            name: 'James Smith',
            email: 'james@example.com'
          }
        },
        {
          headers: {
            'X-API-Key': 'qp_test_sk_your_api_key_here',
            'Content-Type': 'application/json'
          }
        }
      );

      console.log(response.data);
      ```
    </CodeGroup>
  </Tab>
</Tabs>

### Response

<Tabs>
  <Tab title="ARS Response">
    ```json theme={null}
    {
      "transaction_id": "pay_1234567890_abcdefgh",
      "status": "processing",
      "amount": 100000,
      "currency": "ARS",
      "method": "bank_transfer",
      "type": "deposit",
      "merchant_reference": "order_12345",
      "created_at": "2025-01-21T10:30:00Z",
      "bank_details": {
        "amount": "100000",
        "purpose": "Payment pay_1234567890_abcdefgh",
        "currency": "ARS",
        "bank_name": "Banco Nacion",
        "swift_code": null,
        "account_holder": "LuxCore Platform S.A.",
        "account_number": "0110012345678901234567"
      }
    }
    ```
  </Tab>

  <Tab title="MXN Response">
    ```json theme={null}
    {
      "transaction_id": "pay_1234567890_abcdefgh",
      "status": "processing",
      "amount": 100000,
      "currency": "MXN",
      "method": "spei",
      "type": "deposit",
      "merchant_reference": "order_12345",
      "created_at": "2025-01-21T10:30:00Z",
      "bank_details": {
        "amount": "100000",
        "purpose": "Payment pay_1234567890_abcdefgh",
        "currency": "MXN",
        "bank_name": "STP",
        "swift_code": null,
        "account_holder": "LuxCore Platform S.A. de C.V.",
        "account_number": "646180157000000001"
      }
    }
    ```
  </Tab>

  <Tab title="UYU Response">
    ```json theme={null}
    {
      "transaction_id": "pay_1234567890_abcdefgh",
      "status": "processing",
      "amount": 100000,
      "currency": "UYU",
      "method": "bank_transfer",
      "type": "deposit",
      "merchant_reference": "order_12345",
      "created_at": "2025-01-21T10:30:00Z",
      "bank_details": {
        "amount": "100000",
        "purpose": "Payment pay_1234567890_abcdefgh",
        "currency": "UYU",
        "bank_name": "BROU",
        "swift_code": null,
        "account_holder": "LuxCore Platform S.A.",
        "account_number": "001234567890"
      }
    }
    ```
  </Tab>

  <Tab title="AUD Response">
    ```json theme={null}
    {
      "transaction_id": "pay_1234567890_abcdefgh",
      "status": "processing",
      "amount": 100000,
      "currency": "AUD",
      "method": "bank_transfer",
      "type": "deposit",
      "merchant_reference": "order_12345",
      "created_at": "2026-02-18T10:30:00Z",
      "bank_details": {
        "amount": "100000",
        "purpose": "Payment pay_1234567890_abcdefgh",
        "currency": "AUD",
        "bank_name": "Commonwealth Bank",
        "swift_code": "CTBAAU2S",
        "account_holder": "LuxCore Platform Pty Ltd",
        "bsb": "062-000",
        "account_number": "12345678"
      }
    }
    ```
  </Tab>
</Tabs>

## Understanding the Response

| Field            | Description                                                                           |
| ---------------- | ------------------------------------------------------------------------------------- |
| `transaction_id` | Unique payment identifier. Use this to track the payment.                             |
| `status`         | Current payment status. Deposits start as `processing`, withdrawals as `pending`.     |
| `bank_details`   | Bank details for the customer to complete the transfer (account number, holder, etc.) |

## What's Next?

<CardGroup cols={2}>
  <Card title="Set up Webhooks" icon="webhook" href="/guides/webhooks">
    Receive real-time notifications when the payment completes
  </Card>

  <Card title="Payment Types" icon="credit-card" href="/guides/payments">
    Learn about deposits, withdrawals, and payment pages
  </Card>

  <Card title="Test Your Integration" icon="flask" href="/guides/testing">
    Use test mode to simulate different scenarios
  </Card>

  <Card title="Go Live" icon="rocket" href="/guides/testing#going-live">
    Switch to production when you're ready
  </Card>
</CardGroup>

## Common Issues

<AccordionGroup>
  <Accordion title="401 Unauthorized">
    Make sure you're including the `X-API-Key` header with a valid API key.
  </Accordion>

  <Accordion title="400 Bad Request">
    Check that all required fields are present and properly formatted. The `amount` should be in minor units (centavos for MXN).
  </Accordion>

  <Accordion title="Payment method unavailable">
    Ensure the payment method is enabled for your merchant account in the dashboard.
  </Accordion>
</AccordionGroup>
