[ aws . bedrock-agentcore ]

create-payment-intent

Description

Create a new payment intent.

A payment intent represents a customer’s intention to make a payment. It captures the checkout details (line items, total amount, return URL) and serves as the entry point for the traditional payment flow before a specific connector is selected.

Authentication: IAM or OAuth

See also: AWS API Documentation

Synopsis

  create-payment-intent
[--user-id <value>]
[--agent-name <value>]
--payment-manager-arn <value>
--payment-connector-id <value>
--checkout-details <value>
--capture-strategy <value>
[--client-token <value>]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
[--debug]
[--endpoint-url <value>]
[--no-verify-ssl]
[--no-paginate]
[--output <value>]
[--query <value>]
[--profile <value>]
[--region <value>]
[--version <value>]
[--color <value>]
[--no-sign-request]
[--ca-bundle <value>]
[--cli-read-timeout <value>]
[--cli-connect-timeout <value>]
[--cli-binary-format <value>]
[--no-cli-pager]
[--cli-auto-prompt]
[--no-cli-auto-prompt]
[--cli-error-format <value>]
[--help]

Options

--user-id (string)

The user ID associated with this payment intent.

Constraints:

  • min: 0
  • max: 120

--agent-name (string)

The agent name associated with this request, used for observability.

Constraints:

  • min: 0
  • max: 256

--payment-manager-arn (string) [required]

The ARN of the payment manager that owns this payment intent.

Constraints:

  • min: 66
  • max: 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}

--payment-connector-id (string) [required]

The connector used for this payment intent.

Constraints:

  • min: 12
  • max: 211
  • pattern: ([0-9a-z_][-]?){1,100}-[0-9a-z]{10}

--checkout-details (structure) [required]

The checkout details for this payment intent including line items and total amount.

lineItems -> (list)

The line items included in this payment intent. When present, the service requires the sum of amount × quantity across them, plus amountBreakdown.shipping and amountBreakdown.tax , minus amountBreakdown.discount , to equal totalAmount , or, for a SETUP intent whose totalAmount is an UPTO ceiling, not to exceed it.

Constraints:

  • min: 0
  • max: 100

(structure)

A line item in a payment intent

sku -> (string) [required]

The SKU identifier for this line item.

Constraints:

  • min: 1
  • max: 256

quantity -> (integer) [required]

The quantity of this line item. Defaults to 1 if not specified.

Constraints:

  • min: 1

amount -> (structure) [required]

The unit price of one item. The line total is amount × quantity .

value -> (string) [required]

The numeric value of the amount.

Constraints:

  • min: 1
  • max: 40
  • pattern: -?(0|[1-9][0-9]{0,17})(\.[0-9]{1,18})?

currency -> (string) [required]

The currency code for this amount.

Possible values:

  • USD
  • EUR

totalAmount -> (structure) [required]

The total amount for this payment intent.

value -> (string) [required]

The numeric value of the amount.

Constraints:

  • min: 1
  • max: 40
  • pattern: -?(0|[1-9][0-9]{0,17})(\.[0-9]{1,18})?

currency -> (string) [required]

The currency code for this amount.

Possible values:

  • USD
  • EUR

amountBreakdown -> (structure)

The shipping, tax and discount that make up totalAmount alongside the line items. Optional; absent means none of them apply.

shipping -> (structure)

The shipping charge for the order.

value -> (string) [required]

The numeric value of the amount.

Constraints:

  • min: 1
  • max: 40
  • pattern: -?(0|[1-9][0-9]{0,17})(\.[0-9]{1,18})?

currency -> (string) [required]

The currency code for this amount.

Possible values:

  • USD
  • EUR

tax -> (structure)

The tax charged on the order.

value -> (string) [required]

The numeric value of the amount.

Constraints:

  • min: 1
  • max: 40
  • pattern: -?(0|[1-9][0-9]{0,17})(\.[0-9]{1,18})?

currency -> (string) [required]

The currency code for this amount.

Possible values:

  • USD
  • EUR

discount -> (structure)

The discount applied to the order, as a positive amount that is subtracted from the total.

value -> (string) [required]

The numeric value of the amount.

Constraints:

  • min: 1
  • max: 40
  • pattern: -?(0|[1-9][0-9]{0,17})(\.[0-9]{1,18})?

currency -> (string) [required]

The currency code for this amount.

Possible values:

  • USD
  • EUR

amountMode -> (string)

How to interpret totalAmount. EXACT (default) charges totalAmount exactly. UPTO treats totalAmount as a ceiling for the save-and-reuse flow: off-session charges accumulate up to it, and the service rejects any charge that would take the total above it. Optional; absent means EXACT, so existing callers are unaffected.

Possible values:

  • EXACT
  • UPTO

returnUrl -> (string)

The URL to redirect to after payment selection.

Constraints:

  • min: 1
  • max: 2048

referenceId -> (string)

The merchant’s reference identifier. The service sends it to the payment provider. Optional.

Constraints:

  • min: 1
  • max: 127

merchant -> (structure) [required]

The merchant (payee) that receives this payment. The service copies it into the Payment Mandate payee when the buyer confirms, so the payee is trusted server state — the agent does not supply it at authorization.

name -> (string) [required]

The merchant name. The widget shows it to the buyer on the Trusted Surface.

Constraints:

  • min: 1
  • max: 256

website -> (string)

The optional website URL. The widget shows it so the buyer can confirm the payee.

Constraints:

  • min: 1
  • max: 2048

JSON Syntax:

{
  "lineItems": [
    {
      "sku": "string",
      "quantity": integer,
      "amount": {
        "value": "string",
        "currency": "USD"|"EUR"
      }
    }
    ...
  ],
  "totalAmount": {
    "value": "string",
    "currency": "USD"|"EUR"
  },
  "amountBreakdown": {
    "shipping": {
      "value": "string",
      "currency": "USD"|"EUR"
    },
    "tax": {
      "value": "string",
      "currency": "USD"|"EUR"
    },
    "discount": {
      "value": "string",
      "currency": "USD"|"EUR"
    }
  },
  "amountMode": "EXACT"|"UPTO",
  "returnUrl": "string",
  "referenceId": "string",
  "merchant": {
    "name": "string",
    "website": "string"
  }
}

--capture-strategy (string) [required]

The capture timing strategy (INSTANT | FUTURE).

Possible values:

  • INSTANT
  • FUTURE
  • SETUP

--client-token (string)

Idempotency token to ensure request uniqueness.

Constraints:

  • min: 33
  • max: 256
  • pattern: [a-zA-Z0-9](-*[a-zA-Z0-9]){0,256}

--cli-input-json | --cli-input-yaml (string) Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. Similarly, if provided yaml-input it will print a sample input YAML that can be used with --cli-input-yaml. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command. The generated JSON skeleton is not stable between versions of the AWS CLI and there are no backwards compatibility guarantees in the JSON skeleton generated.

Global Options

--debug (boolean)

Turn on debug logging.

--endpoint-url (string)

Override command’s default URL with the given URL.

--no-verify-ssl (boolean)

By default, the AWS CLI uses SSL when communicating with AWS services. For each SSL connection, the AWS CLI will verify SSL certificates. This option overrides the default behavior of verifying SSL certificates.

--no-paginate (boolean)

Disable automatic pagination. If automatic pagination is disabled, the AWS CLI will only make one call, for the first page of results.

--output (string)

The formatting style for command output.

  • json
  • text
  • table
  • yaml
  • yaml-stream
  • off

--query (string)

A JMESPath query to use in filtering the response data.

--profile (string)

Use a specific profile from your credential file.

--region (string)

The region to use. Overrides config/env settings.

--version (string)

Display the version of this tool.

--color (string)

Turn on/off color output.

  • on
  • off
  • auto

--no-sign-request (boolean)

Do not sign requests. Credentials will not be loaded if this argument is provided.

--ca-bundle (string)

The CA certificate bundle to use when verifying SSL certificates. Overrides config/env settings.

--cli-read-timeout (int)

The maximum socket read time in seconds. If the value is set to 0, the socket read will be blocking and not timeout. The default value is 60 seconds.

--cli-connect-timeout (int)

The maximum socket connect time in seconds. If the value is set to 0, the socket connect will be blocking and not timeout. The default value is 60 seconds.

--cli-binary-format (string)

The formatting style to be used for binary blobs. The default format is base64. The base64 format expects binary blobs to be provided as a base64 encoded string. The raw-in-base64-out format preserves compatibility with AWS CLI V1 behavior and binary values must be passed literally. When providing contents from a file that map to a binary blob fileb:// will always be treated as binary and use the file contents directly regardless of the cli-binary-format setting. When using file:// the file contents will need to properly formatted for the configured cli-binary-format.

  • base64
  • raw-in-base64-out

--no-cli-pager (boolean)

Disable cli pager for output.

--cli-auto-prompt (boolean)

Automatically prompt for CLI input parameters.

--no-cli-auto-prompt (boolean)

Disable automatically prompt for CLI input parameters.

--cli-error-format (string)

The formatting style for error output. By default, errors are displayed in enhanced format.

  • legacy
  • json
  • yaml
  • text
  • table
  • enhanced

--help (boolean)

Display help for the command/subcommand.

Output

paymentIntent -> (structure)

The payment intent that you created.

paymentIntentId -> (string) [required]

The unique identifier for this payment intent.

Constraints:

  • min: 30
  • max: 30
  • pattern: payment-intent-[0-9a-zA-Z-]{15}

paymentManagerArn -> (string) [required]

The ARN of the payment manager that owns this payment intent.

Constraints:

  • min: 66
  • max: 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}

version -> (integer) [required]

The immutable version represented by this response.

Constraints:

  • min: 1

buyerApprovalStatus -> (string) [required]

Buyer Approval state for the current PaymentIntent version.

Possible values:

  • BUYER_APPROVAL_REQUIRED
  • BUYER_APPROVAL_IN_PROGRESS
  • BUYER_APPROVAL_CONFIRMED
  • BUYER_APPROVAL_REJECTED
  • BUYER_APPROVAL_EXPIRED

paymentConnectorId -> (string) [required]

The single connector selected when this payment intent was created.

Constraints:

  • min: 12
  • max: 211
  • pattern: ([0-9a-z_][-]?){1,100}-[0-9a-z]{10}

checkoutDetails -> (structure) [required]

The checkout details for this payment intent.

lineItems -> (list)

The line items included in this payment intent. When present, the service requires the sum of amount × quantity across them, plus amountBreakdown.shipping and amountBreakdown.tax , minus amountBreakdown.discount , to equal totalAmount , or, for a SETUP intent whose totalAmount is an UPTO ceiling, not to exceed it.

Constraints:

  • min: 0
  • max: 100

(structure)

A line item in a payment intent

sku -> (string) [required]

The SKU identifier for this line item.

Constraints:

  • min: 1
  • max: 256

quantity -> (integer) [required]

The quantity of this line item. Defaults to 1 if not specified.

Constraints:

  • min: 1

amount -> (structure) [required]

The unit price of one item. The line total is amount × quantity .

value -> (string) [required]

The numeric value of the amount.

Constraints:

  • min: 1
  • max: 40
  • pattern: -?(0|[1-9][0-9]{0,17})(\.[0-9]{1,18})?

currency -> (string) [required]

The currency code for this amount.

Possible values:

  • USD
  • EUR

totalAmount -> (structure) [required]

The total amount for this payment intent.

value -> (string) [required]

The numeric value of the amount.

Constraints:

  • min: 1
  • max: 40
  • pattern: -?(0|[1-9][0-9]{0,17})(\.[0-9]{1,18})?

currency -> (string) [required]

The currency code for this amount.

Possible values:

  • USD
  • EUR

amountBreakdown -> (structure)

The shipping, tax and discount that make up totalAmount alongside the line items. Optional; absent means none of them apply.

shipping -> (structure)

The shipping charge for the order.

value -> (string) [required]

The numeric value of the amount.

Constraints:

  • min: 1
  • max: 40
  • pattern: -?(0|[1-9][0-9]{0,17})(\.[0-9]{1,18})?

currency -> (string) [required]

The currency code for this amount.

Possible values:

  • USD
  • EUR

tax -> (structure)

The tax charged on the order.

value -> (string) [required]

The numeric value of the amount.

Constraints:

  • min: 1
  • max: 40
  • pattern: -?(0|[1-9][0-9]{0,17})(\.[0-9]{1,18})?

currency -> (string) [required]

The currency code for this amount.

Possible values:

  • USD
  • EUR

discount -> (structure)

The discount applied to the order, as a positive amount that is subtracted from the total.

value -> (string) [required]

The numeric value of the amount.

Constraints:

  • min: 1
  • max: 40
  • pattern: -?(0|[1-9][0-9]{0,17})(\.[0-9]{1,18})?

currency -> (string) [required]

The currency code for this amount.

Possible values:

  • USD
  • EUR

amountMode -> (string)

How to interpret totalAmount. EXACT (default) charges totalAmount exactly. UPTO treats totalAmount as a ceiling for the save-and-reuse flow: off-session charges accumulate up to it, and the service rejects any charge that would take the total above it. Optional; absent means EXACT, so existing callers are unaffected.

Possible values:

  • EXACT
  • UPTO

returnUrl -> (string)

The URL to redirect to after payment selection.

Constraints:

  • min: 1
  • max: 2048

referenceId -> (string)

The merchant’s reference identifier. The service sends it to the payment provider. Optional.

Constraints:

  • min: 1
  • max: 127

merchant -> (structure) [required]

The merchant (payee) that receives this payment. The service copies it into the Payment Mandate payee when the buyer confirms, so the payee is trusted server state — the agent does not supply it at authorization.

name -> (string) [required]

The merchant name. The widget shows it to the buyer on the Trusted Surface.

Constraints:

  • min: 1
  • max: 256

website -> (string)

The optional website URL. The widget shows it so the buyer can confirm the payee.

Constraints:

  • min: 1
  • max: 2048

status -> (string) [required]

The current status of this payment intent.

Possible values:

  • CREATED
  • INITIATED
  • AUTHORIZED
  • PARTIALLY_CAPTURED
  • CAPTURED
  • FAILED
  • CANCELLED
  • SAVE_PENDING
  • SAVED
  • SAVE_FAILED
  • REAUTH_REQUIRED
  • PAYMENT_DECLINED

captureStrategy -> (string)

The capture timing strategy for this intent (INSTANT | FUTURE). Set at CreatePaymentIntent.

Possible values:

  • INSTANT
  • FUTURE
  • SETUP

authorizedAmount -> (structure)

The amount held at Authorize (for FUTURE); normally equal to checkoutDetails.totalAmount.

value -> (string) [required]

The numeric value of the amount.

Constraints:

  • min: 1
  • max: 40
  • pattern: -?(0|[1-9][0-9]{0,17})(\.[0-9]{1,18})?

currency -> (string) [required]

The currency code for this amount.

Possible values:

  • USD
  • EUR

capturedAmount -> (structure)

The cumulative amount captured across all captures (aggregate roll-up).

value -> (string) [required]

The numeric value of the amount.

Constraints:

  • min: 1
  • max: 40
  • pattern: -?(0|[1-9][0-9]{0,17})(\.[0-9]{1,18})?

currency -> (string) [required]

The currency code for this amount.

Possible values:

  • USD
  • EUR

partnerIntentReference -> (string)

The PSP session reference created by InitiatePaymentIntent.

Constraints:

  • min: 1
  • max: 512

partnerAuthorizationReference -> (string)

The provider authorization reference produced at Authorize (Stripe pi_, PayPal authorization_id, Amazon Pay chargeId). Consumed by CapturePaymentIntent and CancelPaymentIntent.

Constraints:

  • min: 1
  • max: 512

captures -> (list)

The captures created against this intent (populated on Get). Empty until first capture.

Constraints:

  • min: 0
  • max: 100

(structure)

A capture of previously-authorized funds against a payment intent. Created by CapturePaymentIntent (FUTURE) or at Authorize (INSTANT).

captureId -> (string) [required]

The AgentCore identifier for this capture.

Constraints:

  • min: 23
  • max: 23
  • pattern: capture-[0-9a-zA-Z-]{15}

captureAmount -> (structure) [required]

The amount captured.

value -> (string) [required]

The numeric value of the amount.

Constraints:

  • min: 1
  • max: 40
  • pattern: -?(0|[1-9][0-9]{0,17})(\.[0-9]{1,18})?

currency -> (string) [required]

The currency code for this amount.

Possible values:

  • USD
  • EUR

status -> (string) [required]

The status of this capture.

Possible values:

  • CAPTURE_PENDING
  • CAPTURED
  • FAILED

partnerCaptureReference -> (string)

The provider capture reference (Stripe the pi/charge, PayPal/Amazon Pay capture id).

Constraints:

  • min: 1
  • max: 512

createdAt -> (timestamp) [required]

The timestamp when this capture was created.

updatedAt -> (timestamp) [required]

The timestamp when this capture was last updated.

createdAt -> (timestamp) [required]

The timestamp when this payment intent was created.

updatedAt -> (timestamp) [required]

The timestamp when this payment intent was last updated.