SDK reference · Rails
withIntentExtension
withIntentExtension in @provenanceauth/rails/x402, Rails. Add the extension to a PaymentRequired your x402 server already builds (returns a new object; other extensions are kept).
Signature
withIntentExtension(paymentRequired: X402PaymentRequired, opts?: { required?: boolean; profile?: DiscoveryBlock }): X402PaymentRequiredParameters
paymentRequiredX402PaymentRequiredRequiredopts{ required?: boolean; profile?: DiscoveryBlock }
Returns
X402PaymentRequired
HTTP operation
Runs locally, with no request to the API.