Prepare SAP x402 Payment
sap_x402_prepare_paymentPrepare an x402 payment context using SDK X402Registry.preparePayment. New production escrow funding should use Escrow V2 fields and nonce-aware flows. SAP MCP context: Payment and settlement flow. Estimate or fetch state before creating escrows or settling calls; write operations require an enabled signer mode and MCP policy approval.
SAP MCP execution guidance: Intent: SAP MCP tool workflow. Pricing: paid value-action; preview cost and transaction effects before user confirmation. Routing: paid hosted call; call sap_estimate_tool_cost first, then use sap_payments_call_paid_tool if the runtime cannot handle x402 natively. Signer boundary: hosted reads/builders never receive keypair bytes; value-moving results must be finalized locally when signing is required.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nonce | No | Optional escrow nonce as a decimal string. Defaults to 0. | |
| deposit | No | Initial deposit as a decimal string. Amount in the escrow token smallest unit: lamports for SOL, micro-USDC for USDC, or base units for the configured SPL token. | |
| maxCalls | No | Optional maximum number of calls covered | |
| expiresAt | No | Optional expiry timestamp in unix seconds | |
| tokenMint | No | Optional SPL token mint; omit/null for SOL. Use EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v for mainnet USDC. | |
| agentWallet | No | Agent wallet public key (base58) | |
| volumeCurve | No | Optional array of { afterCalls, pricePerCall } pricing breakpoints | |
| pricePerCall | No | Price per call as a decimal string. Amount in the escrow token smallest unit: lamports for SOL, micro-USDC for USDC, or base units for the configured SPL token. | |
| tokenDecimals | No | Optional token decimals. Defaults to 6 for USDC/SPL flows when supplied by the SDK and 9 for native SOL. | |
| networkIdentifier | No | Optional x402 network identifier written into headers |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | MCP content blocks returned to the caller. | |
| isError | No | True when the tool result represents an application-level error. |