

# PaymentIntent

A payment intent, which represents a buyer's intention to pay a merchant.

## Contents
<a name="API_PaymentIntent_Contents"></a>

 ** buyerApprovalStatus **   <a name="BedrockAgentCore-Type-PaymentIntent-buyerApprovalStatus"></a>
The buyer approval status of the current version of the payment intent. Valid values:  
+  `BUYER_APPROVAL_REQUIRED` - The buyer hasn't started approving the current version of the payment intent.
+  `BUYER_APPROVAL_IN_PROGRESS` - The buyer opened the buyer approval URL and hasn't decided yet.
+  `BUYER_APPROVAL_CONFIRMED` - The buyer approved the current version of the payment intent.
+  `BUYER_APPROVAL_REJECTED` - The buyer declined the current version of the payment intent.
+  `BUYER_APPROVAL_EXPIRED` - The buyer approval expired before the buyer decided.
Type: String  
Valid Values: `BUYER_APPROVAL_REQUIRED | BUYER_APPROVAL_IN_PROGRESS | BUYER_APPROVAL_CONFIRMED | BUYER_APPROVAL_REJECTED | BUYER_APPROVAL_EXPIRED`   
Required: Yes

 ** checkoutDetails **   <a name="BedrockAgentCore-Type-PaymentIntent-checkoutDetails"></a>
The checkout details for this payment intent.  
Type: [PaymentIntentCheckoutDetails](API_PaymentIntentCheckoutDetails.md) object  
Required: Yes

 ** createdAt **   <a name="BedrockAgentCore-Type-PaymentIntent-createdAt"></a>
The time when the payment intent was created.  
Type: Timestamp  
Required: Yes

 ** paymentConnectorId **   <a name="BedrockAgentCore-Type-PaymentIntent-paymentConnectorId"></a>
The ID of the payment connector that you specified when you created the payment intent.  
Type: String  
Length Constraints: Minimum length of 12. Maximum length of 211.  
Pattern: `([0-9a-z_][-]?){1,100}-[0-9a-z]{10}`   
Required: Yes

 ** paymentIntentId **   <a name="BedrockAgentCore-Type-PaymentIntent-paymentIntentId"></a>
The ID of the payment intent.  
Type: String  
Length Constraints: Fixed length of 30.  
Pattern: `payment-intent-[0-9a-zA-Z-]{15}`   
Required: Yes

 ** paymentManagerArn **   <a name="BedrockAgentCore-Type-PaymentIntent-paymentManagerArn"></a>
The ARN of the payment manager that owns this payment intent.  
Type: String  
Length Constraints: Minimum length of 66. Maximum length of 2048.  
Pattern: `arn:(aws|aws-[a-z0-9-]+):bedrock-agentcore:[a-z0-9-]+:[0-9]{12}:payment-manager/[a-z0-9]([a-z0-9-]{0,47}[a-z0-9])?-[a-z0-9]{10}`   
Required: Yes

 ** status **   <a name="BedrockAgentCore-Type-PaymentIntent-status"></a>
The status of the payment intent. Valid values:  
+  `CREATED` - The payment intent was created.
+  `INITIATED` - The payment intent was initiated with the payment provider.
+  `AUTHORIZED` - The funds are authorized (held) but not yet captured. Applies to the `FUTURE` capture strategy.
+  `PARTIALLY_CAPTURED` - Part of the authorized funds was captured, and more captures can follow. For the `SETUP` capture strategy, part of the total amount was charged off-session, and more charges can follow until the total amount is reached.
+  `CAPTURED` - The funds were captured.
+  `FAILED` - The payment failed, for example because it was declined, the authorization expired, or a terminal error occurred.
+  `CANCELLED` - The payment intent was cancelled before authorization, or its authorization was voided.
+  `SAVE_PENDING` - For the `SETUP` capture strategy, the Stripe-hosted setup Checkout Session was created and is waiting for the buyer to save a payment method.
+  `SAVED` - For the `SETUP` capture strategy, a payment method was saved and can be charged off-session.
+  `SAVE_FAILED` - For the `SETUP` capture strategy, the buyer abandoned or failed to save a payment method. This status is terminal.
+  `REAUTH_REQUIRED` - For the `SETUP` capture strategy, the first off-session charge requires the buyer to authenticate again. This status is terminal. A later charge that requires authentication fails without changing a `PARTIALLY_CAPTURED` payment intent.
+  `PAYMENT_DECLINED` - For the `SETUP` capture strategy, the first off-session charge against the saved payment method was declined. This status is terminal. A later declined charge fails without changing a `PARTIALLY_CAPTURED` payment intent.
Type: String  
Valid Values: `CREATED | INITIATED | AUTHORIZED | PARTIALLY_CAPTURED | CAPTURED | FAILED | CANCELLED | SAVE_PENDING | SAVED | SAVE_FAILED | REAUTH_REQUIRED | PAYMENT_DECLINED`   
Required: Yes

 ** updatedAt **   <a name="BedrockAgentCore-Type-PaymentIntent-updatedAt"></a>
The time when the payment intent was last updated.  
Type: Timestamp  
Required: Yes

 ** version **   <a name="BedrockAgentCore-Type-PaymentIntent-version"></a>
The version of the payment intent that this response represents. Buyer approval applies to a specific version.  
Type: Integer  
Valid Range: Minimum value of 1.  
Required: Yes

 ** authorizedAmount **   <a name="BedrockAgentCore-Type-PaymentIntent-authorizedAmount"></a>
The amount held at authorization, for the `FUTURE` capture strategy. It is normally equal to `checkoutDetails.totalAmount`.  
Type: [PaymentIntentAmount](API_PaymentIntentAmount.md) object  
Required: No

 ** capturedAmount **   <a name="BedrockAgentCore-Type-PaymentIntent-capturedAmount"></a>
The total amount captured across all captures.  
Type: [PaymentIntentAmount](API_PaymentIntentAmount.md) object  
Required: No

 ** captures **   <a name="BedrockAgentCore-Type-PaymentIntent-captures"></a>
The captures of this payment intent, returned by `GetPaymentIntent`. The list is empty until the first capture.  
Type: Array of [Capture](API_Capture.md) objects  
Array Members: Minimum number of 0 items. Maximum number of 100 items.  
Required: No

 ** captureStrategy **   <a name="BedrockAgentCore-Type-PaymentIntent-captureStrategy"></a>
When the funds are captured. You set it when you create the payment intent. Valid values:  
+  `INSTANT` - Captures the funds when the payment intent is authorized.
+  `FUTURE` - Holds the funds when the payment intent is authorized, so that you can capture them later with `CapturePaymentIntent`.
+  `SETUP` - Saves a payment method without charging it. The service starts a Stripe-hosted Checkout Session in setup mode. Later `CapturePaymentIntent` calls charge the saved payment method off-session, one or more times, until the charges reach the total amount. Use it with the `UPTO` amount mode. Supported for Stripe payment connectors only.
Type: String  
Valid Values: `INSTANT | FUTURE | SETUP`   
Required: No

 ** partnerAuthorizationReference **   <a name="BedrockAgentCore-Type-PaymentIntent-partnerAuthorizationReference"></a>
The payment provider's authorization reference, such as the Stripe PaymentIntent ID, the PayPal authorization ID, or the Amazon Pay charge ID. It is used to capture or cancel the payment intent.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 512.  
Required: No

 ** partnerIntentReference **   <a name="BedrockAgentCore-Type-PaymentIntent-partnerIntentReference"></a>
The payment provider's reference for the payment session that `InitiatePaymentIntent` created.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 512.  
Required: No

## See Also
<a name="API_PaymentIntent_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/bedrock-agentcore-2024-02-28/PaymentIntent) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/bedrock-agentcore-2024-02-28/PaymentIntent) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/bedrock-agentcore-2024-02-28/PaymentIntent) 