Project Access Portal

Maqsafy ROX Integration Hub

Single page to access admin dashboard, API endpoints, broadcasting channels, and run instructions for the entire project.

Current Base URLs
Web: https://rox-service-dev.dafa.dev
API: https://rox-service-dev.dafa.dev/api
Admin: https://rox-service-dev.dafa.dev/admin
Admin Dashboard

Filament admin lives under /admin with pages for requests, logs, settings, and webhook access management.

Queue-Driven API

All transaction operations are exposed as POST APIs and are intended for async processing via queue workers.

Broadcasting

Realtime updates use channel webhook with event name WebhookEvent and default broadcaster set to Ably.

API Endpoints
Method Path Name Description
POST /api/mint Mint Single Queue one mint request and return execution id.
Sample request payload
{
    "clientId": 11,
    "amount": 11
}
curl -X POST "https://rox-service-dev.dafa.dev/api/mint" -H "Content-Type: application/json" -d '{"clientId": 11, "amount": 11.0}'
POST /api/burn Burn Single Queue one burn request and return execution id.
Sample request payload
{
    "clientId": 11,
    "amount": 5.5
}
curl -X POST "https://rox-service-dev.dafa.dev/api/burn" -H "Content-Type: application/json" -d '{"clientId": 11, "amount": 5.5}'
POST /api/transfer Transfer Single Queue one transfer request between clients.
Sample request payload
{
    "clientId": 11,
    "receiverClientId": 22,
    "amount": 3.5
}
curl -X POST "https://rox-service-dev.dafa.dev/api/transfer" -H "Content-Type: application/json" -d '{"clientId": 11, "receiverClientId": 22, "amount": 3.5}'
POST /api/nfts NFT Single/Bulk Payload Create NFT records using nfts array payload.
Sample request payload
{
    "rox_id": "wallet_001",
    "data": [
        {
            "name": "My NFT"
        }
    ]
}
curl -X POST "https://rox-service-dev.dafa.dev/api/nfts" -H "Content-Type: application/json" -d '{"rox_id": "wallet_001", "data": [{"name": "My NFT"}]}'
POST /api/bulk/users Bulk Users Queue bulk user operations.
Sample request payload
{
    "ids": [
        11,
        22,
        33
    ]
}
curl -X POST "https://rox-service-dev.dafa.dev/api/bulk/users" -H "Content-Type: application/json" -d '{"ids": [11, 22, 33]}'
POST /api/bulk/nfts Bulk NFTs Queue bulk NFT operations.
Sample request payload
{
    "nfts": [
        {
            "rox_id": "wallet_001",
            "data": [
                {
                    "name": "NFT A"
                }
            ]
        }
    ]
}
curl -X POST "https://rox-service-dev.dafa.dev/api/bulk/nfts" -H "Content-Type: application/json" -d '{"nfts": [{"rox_id": "wallet_001", "data": [{"name": "NFT A"}]}]}'
POST /api/bulk/mint Bulk Mint Queue mint batch then process each item on sub queue.
Sample request payload
{
    "items": [
        {
            "clientId": 11,
            "amount": 11
        },
        {
            "clientId": 22,
            "amount": 5.5
        }
    ]
}
curl -X POST "https://rox-service-dev.dafa.dev/api/bulk/mint" -H "Content-Type: application/json" -d '{"items": [{"clientId": 11, "amount": 11.0}, {"clientId": 22, "amount": 5.5}]}'
POST /api/bulk/burn Bulk Burn Queue burn batch then process each item on sub queue.
Sample request payload
{
    "items": [
        {
            "clientId": 11,
            "amount": 2
        }
    ]
}
curl -X POST "https://rox-service-dev.dafa.dev/api/bulk/burn" -H "Content-Type: application/json" -d '{"items": [{"clientId": 11, "amount": 2.0}]}'
POST /api/bulk/transfer Bulk Transfer Queue transfer batch requests.
Sample request payload
{
    "transfers": [
        {
            "clientId": 11,
            "receiverClientId": 22,
            "amount": 1.5
        }
    ]
}
curl -X POST "https://rox-service-dev.dafa.dev/api/bulk/transfer" -H "Content-Type: application/json" -d '{"transfers": [{"clientId": 11, "receiverClientId": 22, "amount": 1.5}]}'
Endpoint Response -> Webhook -> Callback Timeline
Generated from current controller/service code paths

1) Initial API Success (202)
{
    "success": true,
    "data": {
        "clientId": 11,
        "amount": 11,
        "status": "minting_started",
        "event": "minting.queued",
        "executionId": "uuid-v4"
    }
}
2) Validation Error (422)
{
    "success": false,
    "message": "Validation failed.",
    "errors": {
        "amount": [
            "The amount field is required."
        ]
    }
}
3) Webhook Event Payloads By Type
mint.completed
{
    "event": "mint.completed",
    "execution_id": "uuid-v4",
    "status": "completed",
    "client_id": 11,
    "amount": 11,
    "rox_status": 200,
    "rox_code": "",
    "rox_message": "OK",
    "payload": {
        "amount": 11
    }
}
mint.failed
{
    "event": "mint.failed",
    "execution_id": "uuid-v4",
    "status": "failed",
    "client_id": 11,
    "amount": 11,
    "rox_status": 422,
    "rox_code": "E00402",
    "rox_message": "Invalid amount",
    "payload": {
        "amount": [
            "amount must be numeric"
        ]
    }
}
mint.retry_scheduled
{
    "event": "mint.retry_scheduled",
    "execution_id": "uuid-v4",
    "status": "pending",
    "retry_count": 1,
    "error": "ROX request failed with status 503: Service unavailable"
}

1) Initial API Success (202)
{
    "success": true,
    "data": {
        "clientId": 11,
        "amount": 5.5,
        "status": "burning_started",
        "event": "burning.queued",
        "executionId": "uuid-v4"
    }
}
2) Validation Error (422)
{
    "success": false,
    "message": "Validation failed.",
    "errors": {
        "amount": [
            "The amount must be at least 1."
        ]
    }
}
3) Webhook Event Payloads By Type
burn.completed
{
    "event": "burn.completed",
    "execution_id": "uuid-v4",
    "status": "completed",
    "client_id": 11,
    "amount": 5.5,
    "rox_status": 200,
    "payload": {
        "amount": 5.5
    }
}
burn.failed
{
    "event": "burn.failed",
    "execution_id": "uuid-v4",
    "status": "failed",
    "client_id": 11,
    "amount": 5.5,
    "rox_status": 422,
    "payload": {
        "amount": [
            "insufficient balance"
        ]
    }
}
burn.retry_scheduled
{
    "event": "burn.retry_scheduled",
    "execution_id": "uuid-v4",
    "status": "pending",
    "retry_count": 1
}

1) Initial API Success (202)
{
    "success": true,
    "data": {
        "execution_id": "unique-id",
        "clientId": 11,
        "receiverClientId": 22,
        "amount": 3.5,
        "status": "transfer_started",
        "event": "transfer.queued"
    }
}
2) Validation Error (422)
{
    "success": false,
    "message": "Validation failed.",
    "errors": {
        "receiverClientId": [
            "The receiver client id field is required."
        ]
    }
}
3) Webhook Event Payloads By Type
transfare.completed
{
    "event": "transfare.completed",
    "execution_id": "unique-id",
    "status": "completed",
    "client_id": 11,
    "receiver_client_id": 22,
    "amount": 3.5,
    "rox_status": 201,
    "payload": {
        "transaction": {
            "id": "tx_123"
        }
    }
}
transfare.failed
{
    "event": "transfare.failed",
    "execution_id": "unique-id",
    "status": "failed",
    "client_id": 11,
    "receiver_client_id": 22,
    "amount": 3.5,
    "rox_status": 422,
    "payload": {
        "amount": [
            "Invalid transfer amount"
        ]
    }
}
transfare.retry_scheduled
{
    "event": "transfare.retry_scheduled",
    "execution_id": "unique-id",
    "status": "pending",
    "retry_count": 1
}

1) Initial API Success (202)
{
    "bulk.mint": {
        "success": true,
        "event": "bulk.mint.queued",
        "executionId": "uuid-v4"
    },
    "bulk.burn": {
        "success": true,
        "event": "bulk.burn.queued",
        "executionId": "uuid-v4"
    },
    "bulk.transfer": {
        "success": true,
        "data": {
            "execution_id": "unique-id",
            "status": "bulk_transfer_started",
            "event": "transfer.queued"
        }
    }
}
2) Validation Error (422)
{
    "success": false,
    "message": "Validation failed",
    "errors": {
        "items": [
            "The items field is required."
        ]
    }
}
3) Webhook Event Payloads By Type
per-item events
{
    "event": "mint.completed | burn.failed | transfare.completed",
    "execution_id": "parentExecutionId_0",
    "status": "completed|failed",
    "note": "Bulk jobs fan-out into single jobs and emit single-service events per item."
}

1) Initial API Success (202)
{
    "success": true,
    "data": {
        "execution_id": "uuid-v4",
        "status": "queued",
        "event": "bulk.users.queued",
        "ids_count": 3
    }
}
2) Validation Error (422)
{
    "success": false,
    "message": "Validation failed.",
    "errors": {
        "ids": [
            "The ids field is required."
        ]
    }
}
3) Webhook Event Payloads By Type
bulk.users.completed
{
    "event": "bulk.users.completed",
    "execution_id": "uuid-v4",
    "status": "completed",
    "ids": [
        11,
        22,
        33
    ],
    "ids_count": 3,
    "rox_status": 201,
    "payload": {
        "clients": [
            {
                "id": 11
            },
            {
                "id": 22
            },
            {
                "id": 33
            }
        ]
    }
}
bulk.users.failed
{
    "event": "bulk.users.failed",
    "execution_id": "uuid-v4",
    "status": "failed",
    "rox_status": 422,
    "payload": {
        "clients": [
            {
                "id": 22,
                "error": "Invalid client"
            }
        ]
    }
}
bulk.users.retry_scheduled
{
    "event": "bulk.users.retry_scheduled",
    "execution_id": "uuid-v4",
    "status": "pending",
    "retry_count": 1
}

1) Initial API Success (202)
{
    "success": true,
    "data": {
        "execution_id": "uuid-v4",
        "status": "queued",
        "event": "nfts.queued"
    }
}
2) Validation Error (422)
{
    "success": false,
    "message": "Validation failed.",
    "errors": {
        "rox_id": [
            "The rox id field is required."
        ]
    }
}
3) Webhook Event Payloads By Type
bulk.users.completed
{
    "event": "bulk.users.completed",
    "execution_id": "uuid-v4",
    "status": "completed",
    "rox_id": "wallet_001",
    "nfts": [
        {
            "name": "NFT A"
        }
    ],
    "rox_status": 201
}
bulk.users.failed
{
    "event": "bulk.users.failed",
    "execution_id": "uuid-v4",
    "status": "failed",
    "rox_status": 422,
    "payload": {
        "errors": [
            "Invalid NFT payload"
        ]
    }
}
bulk.users.retry_scheduled
{
    "event": "bulk.users.retry_scheduled",
    "execution_id": "uuid-v4",
    "status": "pending",
    "retry_count": 1
}
4) Callback Delivery Success
{
    "delivered": true,
    "callback_response": {
        "status": 200,
        "body": {
            "ok": true,
            "message": "Callback received"
        }
    }
}
5) Callback Retry Scheduled
{
    "delivered": false,
    "retry_result": {
        "event": "mint.failed.callback_retry_scheduled",
        "execution_id": "uuid-v4",
        "status": "pending",
        "retry_count": 1,
        "error": "Callback delivery failed: cURL error 28"
    }
}
Broadcast Channels and Events
Public Channel
channel: webhook
event: WebhookEvent
Carries execution updates with keys: executionId, serviceName, payload, roxResponse, startedAt.
Auth and Private User Channel
channel: App.Models.User.{id}
auth endpoint: /broadcasting/auth
The user channel is authorized when authenticated user id matches the channel id.
JS Subscription Example
window.Echo.channel('webhook')
  .listen('.WebhookEvent', (event) => {
    console.log('Realtime update', event);
  });
How to Access Everything
Bootstrap
composer install
cp .env.example .env
php artisan key:generate
php artisan migrate
npm install
npm run build
Start Services
php artisan serve
php artisan queue:work --queue=bulk,sub-mint,sub-burn,default -vv

# optional frontend hot reload
npm run dev
Access Map
https://rox-service-dev.dafa.dev/
Project portal
https://rox-service-dev.dafa.dev/admin
Filament dashboard
https://rox-service-dev.dafa.dev/api
API base path