create_payment_session¶
Operation¶
create_payment_session
¶
create_payment_session(request: CreatePaymentSessionInput | CreatePaymentSessionInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreatePaymentSessionInputDict]) -> CreatePaymentSessionOutput
Create a new payment session.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
CreatePaymentSessionInput | CreatePaymentSessionInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
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
|
**kwargs
|
Unpack[CreatePaymentSessionInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
CreatePaymentSessionOutput
|
An instance of |
create_payment_session
async
¶
create_payment_session(request: CreatePaymentSessionInput | CreatePaymentSessionInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreatePaymentSessionInputDict]) -> CreatePaymentSessionOutput
Create a new payment session.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
CreatePaymentSessionInput | CreatePaymentSessionInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
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
|
**kwargs
|
Unpack[CreatePaymentSessionInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
CreatePaymentSessionOutput
|
An instance of |
Input¶
Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.
CreatePaymentSessionInputDict
¶
Bases: TypedDict
Dictionary form of CreatePaymentSessionInput.
Attributes¶
agent_name
instance-attribute
¶
agent_name: str | None
The agent name associated with this request, used for observability.
client_token
instance-attribute
¶
client_token: str | None
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
This field is autopopulated if not provided.
expiry_time_in_minutes
instance-attribute
¶
The session expiry time in minutes. Must be between 15 and 480 minutes.
limits
instance-attribute
¶
limits: SessionLimits | SessionLimitsDict | None
The spending limits for this payment session.
payment_manager_arn
instance-attribute
¶
The ARN of the payment manager that owns this session.
CreatePaymentSessionInput
dataclass
¶
Bases: _SerdeShape
Request structure for creating a payment session.
Attributes¶
agent_name
class-attribute
instance-attribute
¶
agent_name: str | None = ...
The agent name associated with this request, used for observability.
client_token
class-attribute
instance-attribute
¶
client_token: str | None = ...
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
This field is autopopulated if not provided.
expiry_time_in_minutes
class-attribute
instance-attribute
¶
expiry_time_in_minutes: int | None = ...
The session expiry time in minutes. Must be between 15 and 480 minutes.
limits
class-attribute
instance-attribute
¶
limits: SessionLimits | None = ...
The spending limits for this payment session.
Output¶
CreatePaymentSessionOutput
dataclass
¶
Bases: _SerdeShape
Response structure for creating a payment session.