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

# Quickstart: your first payment

> Create an API key, create a payment link, and track its status in under ten minutes.

This guide walks through a complete flow: get an API key, create a payment link, and poll until it's paid. Examples use the test key prefix `rmf_test_`.

## Prerequisites

* A Remitflex account at [dashboard.remitflex.io](https://dashboard.remitflex.io)
* `curl` or Node.js
* For integration testing, use a **test** API key (`rmf_test_`) — see [Testing](/guides/testing)

<Note>
  API keys are created in the dashboard (JWT login required). You cannot create keys via the public API.
</Note>

## Step 1 — Create an API key

1. Log in to the dashboard (email + OTP).
2. Go to **Settings → API Keys** → **Create new key**.
3. Environment: **test**
4. Permissions: full access (`api:read` + `api:write`)
5. Copy the key and export it:

```bash theme={null}
export REMITFLEX_API_KEY="rmf_test_YOUR_KEY_HERE"
export API_BASE="https://api.remitflex.io/v1"
```

## Step 2 — Create a payment link

Mutating API-key requests require an idempotency key:

```bash theme={null}
curl -s -X POST "$API_BASE/collections" \
  -H "Authorization: Bearer $REMITFLEX_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "linkMode": "invoice",
    "pricingType": "fixed",
    "amount": 10,
    "destinationChainKey": "solana",
    "destinationCurrency": "USDC",
    "destinationAddress": "YOUR_SOLANA_WALLET_ADDRESS",
    "label": "First payment"
  }' | jq .
```

The response includes a `payUrl`. Open it to see the hosted pay page, or embed it — see [Payment links](/products/payment-links).

```json theme={null}
{
  "status": "success",
  "message": "Payment link created",
  "data": {
    "id": "1b2c3d4e-5f6a-7890-bcde-f12345678901",
    "status": "awaiting_origin",
    "payUrl": "https://pay.remitflex.io/1b2c3d4e-5f6a-7890-bcde-f12345678901"
  }
}
```

## Step 3 — Poll link status

```bash theme={null}
LINK_ID="1b2c3d4e-5f6a-7890-bcde-f12345678901"

curl -s "$API_BASE/collections/$LINK_ID" \
  -H "Authorization: Bearer $REMITFLEX_API_KEY" | jq '.data.status'
```

## Step 4 — List transactions

```bash theme={null}
curl -s "$API_BASE/transactions" \
  -H "Authorization: Bearer $REMITFLEX_API_KEY" | jq '.data.transactions[:3]'
```

## Next steps

* [Customers](/products/customers) to organise payers and beneficiaries
* [Payment links](/products/payment-links) for invoice and checkout pay URLs
* [Payment routes](/products/payment-routes) for cross-chain collection
* [Local fiat](/products/fiat-rails) for bank payouts and fiat deposits
* [Authentication](/authentication) for scopes and key security
* [Idempotency](/api-reference/idempotency) for retry-safe writes
