Fragment Donor SDK

A SAFE CONTRACT WALKTHROUGH

Read the response.
Respect the uncertainty.

Explore four operations without sending a request. Every response is pre-rendered from the shared synthetic fixture. No wallet secret, account or live recipient is used.

PythonNode.js / TypeScriptPHP.NETGoRustRuby

WIRE CONTRACT PREVIEW

User lookup

Read-only
GET /get-user-info/?username=durov
No service authentication or wallet credentials
Choose a synthetic response for User lookup
200 · successSYNTHETIC FIXTURE · NO REQUEST SENT

A typed success response

Unknown response fields are preserved. This is fixture text, not a successful live transaction.

{
  "ok": true,
  "username": "durov",
  "is_premium": false,
  "future_field": {
    "kept": true
  }
}

Radio controls switch pre-rendered text only. No transaction is submitted.

429 · flood waitSYNTHETIC FIXTURE · NO REQUEST SENT

Respect the complete wait hint

FLOOD_WAIT exposes 42 seconds. Read retries are optional and bounded; purchases must never auto-replay.

{
  "ok": false,
  "error": "Too many requests",
  "error_code": "FLOOD_WAIT",
  "retry_after": 42,
  "flood_wait": 42
}

Radio controls switch pre-rendered text only. No transaction is submitted.

503 · unavailableSYNTHETIC FIXTURE · NO REQUEST SENT

The safety limiter is unavailable

RATE_LIMIT_UNAVAILABLE exposes 5 seconds. This is a pre-purchase guard response, not a reason to bypass the limit.

{
  "ok": false,
  "error": "Rate limit temporarily unavailable",
  "error_code": "RATE_LIMIT_UNAVAILABLE",
  "retry_after": 5
}

Radio controls switch pre-rendered text only. No transaction is submitted.

400 · outcome unknownSYNTHETIC FIXTURE · NO REQUEST SENT

Unknown payment outcomes apply to purchases

This operation is read-only and sends no payment. Choose Gift Stars or Gift Premium to inspect the HTTP 400 unconfirmed purchase fixture.

Read-only operation

The viewer does not pretend that this endpoint returned a purchase response.

Radio controls switch pre-rendered text only. No transaction is submitted.

WIRE CONTRACT PREVIEW

Wallet balance

Read-only
GET /wallet-balance/
Mnemonic: [YOUR SERVER-SIDE WALLET SECRET]
Api-Key: [OPTIONAL TONCONSOLE PROVIDER KEY]
Choose a synthetic response for Wallet balance
200 · successSYNTHETIC FIXTURE · NO REQUEST SENT

A typed success response

Unknown response fields are preserved. This is fixture text, not a successful live transaction.

{
  "ok": true,
  "address": "SYNTHETIC_WALLET_ADDRESS",
  "ton": "2.500000001",
  "usdt_ton": "9007199254740993.01",
  "future_field": "preserve"
}

Keep TON / USDT-TON as exact decimal strings. Never convert balances to binary floating point.

429 · flood waitSYNTHETIC FIXTURE · NO REQUEST SENT

Respect the complete wait hint

FLOOD_WAIT exposes 42 seconds. Read retries are optional and bounded; purchases must never auto-replay.

{
  "ok": false,
  "error": "Too many requests",
  "error_code": "FLOOD_WAIT",
  "retry_after": 42,
  "flood_wait": 42
}

Radio controls switch pre-rendered text only. No transaction is submitted.

503 · unavailableSYNTHETIC FIXTURE · NO REQUEST SENT

The safety limiter is unavailable

RATE_LIMIT_UNAVAILABLE exposes 5 seconds. This is a pre-purchase guard response, not a reason to bypass the limit.

{
  "ok": false,
  "error": "Rate limit temporarily unavailable",
  "error_code": "RATE_LIMIT_UNAVAILABLE",
  "retry_after": 5
}

Radio controls switch pre-rendered text only. No transaction is submitted.

400 · outcome unknownSYNTHETIC FIXTURE · NO REQUEST SENT

Unknown payment outcomes apply to purchases

This operation is read-only and sends no payment. Choose Gift Stars or Gift Premium to inspect the HTTP 400 unconfirmed purchase fixture.

Read-only operation

The viewer does not pretend that this endpoint returned a purchase response.

Radio controls switch pre-rendered text only. No transaction is submitted.

WIRE CONTRACT PREVIEW

Gift Stars

Purchase · never replay
POST /buy-stars/
Mnemonic: [YOUR SERVER-SIDE WALLET SECRET]
Cookie: [YOUR FRAGMENT SESSION]
Api-Key: [OPTIONAL TONCONSOLE PROVIDER KEY]
Content-Type: application/x-www-form-urlencoded

username=durov&amount=50&payment_method=usdt_ton
Choose a synthetic response for Gift Stars
200 · successSYNTHETIC FIXTURE · NO REQUEST SENT

A typed success response

Unknown response fields are preserved. This is fixture text, not a successful live transaction.

{
  "ok": true,
  "data": {
    "transaction": "SYNTHETIC_TRANSACTION"
  },
  "future_field": "preserve"
}

Radio controls switch pre-rendered text only. No transaction is submitted.

429 · flood waitSYNTHETIC FIXTURE · NO REQUEST SENT

Respect the complete wait hint

FLOOD_WAIT exposes 42 seconds. Read retries are optional and bounded; purchases must never auto-replay.

{
  "ok": false,
  "error": "Too many requests",
  "error_code": "FLOOD_WAIT",
  "retry_after": 42,
  "flood_wait": 42
}

Radio controls switch pre-rendered text only. No transaction is submitted.

503 · unavailableSYNTHETIC FIXTURE · NO REQUEST SENT

The safety limiter is unavailable

RATE_LIMIT_UNAVAILABLE exposes 5 seconds. This is a pre-purchase guard response, not a reason to bypass the limit.

{
  "ok": false,
  "error": "Rate limit temporarily unavailable",
  "error_code": "RATE_LIMIT_UNAVAILABLE",
  "retry_after": 5
}

Radio controls switch pre-rendered text only. No transaction is submitted.

400 · outcome unknownSYNTHETIC FIXTURE · NO REQUEST SENT

A 400 can still mean funds were sent

unconfirmed: true is PurchaseOutcomeUnknown, not safe rejection or validation. Preserve the transaction hash and reconcile manually. Never replay this purchase.

{
  "ok": false,
  "unconfirmed": true,
  "tx_hash": "SYNTHETIC_UNCONFIRMED_TX_HASH",
  "destination": "SYNTHETIC_DESTINATION",
  "amount_nano": "1000000000",
  "seqno_before": 12,
  "info": "SYNTHETIC_TRANSFER_CONFIRMATION_UNKNOWN"
}

Reconciliation fields remain available in safely redacted structured error details. There is no idempotency key or purchase-status endpoint.

WIRE CONTRACT PREVIEW

Gift Premium

Purchase · never replay
POST /buy-premium/
Mnemonic: [YOUR SERVER-SIDE WALLET SECRET]
Cookie: [YOUR FRAGMENT SESSION]
Api-Key: [OPTIONAL TONCONSOLE PROVIDER KEY]
Content-Type: application/x-www-form-urlencoded

username=durov&duration=3&payment_method=usdt_ton
Choose a synthetic response for Gift Premium
200 · successSYNTHETIC FIXTURE · NO REQUEST SENT

A typed success response

Unknown response fields are preserved. This is fixture text, not a successful live transaction.

{
  "ok": true,
  "data": {
    "transaction": "SYNTHETIC_TRANSACTION"
  },
  "future_field": "preserve"
}

Radio controls switch pre-rendered text only. No transaction is submitted.

429 · flood waitSYNTHETIC FIXTURE · NO REQUEST SENT

Respect the complete wait hint

FLOOD_WAIT exposes 42 seconds. Read retries are optional and bounded; purchases must never auto-replay.

{
  "ok": false,
  "error": "Too many requests",
  "error_code": "FLOOD_WAIT",
  "retry_after": 42,
  "flood_wait": 42
}

Radio controls switch pre-rendered text only. No transaction is submitted.

503 · unavailableSYNTHETIC FIXTURE · NO REQUEST SENT

The safety limiter is unavailable

RATE_LIMIT_UNAVAILABLE exposes 5 seconds. This is a pre-purchase guard response, not a reason to bypass the limit.

{
  "ok": false,
  "error": "Rate limit temporarily unavailable",
  "error_code": "RATE_LIMIT_UNAVAILABLE",
  "retry_after": 5
}

Radio controls switch pre-rendered text only. No transaction is submitted.

400 · outcome unknownSYNTHETIC FIXTURE · NO REQUEST SENT

A 400 can still mean funds were sent

unconfirmed: true is PurchaseOutcomeUnknown, not safe rejection or validation. Preserve the transaction hash and reconcile manually. Never replay this purchase.

{
  "ok": false,
  "unconfirmed": true,
  "tx_hash": "SYNTHETIC_UNCONFIRMED_TX_HASH",
  "destination": "SYNTHETIC_DESTINATION",
  "amount_nano": "1000000000",
  "seqno_before": 12,
  "info": "SYNTHETIC_TRANSFER_CONFIRMATION_UNKNOWN"
}

Reconciliation fields remain available in safely redacted structured error details. There is no idempotency key or purchase-status endpoint.

No service authentication

The direct API has no service login or service API key. Api-Key is only an optional TonConsole provider key. Wallet operations still need your own credentials.

Read retry is optional

Default: 0 retries. Opt-in reads: at most 2 retries, maximum 60-second waits. Longer hints return an error. Purchases never automatically retry.

Know the credential boundary

Purchase requests transmit wallet mnemonic and Fragment session/cookie data to the API operator.

The native test suites include mocked no-duplicate-purchase regressions. This viewer does not execute them and does not invent a dispatch counter. Inspect the actual CI and test sources.