AgentsFunctionResultcreate_payment_parameterCopy page|View as Markdown|Open in Claude|More actionsStatic helper that builds a parameter entry for the parameters list of pay(). Parameters namestrRequiredParameter name. valuestrRequiredParameter value. Returns dict[str, str] — parameter dictionary for use in the parameters list of pay(). Example 1from signalwire import AgentBase2from signalwire import FunctionResult34agent = AgentBase(name="my-agent", route="/agent")5agent.set_prompt_text("You are a helpful assistant.")67@agent.tool(name="subscription_payment", description="Set up a subscription payment")8def subscription_payment(args, raw_data):9 prompt = FunctionResult.create_payment_prompt(10 for_situation="payment-card-number",11 actions=[12 FunctionResult.create_payment_action("Say", "Please enter your credit card number.")13 ]14 )15 return (16 FunctionResult("Let's set up your subscription.")17 .pay(18 payment_connector_url="https://api.example.com/subscribe",19 charge_amount="29.99",20 prompts=[prompt],21 parameters=[22 FunctionResult.create_payment_parameter("plan", "monthly")23 ]24 )25 )2627agent.serve()