BedrockAgentCore / Client / process_payment
process_payment¶
- BedrockAgentCore.Client.process_payment(**kwargs)¶
Processes a payment using a payment instrument within a payment session.
See also: AWS API Documentation
Request Syntax
response = client.process_payment( userId='string', agentName='string', paymentManagerArn='string', paymentSessionId='string', paymentInstrumentId='string', paymentType='CRYPTO_X402', paymentInput={ 'cryptoX402': { 'version': 'string', 'payload': {...}|[...]|123|123.4|'string'|True|None } }, clientToken='string' )
- Parameters:
userId (string) – The user ID associated with this payment.
agentName (string) – The agent name associated with this request, used for observability.
paymentManagerArn (string) –
[REQUIRED]
The ARN of the payment manager.
paymentSessionId (string) –
[REQUIRED]
The ID of the payment session.
paymentInstrumentId (string) –
[REQUIRED]
The ID of the payment instrument to use.
paymentType (string) –
[REQUIRED]
The type of payment to process.
paymentInput (dict) –
[REQUIRED]
The payment input details specific to the payment type.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
cryptoX402.cryptoX402 (dict) –
Input for a crypto X402 payment.
version (string) – [REQUIRED]
The version of the X402 protocol.
payload (document) – [REQUIRED]
The X402 payment payload.
clientToken (string) –
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
This field is autopopulated if not provided.
- Return type:
dict
- Returns:
Response Syntax
{ 'processPaymentId': 'string', 'paymentManagerArn': 'string', 'paymentSessionId': 'string', 'paymentInstrumentId': 'string', 'paymentType': 'CRYPTO_X402', 'status': 'PROOF_GENERATED', 'paymentOutput': { 'cryptoX402': { 'version': 'string', 'payload': {...}|[...]|123|123.4|'string'|True|None } }, 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1) }
Response Structure
(dict) –
Response structure for processing a payment.
processPaymentId (string) –
The unique identifier of the processed payment.
paymentManagerArn (string) –
The ARN of the payment manager.
paymentSessionId (string) –
The ID of the payment session used.
paymentInstrumentId (string) –
The ID of the payment instrument used.
paymentType (string) –
The type of payment processed.
status (string) –
The status of the payment.
paymentOutput (dict) –
The payment output details specific to the payment type.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
cryptoX402. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBERas the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBERis as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
cryptoX402 (dict) –
Output from a crypto X402 payment.
version (string) –
The version of the X402 protocol.
payload (document) –
The X402 payment response payload.
createdAt (datetime) –
The timestamp when the payment was created.
updatedAt (datetime) –
The timestamp when the payment was last updated.
Exceptions
BedrockAgentCore.Client.exceptions.ServiceQuotaExceededExceptionBedrockAgentCore.Client.exceptions.AccessDeniedExceptionBedrockAgentCore.Client.exceptions.ConflictExceptionBedrockAgentCore.Client.exceptions.ValidationExceptionBedrockAgentCore.Client.exceptions.ThrottlingExceptionBedrockAgentCore.Client.exceptions.InternalServerException