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 |
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 |
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
¶
payment_input: Required[PaymentInput | PaymentInputDict]
The payment input details specific to the payment type.
payment_instrument_id
instance-attribute
¶
The ID of the payment instrument to use.
payment_manager_arn
instance-attribute
¶
The ARN of the payment manager.
payment_session_id
instance-attribute
¶
The ID of the payment session.
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.
Output¶
ProcessPaymentOutput
dataclass
¶
Bases: _SerdeShape
Response structure for processing a payment.
Attributes¶
payment_instrument_id
instance-attribute
¶
payment_instrument_id: str
The ID of the payment instrument used.
payment_output
instance-attribute
¶
payment_output: PaymentOutput
The payment output details specific to the payment type.
process_payment_id
instance-attribute
¶
process_payment_id: str
The unique identifier of the processed payment.
response_metadata
class-attribute
instance-attribute
¶
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.