An independent Fragment purchasing API with local signing. Our server prepares the payment — your SDK checks it and signs it on your machine. We never see, receive, or store your wallet seed.
Call the API with your Fragment session and the recipient. We create the order on Fragment and prepare the exact payment transaction.
The SDK checks the prepared payment against your order: pinned Fragment addresses, your own wallet only, fee within the cap, short expiry, your spend limits.
Signing happens locally with your seed, on your server. The signed transaction is submitted, we confirm delivery with Fragment, and the order closes.
The fee travels inside your own signed transaction as a separate leg to our pinned fee wallet — you can verify every fee on-chain, and your SDK refuses to sign if the fee exceeds the cap you set.
We offer KYC mode only: purchases run under your own Fragment account and your own wallet. There is no no-KYC mode — we do not route strangers' purchases through our account, and we never ask for your seed "for convenience".
# SDK source: github.com/mboxcommunity/fragment-api (sdk/)
from fragment_api_sdk import FragmentAPI
api = FragmentAPI(api_key="mfrag_…", seed="<24 words — stays on your server>",
max_ton_per_order=5_000_000_000) # mandatory spend limit
order = api.buy_stars(username="@durov", amount=100) # verified + signed locally
print(order.status) # success
| Method | Path | Purpose |
|---|---|---|
| GET | /health | Availability |
| GET | /api/v1/prices | Current Stars prices |
| GET | /api/v1/commission/rates | Fee rates (0.01% KYC) |
| POST | /api/v1/session | Open a session (API key + Fragment cookies + your account) |
| POST | /api/v1/stars/buy | Create a Stars order → prepared payment |
| POST | /api/v1/premium/buy | Create a Premium order (3 / 6 / 12 months) |
| POST | /api/v1/premium/check-eligibility | Check a Premium recipient |
| POST | /api/v1/orders/{id}/submit | Submit your locally-signed transaction |
| GET | /api/v1/orders/{id} | Order status — reconcile by id, never re-pay blindly |
API base: https://fragment-api.mboxcommunity.org · Full reference: Documentation