Credits
A virtual currency system for in-app rewards and purchases. Credits let platforms incentivize user engagement while maintaining full financial integrity.
How Credits Work
Standard rate: 1,000 credits = $1 USD. This rate is fixed globally across all platforms.
Credits flow through four stages. Each stage is a separate API call, giving your platform full control over the user experience.
Key Guarantees
- Credits are backed by platform budget — every credit issued creates a real financial obligation on the platform's books.
- Credits are not cash — users cannot withdraw credits or spendable balance as real money.
- Only creators receive real payouts — when credits are spent on content, the creator earns real revenue through the normal payout flow.
- Budget controls prevent overissuance — platforms set a monthly credit budget. Once exhausted, no more credits can be issued until the next month.
API Reference
All credit operations use a single endpoint with an action field.
Issue Credits
Award credits to a user. Budget-checked against the org's monthly limit.
curl -X POST "https://api.soledgic.com/v1/credits" \
-H "x-api-key: slk_test_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"action": "issue",
"user_id": "user_123",
"credits": 5000,
"reason": "referral_bonus"
}'{
"success": true,
"user_id": "user_123",
"credits_issued": 5000,
"usd_value": 5.00,
"transaction_id": "txn_abc123",
"budget_remaining_cents": 495000
}Convert Credits
Convert earned credits into a spendable balance. Minimum conversion: 5,000 credits ($5). Credits in the wallet are unconverted — they must be converted before spending.
curl -X POST "https://api.soledgic.com/v1/credits" \
-H "x-api-key: slk_test_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"action": "convert",
"user_id": "user_123",
"credits": 5000
}'Spend (Redeem)
User spends their spendable balance on creator content. The creator/platform split applies just like a real-money purchase. Amount is in cents.
curl -X POST "https://api.soledgic.com/v1/credits" \
-H "x-api-key: slk_test_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"action": "redeem",
"user_id": "user_123",
"creator_id": "creator_456",
"amount": 500,
"reference_id": "purchase_abc"
}'{
"success": true,
"transaction_id": "txn_def456",
"amount": 5.00,
"creator_share": 4.00,
"platform_share": 1.00,
"user_remaining_balance": 0.00
}Check Balance
Returns both the unconverted credit balance and the spendable USD balance.
curl -X POST "https://api.soledgic.com/v1/credits" \
-H "x-api-key: slk_test_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"action": "balance",
"user_id": "user_123"
}'{
"success": true,
"user_id": "user_123",
"credits": 10000,
"credits_usd_value": 10.00,
"spendable_usd": 5.00,
"conversion_rate": "1000 credits = $1"
}Rules & Limits
| Rule | Detail |
|---|---|
| Conversion rate | 1,000 credits = $1 USD (fixed, global) |
| Minimum conversion | 5,000 credits ($5) |
| User withdrawal | Not allowed. Credits and spendable balance can only be spent in-app. |
| Creator payouts | Normal payout flow. Creators earn real money from credit-funded purchases. |
| Monthly budget | Set via org settings. Issuance blocked when budget is exhausted. |
| Custom rates | Not supported. The 1000:$1 rate is enforced at the Soledgic level. |
| Display names | Platforms can brand credits however they want (Coins, Stars, Energy) — the underlying rate is always 1000:$1. |
SDK Usage
import Soledgic from '@soledgic/sdk'
const soledgic = new Soledgic({ apiKey: 'slk_test_...' })
// Issue 5000 credits ($5) to a user
await soledgic.issueCredits('user_123', 5000, {
reason: 'weekly_login_bonus'
})
// Convert credits to spendable balance
await soledgic.convertCredits('user_123', 5000)
// User buys $5 content from a creator
await soledgic.redeemCredits('user_123', 'creator_456', 500, 'purchase_xyz')
// Check balance
const balance = await soledgic.getCreditBalance('user_123')
// { credits: 0, spendable_usd: 0.00 }Important: Credits represent a financial obligation. Every credit issued is backed by your platform's monthly budget. Monitor your credit issuance carefully to avoid unexpected payout obligations.