Skip to content

Bedrock Agentcore  >  Operations  >  create_payment_session

create_payment_session

Operation

create_payment_session async

create_payment_session(input: CreatePaymentSessionInput, plugins: list[Plugin] | None = None) -> CreatePaymentSessionOutput

Create a new payment session.

Parameters:

Name Type Description Default
input CreatePaymentSessionInput

An instance of CreatePaymentSessionInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
CreatePaymentSessionOutput

An instance of CreatePaymentSessionOutput.

Input

CreatePaymentSessionInput dataclass

Request structure for creating a payment session.

Attributes

agent_name class-attribute instance-attribute
agent_name: str | None = None

The agent name associated with this request, used for observability.

client_token class-attribute instance-attribute
client_token: str | None = None

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

expiry_time_in_minutes class-attribute instance-attribute
expiry_time_in_minutes: int | None = None

The session expiry time in minutes. Must be between 15 and 480 minutes.

limits class-attribute instance-attribute
limits: SessionLimits | None = None

The spending limits for this payment session.

payment_manager_arn class-attribute instance-attribute
payment_manager_arn: str | None = None

The ARN of the payment manager that owns this session.

user_id class-attribute instance-attribute
user_id: str | None = None

The user ID associated with this payment session.

Output

CreatePaymentSessionOutput dataclass

Response structure for creating a payment session.

Attributes

payment_session instance-attribute
payment_session: PaymentSession

The created payment session.