process_payment¶
Operation¶
process_payment
async
¶
process_payment(input: ProcessPaymentInput, plugins: list[Plugin] | None = None) -> ProcessPaymentOutput
Processes a payment using a payment instrument within a payment session.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
ProcessPaymentInput
|
An instance of |
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 |
|---|---|
ProcessPaymentOutput
|
An instance of |
Input¶
ProcessPaymentInput
dataclass
¶
Request structure for processing a payment.
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.
payment_input
class-attribute
instance-attribute
¶
payment_input: PaymentInput | None = None
The payment input details specific to the payment type.
payment_instrument_id
class-attribute
instance-attribute
¶
payment_instrument_id: str | None = None
The ID of the payment instrument to use.
payment_manager_arn
class-attribute
instance-attribute
¶
payment_manager_arn: str | None = None
The ARN of the payment manager.
payment_session_id
class-attribute
instance-attribute
¶
payment_session_id: str | None = None
The ID of the payment session.
payment_type
class-attribute
instance-attribute
¶
payment_type: PaymentType | None = None
The type of payment to process.
user_id
class-attribute
instance-attribute
¶
user_id: str | None = None
The user ID associated with this payment.
Output¶
ProcessPaymentOutput
dataclass
¶
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.
updated_at
instance-attribute
¶
updated_at: datetime
The timestamp when the payment was last updated.