Sign Hosted x402 Challenge
sap_payments_sign_challengeSigns a parsed x402 PaymentRequired challenge with the active wallet profile and returns a one-time Payment-Signature header for custom client implementations requiring direct payment header access.
Instructions
Low-level local helper that signs a parsed x402 PaymentRequired challenge with the active SAP MCP profile wallet and returns a one-time Payment-Signature header. Use only when building a custom client; normal agents should prefer sap_payments_call_paid_tool so the payment header is not surfaced separately. Requires confirm: true and maxPriceUsd.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | No | Must be true. Confirms the user allows this helper to sign an x402 payment payload. | |
| challenge | No | Alias for paymentRequired for agent runtimes that store the challenge under a generic name. | |
| 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. | |
| selectedIndex | No | Index into paymentRequired.accepts to sign. Defaults to 0. | |
| paymentRequired | No | Parsed x402 PaymentRequired challenge returned by sap_payments_prepare_challenge or the hosted MCP payment_required response. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| headers | No | HTTP headers to attach to the exact paid retry request. | |
| payload | No | x402 payment payload produced by the official client SDK. | |
| payment | No | Selected network, asset, and payTo. | |
| warning | No | Safety warning for one-time payment authorization material. | |
| amountUsd | No | USD amount authorized by the selected challenge. | |
| signerAddress | No | Public address of the signer that created the payment authorization. |