process_payment
¶
process_payment(
payment_manager_arn: PaymentManagerArn,
payment_session_id: PaymentSessionId,
payment_instrument_id: PaymentInstrumentId,
payment_type: PaymentType,
payment_input: PaymentInput,
*,
config_overrides: Optional[BedrockAgentCoreClientConfig] = None,
user_id: Optional[UserId] = None,
agent_name: Optional[PaymentAgentName] = None,
client_token: Optional[ClientToken] = None,
) -> ProcessPaymentResponse
Processes a payment using a payment instrument within a payment session.
Parameters:
-
user_id(Optional[UserId], default:None) –The user ID associated with this payment.
-
agent_name(Optional[PaymentAgentName], default:None) –The agent name associated with this request, used for observability.
-
payment_manager_arn(PaymentManagerArn) –The ARN of the payment manager.
-
payment_session_id(PaymentSessionId) –The ID of the payment session.
-
payment_instrument_id(PaymentInstrumentId) –The ID of the payment instrument to use.
-
payment_type(PaymentType) –The type of payment to process.
-
payment_input(PaymentInput) –The payment input details specific to the payment type.
-
client_token(Optional[ClientToken], default:None) –A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
Raises:
-
AccessDeniedException–The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
-
ConflictException–The exception that occurs when the request conflicts with the current state of the resource. This can happen when trying to modify a resource that is currently being modified by another request, or when trying to create a resource that already exists.
-
InternalServerException–The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
-
ResourceNotFoundException–The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
-
ServiceQuotaExceededException–The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
-
SubscriptionRequiredException–Returned when you attempt a wallet operation against a Coinbase Marketplace connector whose account does not hold an active Marketplace subscription and is not within the legacy exception period. Subscribe to the Marketplace listing before you retry the operation.
-
ThrottlingException–The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
-
ValidationException–The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_bedrock_agentcore/_services/bedrock_agent_core.py
5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 | |