Pay And Call External x402 Endpoint
sap_payments_call_external_x402Calls external HTTP x402 endpoints, signs payment challenges with local SAP MCP wallet, retries with signature, and returns response with receipt. Requires confirmation and max price cap.
Instructions
High-level local payment bridge for generic HTTP x402 endpoints outside hosted SAP MCP, such as another SAP agent endpoint discovered from the registry. It sends the request once to obtain the 402 payment challenge, signs with the user-controlled local SAP MCP profile wallet, retries the same HTTP request with PAYMENT-SIGNATURE, and returns the response plus receipt. Use sap_payments_call_paid_tool for hosted SAP MCP tools; use this only for external HTTP x402 providers. Requires confirm: true and maxPriceUsd.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | External HTTP or HTTPS x402 endpoint URL to call, for example an agent endpoint discovered from SAP registry metadata. | |
| body | No | Optional JSON request body for POST, PUT, PATCH, or DELETE calls. Strings are sent as-is; objects are JSON-encoded. | |
| method | No | HTTP method for the external request. Defaults to POST. | |
| confirm | No | Must be true. Confirms the user allows this helper to sign an x402 payment payload. | |
| headers | No | Optional non-sensitive headers for the external request. Do not include PAYMENT-SIGNATURE, X-PAYMENT, Authorization, or cookies. | |
| maxAttempts | No | Optional retry count for transient x402/RPC failures such as BlockhashNotFound. Defaults to 3; max 5. | |
| maxPriceUsd | No | Maximum accepted x402 payment amount in USD. The call aborts if the challenge exceeds this cap. | |
| profileName | No | SAP MCP profile used to sign the x402 payment. Defaults to the active profile. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | External endpoint URL called. | |
| audit | Yes | Agent-readable proof object with intent id, profile, payment receipt, attempts, and secret-material guarantee. | |
| method | Yes | HTTP method used. | |
| payment | No | Selected payment requirements, including amountUsd, network, asset, and payTo, when a 402 challenge was paid. | |
| success | Yes | Whether the external x402 call completed successfully. | |
| attempts | Yes | Number of attempts used. | |
| response | Yes | External HTTP response status, safe headers, and parsed body. | |
| settlement | No | x402 settlement response returned by the provider/facilitator when available. | |
| signerAddress | Yes | Public address of the local SAP MCP signer. Secret bytes are never returned. | |
| transientRetries | Yes | Retryable errors encountered before success. |