Skip to main content

Quickstart

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

1. Register your application

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

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:
Authorization: Bearer <token>

3. Create a subject

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

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

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 and Payments for the full flow.