Accept payments for agentic commerce
With a payment service provider connector, your agent’s checkout can accept payments from buyers through your own account with a wallet or payment service provider, such as Amazon Pay, Stripe, or PayPal. Funds move from the buyer to you through your payment service provider, outside AWS. Unlike a stablecoin wallet payment, a payment for agentic commerce uses a payment intent. The buyer approves the payment intent, and then completes checkout with the payment service provider on your web page.
Compared with calling each payment service provider directly, AgentCore payments adds the following:
-
One payment intent API for Amazon Pay, Stripe, and PayPal, with the same statuses for each provider.
-
A buyer approval step. The buyer approves the exact merchant, line items, and total in a widget that AgentCore payments hosts, and checkout can’t start until the approval is confirmed. Buyer approval fixes the terms, but it doesn’t authenticate the buyer. For more information, see What buyer approval covers.
-
Credential storage in AgentCore Identity, so your agent and your code don’t hold your payment service provider credentials.
-
Permissions that separate your agent from the operations that move money.
AgentCore payments supports the following payment service providers:
-
Amazon Pay: the buyer pays with their Amazon account. AgentCore payments signs Amazon Pay calls as your Solution Provider.
-
Stripe: the buyer pays by card in the Stripe Payment Element. AgentCore payments uses your Stripe restricted key.
-
PayPal: the buyer pays with PayPal. AgentCore payments uses your PayPal REST app credentials.
Payment intent flow
Every agentic commerce payment follows the same steps. Your agent’s tools create the payment intent. Your merchant backend, which the agent never calls, gets buyer approval, starts checkout, and moves money. For the recommended permissions, see Agentic commerce payment permissions.
-
Set up a payment auth and connector for your payment service provider. You do this once for each payment service provider account.
-
Create a payment intent with the connector, the checkout details, and the capture strategy. The status is
CREATED. -
Get buyer approval in the buyer approval widget.
-
Complete checkout with your payment service provider.
InitiatePaymentIntentstarts the payment service provider checkout, and the buyer pays on your page. The status isINITIATED. -
Authorize, capture, or cancel the payment. The status ends in
CAPTUREDorCANCELLED, or inFAILEDafter a decline.
To save a Stripe payment method and charge it later, see Save a payment method for later charges.
Capture strategies
The capture strategy sets when the buyer’s funds are collected, and when the buyer must be present. Each strategy belongs to a purchase mode:
-
INSTANT: human present at payment. Charge now.AuthorizePaymentIntentends inCAPTURED. -
FUTURE: human present at payment. Authorize now, and capture later withCapturePaymentIntent.AuthorizePaymentIntentends inAUTHORIZED, andCapturePaymentIntentends inCAPTURED. -
SETUP: pre-approved purchase. The buyer is present to approve and save a payment method. You charge it later without the buyer present. Stripe only. This flow skipsAuthorizePaymentIntent.
Regions and currencies
Payment service provider connectors are available in US East (N. Virginia), US East (Ohio), US West (Oregon), Europe (Ireland), and Europe (Paris). For the list of Regions for each feature, see Supported AWS Regions. The Amazon Pay region of your merchant account doesn’t depend on the AWS Region that you call.
Payment intents support USD and EUR. Your payment service provider account must also accept the currency. Otherwise, InitiatePaymentIntent returns the payment service provider’s error. Amazon Pay charges in the ledger currency of your merchant account, so EUR needs an Amazon Pay merchant account in the EU region. Events such as refunds and disputes go from your payment service provider to your own webhook. AgentCore payments doesn’t relay them.