purchase_asset_with_walletScope: wallet:spendPurchase Asset with Wallet
Execute an autonomous asset purchase and commercial licensing grant using preloaded Krafto Wallet credits.
Description
Purchase Asset with Wallet executes an atomic transaction debited directly from the user's Krafto Wallet credit balance. When invoked, the Krafto backend verifies the caller's wallet:spend scope, checks for sufficient balance, validates that the asset price does not exceed the optional confirmMaxPriceINR safety guardrail, debits the exact price, records an immutable order receipt, grants a perpetual commercial license in the user's library, and returns an instant download URL. This allows AI development tools to procure fonts, templates, or 3D models frictionlessly on behalf of the user while honoring strict financial safety constraints.
CRITICAL: Always confirm explicit user consent and state the exact price before executing a wallet spend, unless the user has given pre-authorized spending rules.
Input Arguments
2 parameters| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| assetId | string | Required | — | The unique catalog identifier of the asset to purchase. |
| confirmMaxPriceINR | number | Optional | — | Safety price guardrail in INR. Transaction is automatically aborted if current price is higher than this value. |
Request Example
{
"jsonrpc": "2.0",
"id": "call_12",
"method": "tools/call",
"params": {
"name": "purchase_asset_with_wallet",
"arguments": {
"assetId": "ast_neon_matrix",
"confirmMaxPriceINR": 500
}
}
}Response Schema Example
{
"success": true,
"orderId": "ord_krafto_98210",
"assetId": "ast_neon_matrix",
"debitedINR": 499,
"newWalletBalanceINR": 1951,
"downloadUrl": "https://storage.trykrafto.xyz/bundles/ast_neon_matrix.zip?X-Amz-Signature=..."
}