Skip to content

process_payment

Operation

process_payment

process_payment(request: ProcessPaymentInput | ProcessPaymentInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[ProcessPaymentInputDict]) -> ProcessPaymentOutput

Processes a payment using a payment instrument within a payment session.

Parameters:

Name Type Description Default
request ProcessPaymentInput | ProcessPaymentInputDict | 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[ProcessPaymentInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
ProcessPaymentOutput

An instance of ProcessPaymentOutput.

process_payment async

process_payment(request: ProcessPaymentInput | ProcessPaymentInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[ProcessPaymentInputDict]) -> ProcessPaymentOutput

Processes a payment using a payment instrument within a payment session.

Parameters:

Name Type Description Default
request ProcessPaymentInput | ProcessPaymentInputDict | 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[ProcessPaymentInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
ProcessPaymentOutput

An instance of ProcessPaymentOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

ProcessPaymentInputDict

Bases: TypedDict

Dictionary form of ProcessPaymentInput.

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.

payment_input instance-attribute

The payment input details specific to the payment type.

payment_instrument_id instance-attribute
payment_instrument_id: Required[str]

The ID of the payment instrument to use.

payment_manager_arn instance-attribute
payment_manager_arn: Required[str]

The ARN of the payment manager.

payment_session_id instance-attribute
payment_session_id: Required[str]

The ID of the payment session.

payment_type instance-attribute
payment_type: Required[str]

The type of payment to process.

user_id instance-attribute
user_id: str | None

The user ID associated with this payment.

ProcessPaymentInput dataclass

Bases: _SerdeShape

Request structure for processing a payment.

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.

payment_input class-attribute instance-attribute
payment_input: PaymentInput | None = ...

The payment input details specific to the payment type.

payment_instrument_id class-attribute instance-attribute
payment_instrument_id: str | None = ...

The ID of the payment instrument to use.

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

The ARN of the payment manager.

payment_session_id class-attribute instance-attribute
payment_session_id: str | None = ...

The ID of the payment session.

payment_type class-attribute instance-attribute
payment_type: str | None = ...

The type of payment to process.

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

The user ID associated with this payment.

Output

ProcessPaymentOutput dataclass

Bases: _SerdeShape

Response structure for processing a payment.

Attributes

created_at instance-attribute
created_at: datetime

The timestamp when the payment was created.

payment_instrument_id instance-attribute
payment_instrument_id: str

The ID of the payment instrument used.

payment_manager_arn instance-attribute
payment_manager_arn: str

The ARN of the payment manager.

payment_output instance-attribute
payment_output: PaymentOutput

The payment output details specific to the payment type.

payment_session_id instance-attribute
payment_session_id: str

The ID of the payment session used.

payment_type instance-attribute
payment_type: str

The type of payment processed.

process_payment_id instance-attribute
process_payment_id: str

The unique identifier of the processed payment.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

status instance-attribute
status: str

The status of the payment.

updated_at instance-attribute
updated_at: datetime

The timestamp when the payment was last updated.