Credits / Wallet
Read-only (GET) endpoints for the authenticated user's credit balance. They are free (they don't consume credit) and available with your Bearer token — no configured origin whitelist is required.
Auth:
Authorization: Bearer <api_token>header on every call. Base URL:https://api.dokicasa.it(production) ·https://api-dev.dokicasa.it(sandbox).
Credits by group
GET /api/users/me/credits
The user's available credits, aggregated by service group (electronic signature, land registry reports, ...) and by origin. Only non-expired credits are counted: the ones already spent stay in the count as used.
[
{ "group": "Firma Elettronica", "used": 3, "total": 10, "source": "smart", "is_unlimited": false },
{ "group": "Visure catastali", "used": 0, "total": 5, "source": "single", "is_unlimited": false }
]| Field | Type | Notes |
|---|---|---|
group | string | Service group. Credits with no group fall into Altri crediti |
total | integer | Credits in the group (spent ones included) |
used | integer | How many have already been spent |
source | string | smart (included in Dokicasa Smart) · market_scanner · single (bought separately) |
is_unlimited | boolean | true = the plan makes the group unlimited: show "unlimited" instead of the count |
The same group can appear in several rows with a different source: signatures included in the subscription and signatures bought separately stay counted apart.
| Query | Default | Notes |
|---|---|---|
only_dokicasa_smart | absent | 1 = only credits included in a Dokicasa Smart subscription. Without it those credits are excluded |
If you'd rather pass your own id, GET /api/users/{id}/credits answers the same way, but the id must be the one of the token's user: otherwise the response is 403.
Wallet balance
GET /api/users/me/wallet
Returns the user's balance, including expected future costs (scheduled jobs and pending censimenti).
{
"wallet": 120.00,
"real_wallet": 89.50
}| Field | Type | Notes |
|---|---|---|
wallet | number | Current nominal wallet balance |
real_wallet | number | Actually spendable balance, net of already-committed (pending) costs |
Transactions history
GET /api/users/me/wallet-transactions
Paginated history of wallet movements (most recent first).
| Query | Default | Notes |
|---|---|---|
per_page | 20 | items per page |
page | 1 | page to read |
Response: Laravel paginator — { current_page, data: [ … ], per_page, total, last_page, … }.
Everything in one call
GET /api/users/me/overview
The user's credits, wallet and subscriptions in a single response. It's the handy call to show the balance in your own software: each block is identical to the response of the matching single call, so the fields are the ones described above.
{
"user": { "id": 123, "email": "agency@example.com" },
"credits": [
{ "group": "Firma Elettronica", "used": 3, "total": 10, "source": "smart", "is_unlimited": false }
],
"wallet": { "wallet": 120.00, "real_wallet": 89.50 },
"subscriptions": {
"meta": { "count": 1, "has_dokicasa_smart": true },
"data": [
{
"id": 2308,
"name": "DokiCasa Smart",
"stripe_status": "ACTIVE",
"trial_ends_at": null,
"ends_at": "2027-06-30 23:59:59",
"renewed_times": 0,
"is_active": true,
"is_smart": true,
"renewal": { "cycle": "lifetime", "period": "month", "period_count": 12, "is_recurring": true, "label": "..." },
"billing_plan": { "id": 547, "name": "...", "amount": 22.0, "discount_price": null, "credits": 0, "description": null },
"product": { "id": 160, "name": "DokiCasa Smart Gruppi", "type": "SUBSCRIPTION" }
}
]
}
}| Block | Same response as |
|---|---|
credits | GET /api/users/me/credits (no parameters: Dokicasa Smart credits excluded) |
wallet | GET /api/users/me/wallet |
subscriptions | GET /api/users/me/subscriptions: active subscriptions, latest ending first |
subscriptions.data[] field | Notes |
|---|---|
stripe_status | ACTIVE · CANCELED · EXPIRED |
ends_at | Expiry date; null when it has no end date |
is_active | true when ends_at is in the future |
is_smart | true for a Dokicasa Smart subscription |
billing_plan | The plan paid for: name, amount (VAT excluded) and the credits it includes |
product | The plan's product; type is SUBSCRIPTION or SINGLE_PRODUCT |
| Query | Default | Notes |
|---|---|---|
include_expired | absent | 1 = expired subscriptions are listed too |
Quick try (curl)
curl https://api-dev.dokicasa.it/api/users/me/wallet \
-H "Authorization: Bearer HfBfYShns3E02no3kkwCRWQugkVNcJCtrRN2BPoI5NxhqsiXaxxnSPpIHY2O"
# → { "wallet": 120.00, "real_wallet": 89.50 }TIP
You can try them right away with the test token on the sandbox: they are read-only, free calls.