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

# Quickstart

> Minimal steps to register an application, authenticate, create tags, and send transactions.

# Quickstart

Use this path when you want to get an integration working quickly in staging.

## 1. Register your application

```bash theme={null}
curl -X POST https://staging-idaas.yourflexpay.com/api/v1/applications \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "WalletApp",
    "appHandle": "walletapp",
    "transactionWebhookUrl": "https://wallet-app.example.com/idaas/webhook"
  }'
```

Save these values immediately from the response:

* `clientId`
* `clientSecret`
* `webhookSecret`
* `appPrivateKeyWrapped` if you plan to use JWE

## 2. Exchange credentials for a token

```bash theme={null}
curl -X POST https://staging-idaas.yourflexpay.com/api/v1/auth/token \
  -H 'Content-Type: application/json' \
  -d '{
    "client_id": "<clientId>",
    "client_secret": "<clientSecret>"
  }'
```

Store the `token` value and send it as:

```text theme={null}
Authorization: Bearer <token>
```

## 3. Create a subject

```bash theme={null}
curl -X POST https://staging-idaas.yourflexpay.com/api/v1/subjects \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{
    "externalId": "user-123",
    "displayName": "Alice Doe"
  }'
```

## 4. Create a tag

```bash theme={null}
curl -X POST https://staging-idaas.yourflexpay.com/api/v1/tags \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{
    "subjectId": "<subject-id>",
    "tagString": "alice"
  }'
```

The globally unique address becomes `alice@walletapp`.

## 5. Initiate a transaction

```bash theme={null}
curl -X POST https://staging-idaas.yourflexpay.com/api/v1/transactions \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: txn-001' \
  -d '{
    "senderTag": "alice@walletapp",
    "receiverTag": "bob@shopapp",
    "amount": 500,
    "currency": "NGN",
    "callbackUrl": "https://wallet-app.example.com/idaas/callback"
  }'
```

## 6. Handle the receiver webhook

IDaaS sends a `TRANSACTION_INITIATED` webhook to the receiver application. The receiver must:

1. Verify `X-IDaaS-Signature`
2. Optionally decrypt the payload if encryption is enabled
3. Accept or reject the transaction through the API

Continue with [Webhooks](/idaas/webhooks) and [Payments](/idaas/payments) for the full flow.
