Skip to main content
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

1

Request access

Fill out the onboarding form. The Partna team will reach out to schedule a brief onboarding call and set up your merchant account.
2

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: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.
3

Use staging first

Build and test against the staging environment before deploying to production. Staging supports mock deposits and test transactions at no cost.

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.
curl --request GET \
  --url https://api.getpartna.com/v4/account \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'x-api-user: YOUR_MERCHANT_USERNAME'

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.
{
  "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 response:
// 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;
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 or the 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 caseGuide
Users convert local currency to cryptoOnramp Guide
Users convert local currency to crypto with a Partna checkoutOnramp Widget Guide
Users convert crypto to local currencyOfframp Guide
Users convert crypto to local currency with a Partna payout flowOfframp Widget Guide
Collect payments and settle in USD/stablecoinsCollect and Settle Guide
Verify user identity for transactionsAccounts and KYC Guide
Test with mock transactions in stagingTesting Guide