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

# Quickstart

> Start accepting payments in minutes

In this guide, we'll walk through how to initiate your first Mobile Money charge using the PayX Node.js SDK.

### 1. Get your API Keys

Log in to your [PayX Dashboard](https://payx.company/dashboard) and navigate to the **Developer Settings** tab. Copy your `Test Secret Key`.

### 2. Install the SDK

In your Node.js project, install the `payx-node` package:

```bash theme={null}
npm install payx-node@latest
```

### 3. Initialize the Client

Create a new file and initialize the PayX client with your API key.

```javascript theme={null}
const { PayX } = require('payx-node');

const payx = new PayX({
  apiKey: 'your_test_secret_key_here'
});
```

### 4. Initiate a Charge

Use the `charge.create` method to request a payment from a customer.

```javascript theme={null}
async function startPayment() {
  try {
    const response = await payx.charge.create({
      amount: 10.0,
      currency: 'GHS',
      phoneNumber: '0551234987',
      network: 'MTN',
      payerMessage: 'Order #1001',
      payeeNote: 'Online Purchase'
    });

    console.log('Transaction Initiated!');
    console.log('Transaction ID:', response.transactionId);
  } catch (error) {
    console.error('Payment failed:', error.message);
  }
}

startPayment();
```

### 5. Handle the Response

Since Mobile Money transactions require user approval on their phone (USSD prompt), the initial status will be `PENDING`.

You should set up a [Webhook](/webhooks) to receive real-time updates when the payment is completed or failed.

## Next Steps

<CardGroup cols={2}>
  <Card title="API Reference" icon="book" href="/api-reference/charge">
    Explore all available endpoints and parameters.
  </Card>

  <Card title="Webhooks" icon="webhook" href="/webhooks">
    Learn how to receive real-time notifications.
  </Card>
</CardGroup>
