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

# Quickstart

> Make your first API call in under 5 minutes

This guide walks you through making your first Partna API call. By the end, you will understand the basic request pattern for every endpoint.

## 1. Get your API credentials

<Steps>
  <Step title="Request access">
    Fill out the [onboarding form](https://forms.getpartna.com/get-started). The Partna team will reach out to schedule a brief onboarding call and set up your merchant account.
  </Step>

  <Step title="Create your API keys">
    Once your merchant account is set up, log in to the Partna dashboard, set up 2fa and generate your API keys. You will get separate keys for **staging** and **production**:

    * Staging dashboard: [staging-dashboard.getpartna.com](https://staging-dashboard.getpartna.com/settings?tab=api-webhooks)
    * Production dashboard: [dashboard.getpartna.com](https://dashboard.getpartna.com/settings?tab=api-webhooks)

    Take note of your created **API Key** and **Merchant Username**. You will need to include these as the `x-api-key` and `x-api-user` headers in every authenticated request.
  </Step>

  <Step title="Use staging first">
    Build and test against the staging environment before deploying to production. Staging supports [mock deposits](https://staging-dashboard.getpartna.com/mock/deposit) and test transactions at no cost.
  </Step>
</Steps>

## 2. Make your first request

Fetch your account details. This is the simplest authenticated request to confirm your credentials work and to see your available balances.

<CodeGroup>
  ```bash cURL theme={null}
  curl --request GET \
    --url https://api.getpartna.com/v4/account \
    --header 'x-api-key: YOUR_API_KEY' \
    --header 'x-api-user: YOUR_MERCHANT_USERNAME'
  ```

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

  response = requests.get(
      "https://api.getpartna.com/v4/account",
      headers={
          "x-api-key": "YOUR_API_KEY",
          "x-api-user": "YOUR_MERCHANT_USERNAME"
      }
  )

  print(response.json())
  ```

  ```javascript Node.js theme={null}
  const response = await fetch("https://api.getpartna.com/v4/account", {
    headers: {
      "x-api-key": "YOUR_API_KEY",
      "x-api-user": "YOUR_MERCHANT_USERNAME"
    }
  });

  const data = await response.json();
  console.log(data);
  ```
</CodeGroup>

## 3. Check the response

A successful response returns your account balances across all supported currencies and their underlying assets and asset IDs (wallet addresses). Once you confirm you can fetch your account details, you are ready to start using other Partna API endpoints.

```json theme={null}
{
  "data": {
    "accounts": [
      {
        "BNB": {
          "accountName": "user1",
          "asset": [{ "id": "0x20B3...", "meta": null, "type": "crypto" }],
          "balance": 0,
          "pendingDebit": 0
        },
        "BTC": {
          "accountName": "user1",
          "asset": [{ "id": "tb1q6z...", "meta": null, "type": "crypto" }],
          "balance": 0,
          "pendingDebit": 0
        },
        "ETH": {
          "accountName": "user1",
          "asset": [{ "id": "0x20B3...", "meta": null, "type": "crypto" }],
          "balance": 0,
          "pendingDebit": 0
        },
        "GHS": {
          "accountName": "user1",
          "asset": [{ "id": "", "meta": null, "type": "fiat" }],
          "balance": 0,
          "pendingDebit": 0
        },
        "KES": {
          "accountName": "user1",
          "asset": [{ "id": "", "meta": null, "type": "fiat" }],
          "balance": 0,
          "pendingDebit": 0
        },
        "NGN": {
          "accountName": "user1",
          "asset": [{ "id": "", "meta": null, "type": "fiat" }],
          "balance": 0,
          "pendingDebit": 0
        },
        "USD": {
          "accountName": "user1",
          "asset": [
            { "id": "0x20B3...", "meta": null, "type": "crypto" },
            { "id": "TCx7wx...", "meta": null, "type": "crypto" },
            { "id": "EXq68w...", "meta": null, "type": "crypto" }
          ],
          "balance": 0,
          "pendingDebit": 0
        }
      }
    ]
  },
  "message": "success"
}
```

### Understanding Asset IDs

The `asset` array within each currency object contains an id. For crypto assets, the `id` is the wallet address for that specific network.
To find the correct Asset ID for a specific currency and network combo, use the indexing data from the [Supported Assets](/v4/documentation/introduction#supported-assets) response:

<CodeGroup>
  ```javascript JavaScript theme={null}
  // 1. Get destination details from Supported Assets response
  const assetInfo = getAssetResponse.byCurrency[selectedCurrency][selectedNetwork];
  const { destinationCurrency, assetIndex } = assetInfo;

  // 2. Use those details to find the correct asset in your Get Account response
  const assetId = getAccountResponse.data.accounts[destinationCurrency].asset[assetIndex].id;
  ```

  ```python Python theme={null}
  # 1. Get destination details from Supported Assets response
  asset_info = get_asset_response['byCurrency'][selected_currency][selected_network]
  destination_currency = asset_info['destinationCurrency']
  asset_index = asset_info['assetIndex']

  # 2. Use those details to find the correct asset in your Get Account response
  asset_id = get_account_response['data']['accounts'][destination_currency]['asset'][asset_index]['id']
  ```
</CodeGroup>

This logic ensures you always use the correct wallet address for the network and currency combination you have selected.

## 4. Set up your webhook endpoint

Before processing real transactions, configure a webhook URL to receive status updates. You can do this via the [dashboard](https://dashboard.getpartna.com/settings?tab=api-webhooks) or the [Update Webhook URL](/api-reference/endpoint/v3/user/update-webhook-url) endpoint.

Your webhook endpoint should return a `200` status code immediately upon receiving the event. Process the event asynchronously.

## Next steps

You are now authenticated and can fetch rates. Here is what to build next, depending on your use case:

| Use case                                                         | Guide                                                                   |
| ---------------------------------------------------------------- | ----------------------------------------------------------------------- |
| Users convert local currency to crypto                           | [Onramp Guide](/v4/documentation/guides/onramp)                         |
| Users convert local currency to crypto with a Partna checkout    | [Onramp Widget Guide](/v4/documentation/guides/onramp-widget)           |
| Users convert crypto to local currency                           | [Offramp Guide](/v4/documentation/guides/offramp)                       |
| Users convert crypto to local currency with a Partna payout flow | [Offramp Widget Guide](/v4/documentation/guides/offramp-widget)         |
| Collect payments and settle in USD/stablecoins                   | [Collect and Settle Guide](/v4/documentation/guides/collect-and-settle) |
| Verify user identity for transactions                            | [Accounts and KYC Guide](/v4/documentation/guides/accounts-and-kyc)     |
| Test with mock transactions in staging                           | [Testing Guide](/v4/documentation/core-concepts/testing)                |
