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

# Quickstart

> Charge a card or create a Treasury partner in under 5 minutes

## Option 1: Accept a payment

<Steps>
  <Step title="Install the Node SDK">
    ```bash theme={null}
    npm install @useaxra/node
    ```
  </Step>

  <Step title="Create a payment">
    ```typescript theme={null}
    import { Axra } from '@useaxra/node';

    const axra = new Axra('sk_test_...');

    const payment = await axra.payments.create({
      amount: 5000,     // $50.00 in cents
      currency: 'USD',
      source: 'pm_card_visa',
    });

    console.log(`Payment ${payment.id}: ${payment.status}`);
    ```
  </Step>
</Steps>

## Option 2: Treasury — build a banking product

<Steps>
  <Step title="Sign up as a Treasury partner">
    ```bash theme={null}
    curl -X POST https://api.useaxra.com/api/v1/treasury/signup \
      -H "Content-Type: application/json" \
      -d '{"name":"My Fintech","slug":"my-fintech"}'
    ```

    Save the returned `secretKey` (`sk_test_...`).
  </Step>

  <Step title="Create an end-user">
    ```bash theme={null}
    curl -X POST https://api.useaxra.com/api/v1/treasury/users \
      -H "Authorization: Bearer sk_test_..." \
      -H "Content-Type: application/json" \
      -d '{"externalId":"user_123","email":"jane@example.com","name":"Jane Doe"}'
    ```
  </Step>

  <Step title="Run KYC (sandbox auto-approves)">
    ```bash theme={null}
    curl -X POST https://api.useaxra.com/api/v1/treasury/users/{id}/kyc \
      -H "Authorization: Bearer sk_test_..." \
      -H "Content-Type: application/json" \
      -d '{"applicant":{"firstName":"Jane","lastName":"Doe","email":"approve@sandbox.useaxra.com"}}'
    ```

    Using `approve@sandbox.useaxra.com` auto-approves in sandbox.
  </Step>

  <Step title="Create a wallet and fund it">
    ```bash theme={null}
    # Create wallet
    curl -X POST https://api.useaxra.com/api/v1/treasury/users/{id}/wallets \
      -H "Authorization: Bearer sk_test_..." \
      -d '{"currency":"NGN"}'

    # Sandbox credit
    curl -X POST https://api.useaxra.com/api/v1/treasury/users/{id}/wallets/{walletId}/sandbox-credit \
      -H "Authorization: Bearer sk_test_..." \
      -d '{"amount":"1000","currency":"NGN"}'
    ```
  </Step>
</Steps>

## Sandbox fixtures

| Email                         | KYC outcome                                      |
| ----------------------------- | ------------------------------------------------ |
| `approve@sandbox.useaxra.com` | Instantly approved                               |
| `reject@sandbox.useaxra.com`  | Instantly rejected with reason                   |
| `pending@sandbox.useaxra.com` | Stays pending — use `sandbox-approve` to advance |

| Payout metadata                                 | Outcome                          |
| ----------------------------------------------- | -------------------------------- |
| `{ "test_outcome": "fail_insufficient_funds" }` | Payout fails immediately         |
| `{ "test_outcome": "delay_24h" }`               | Payout completes after 24h delay |
| *(none)*                                        | Payout completes after 2s        |
