View as Markdown

SDK reference · Rails

withIntentToken

withIntentToken in @provenanceauth/rails/x402, Rails. Append the intent token to a PaymentPayload's extensions, echoing the merchant's entry unchanged (x402 v2: clients may append info but never delete or overwrite it).

Signature

withIntentToken(payment: X402PaymentPayload, extension: X402Extension, token: string, opts?: { jwksUrl?: string }): X402PaymentPayload

Parameters

paymentX402PaymentPayloadRequired
extensionX402ExtensionRequired
tokenstringRequired
opts{ jwksUrl?: string }

Returns

X402PaymentPayload

HTTP operation

Runs locally, with no request to the API.

Was this page helpful? Send us feedback

LLM? Read llms.txt.