Skip to content

Stripe: Confirm a Payment Intent

Stripe paymentIntents.postPaymentIntentsIntentConfirm: arguments, response, policy and SDK examples.

← Payment intents operations · Get started

Operation stripe.postpaymentintentsintentconfirm

Provider route: POST /v1/payment_intents/{intent}/confirm. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/stripe with npm, or alter-sdk-stripe with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { StripeIntegration } from "@alter-ai/stripe";
async function execute(input: Parameters<StripeIntegration["paymentIntents"]["postPaymentIntentsIntentConfirm"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new StripeIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.paymentIntents.postPaymentIntentsIntentConfirm(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_stripe import StripeIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = StripeIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.payment_intents.post_payment_intents_intent_confirm(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.intentstringRequired within parentMaximum length: 5000
headersobjectOptionalAdditional keys: not allowed
headers.Idempotency-KeystringOptionalMinimum length: 1
Maximum length: 255
bodyobjectOptionalAdditional keys: not allowed
body.allowed_payment_method_typesarrayOptionalThe list of payment method types allowed for use with this payment. Stripe automatically returns compatible payment methods from this list in the `payment_method_types` field of the response, based on the other PaymentIntent parameters, such as `currency`, `amount`, and `customer`.
body.allowed_payment_method_types[]stringEach itemOne of: acss_debit, affirm, afterpay_clearpay, alipay, alma, amazon_pay, au_becs_debit, bacs_debit, bancontact, billie, bizum, blik, boku_promptpay, boleto, capchase_pay, card, card_present, cashapp, check_scan, click_to_pay, crypto, customer_balance, demo_pay, duitnow, dummy_auth_push, dummy_passthrough_card, edenred, eps, fpx, gcash, getbalance, gift_card, giropay, gopay, grabpay, id_bank_transfer, ideal, interac_present, kakao_pay, klarna, knet, konbini, kr_card, kr_market, kriya, link, mb_way, mobilepay, momo, mondu, multibanco, naver_pay, netbanking, ng_bank, ng_bank_transfer, ng_card, ng_market, ng_ussd, ng_wallet, nz_bank_account, octopus, oxxo, p24, paper_check, pay_by_bank, payco, paynow, paypal, paypay, payto, pix, promptpay, qris, rechnung, revolut_pay, samsung_pay, satispay, scalapay, sepa_debit, sequra, shop_pay, shopeepay, sofort, south_korea_market, stripe_balance, sunbit, swish, tamara, test_pay, touch_n_go, truemoney, twint, upi, us_bank_account, us_cash_voucher, vipps, wechat_pay, wero, zip
body.amount_detailsJSONOptionalProvides industry-specific information about the amount.
body.amount_details (anyOf 1)ModelAlternativeExpand Update a Payment Intent — request body — body amount details discount amount, enforce arithmetic validation, line items, shipping, tax
body.amount_details (anyOf 2)stringAlternativeOne of:
body.amount_to_confirmintegerOptionalAmount to confirm on the PaymentIntent. Defaults to `amount` if not provided.
body.capture_methodstringOptionalControls when the funds will be captured from the customer’s account.
One of: automatic, automatic_async, manual
body.client_secretstringOptionalThe client secret of the PaymentIntent.
Maximum length: 5000
body.confirmation_tokenstringOptionalID of the ConfirmationToken used to confirm this PaymentIntent.

If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence.
Maximum length: 5000
body.error_on_requires_actionbooleanOptionalSet to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://docs.stripe.com/payments/save-card-without-authentication).
body.excluded_payment_method_typesJSONOptionalThe list of payment method types to exclude from use with this payment.
body.excluded_payment_method_types (anyOf 1)arrayAlternative
body.excluded_payment_method_types (anyOf 1)[]stringEach itemOne of: acss_debit, affirm, afterpay_clearpay, alipay, alma, amazon_pay, au_becs_debit, bacs_debit, bancontact, billie, bizum, blik, boleto, card, cashapp, crypto, customer_balance, eps, fpx, giropay, grabpay, ideal, kakao_pay, klarna, konbini, kr_card, mb_way, mobilepay, multibanco, naver_pay, nz_bank_account, oxxo, p24, pay_by_bank, payco, paynow, paypal, paypay, payto, pix, promptpay, revolut_pay, samsung_pay, satispay, scalapay, sepa_debit, sequra, sofort, sunbit, swish, twint, upi, us_bank_account, wechat_pay, zip
body.excluded_payment_method_types (anyOf 2)stringAlternativeOne of:
body.expandarrayOptionalSpecifies which fields in the response should be expanded.
body.expand[]stringEach itemMaximum length: 5000
body.hooksobjectOptionalAutomations to be run during the PaymentIntent lifecycle
body.hooks.inputsobjectOptional
body.hooks.inputs.taxobjectOptional
body.hooks.inputs.tax.calculationJSONRequired within parent
body.hooks.inputs.tax.calculation (anyOf 1)stringAlternativeMaximum length: 5000
body.hooks.inputs.tax.calculation (anyOf 2)stringAlternativeOne of:
body.mandatestringOptionalID of the mandate that’s used for this payment.
Maximum length: 5000
body.mandate_dataJSONOptional
body.mandate_data (anyOf 1)ModelAlternativeExpand Create a Setup Intent — request body — body mandate data customer acceptance
body.mandate_data (anyOf 2)stringAlternativeOne of:
body.mandate_data (anyOf 3)objectAlternativeThis hash contains details about the Mandate to create
body.mandate_data (anyOf 3).customer_acceptanceobjectRequired within parent
body.mandate_data (anyOf 3).customer_acceptance.onlineobjectRequired within parent
body.mandate_data (anyOf 3).customer_acceptance.online.ip_addressstringOptional
body.mandate_data (anyOf 3).customer_acceptance.online.user_agentstringOptionalMaximum length: 5000
body.mandate_data (anyOf 3).customer_acceptance.typestringRequired within parentOne of: online
Maximum length: 5000
body.off_sessionJSONOptionalSet to `true` to indicate that the customer isn’t in your checkout flow during this payment attempt and can’t authenticate. Use this parameter in scenarios where you collect payment method details and [charge them later](https://docs.stripe.com/payments/save-during-payment).
body.off_session (anyOf 1)booleanAlternative
body.off_session (anyOf 2)stringAlternativeOne of: one_off, recurring
Maximum length: 5000
body.payment_detailsJSONOptionalProvides industry-specific information about the charge.
body.payment_details (anyOf 1)objectAlternative
body.payment_details (anyOf 1).customer_referenceJSONOptional
body.payment_details (anyOf 1).customer_reference (anyOf 1)stringAlternativeMaximum length: 5000
body.payment_details (anyOf 1).customer_reference (anyOf 2)stringAlternativeOne of:
body.payment_details (anyOf 1).order_referenceJSONOptional
body.payment_details (anyOf 1).order_reference (anyOf 1)stringAlternativeMaximum length: 5000
body.payment_details (anyOf 1).order_reference (anyOf 2)stringAlternativeOne of:
body.payment_details (anyOf 2)stringAlternativeOne of:
body.payment_methodstringOptionalID of the payment method (a PaymentMethod, Card, or [compatible Source](https://docs.stripe.com/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent.
If the payment method is attached to a Customer, it must match the [customer](https://docs.stripe.com/api#create_payment_intent-customer) that is set on this PaymentIntent.
Maximum length: 5000
body.payment_method_dataModelOptionalExpand Create a Payment Intent — request body — body payment method data
body.payment_method_optionsModelOptionalExpand Create a Payment Intent — request body — body payment method options
body.radar_optionsobjectOptionalOptions to configure Radar. Learn more about [Radar Sessions](https://docs.stripe.com/radar/radar-session).
body.radar_options.referrerJSONOptional
body.radar_options.referrer (anyOf 1)stringAlternativeMaximum length: 5000
body.radar_options.referrer (anyOf 2)stringAlternativeOne of:
body.radar_options.sessionstringOptionalMaximum length: 5000
body.receipt_emailJSONOptionalEmail address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).
body.receipt_email (anyOf 1)stringAlternative
body.receipt_email (anyOf 2)stringAlternativeOne of:
body.return_urlstringOptionalThe URL to redirect your customer back to after they authenticate or cancel their payment on the payment method’s app or site.
If you’d prefer to redirect to a mobile application, you can alternatively supply an application URI scheme.
This parameter is only used for cards and other redirect-based payment methods.
body.setup_future_usagestringOptionalIndicates that you intend to make future payments with this PaymentIntent’s payment method.

If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don’t provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.

If the payment method is `card_present` and isn’t a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.

When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).

If you’ve already set `setup_future_usage` and you’re performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
One of: , off_session, on_session
body.shippingJSONOptionalShipping information for this PaymentIntent.
body.shipping (anyOf 1)ModelAlternativeExpand Update a Payment Intent — request body — body shipping address, carrier, name, phone, tracking number
body.shipping (anyOf 2)stringAlternativeOne of:
body.use_stripe_sdkbooleanOptionalSet to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions.

Referenced models: Update a Payment Intent — request body — body amount details discount amount, enforce arithmetic validation, line items, shipping, tax, Create a Setup Intent — request body — body mandate data customer acceptance, Create a Payment Intent — request body — body payment method data, Create a Payment Intent — request body — body payment method options, Update a Payment Intent — request body — body shipping address, carrier, name, phone, tracking number

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Cancel a Payment Intent — response body

Referenced models: Cancel a Payment Intent — response body

725 more schemas are linked from the tables above, on the schema pages.

Update a Payment Intent — request body — body amount details discount amount, enforce arithmetic validation, line items, shipping, tax
FieldTypePresenceDescription and constraints
$objectRoot
discount_amountJSONOptional
discount_amount (anyOf 1)integerAlternative
discount_amount (anyOf 2)stringAlternativeOne of:
enforce_arithmetic_validationbooleanOptional
line_itemsJSONOptional
line_items (anyOf 1)arrayAlternative
line_items (anyOf 1)[]ModelEach itemExpand Create a Payment Intent — request body — body amount details line items array item
line_items (anyOf 2)stringAlternativeOne of:
shippingJSONOptional
shipping (anyOf 1)objectAlternative
shipping (anyOf 1).amountJSONOptional
shipping (anyOf 1).amount (anyOf 1)integerAlternative
shipping (anyOf 1).amount (anyOf 2)stringAlternativeOne of:
shipping (anyOf 1).from_postal_codeJSONOptional
shipping (anyOf 1).from_postal_code (anyOf 1)stringAlternativeMaximum length: 10
shipping (anyOf 1).from_postal_code (anyOf 2)stringAlternativeOne of:
shipping (anyOf 1).to_postal_codeJSONOptional
shipping (anyOf 1).to_postal_code (anyOf 1)stringAlternativeMaximum length: 10
shipping (anyOf 1).to_postal_code (anyOf 2)stringAlternativeOne of:
shipping (anyOf 2)stringAlternativeOne of:
taxJSONOptional
tax (anyOf 1)objectAlternative
tax (anyOf 1).total_tax_amountintegerRequired within parent
tax (anyOf 2)stringAlternativeOne of:

Referenced models: Create a Payment Intent — request body — body amount details line items array item

Create a Setup Intent — request body — body mandate data customer acceptance
FieldTypePresenceDescription and constraints
$objectRoot
customer_acceptanceobjectRequired within parent
customer_acceptance.accepted_atintegerOptionalFormat: unix-time
customer_acceptance.offlineobjectOptional
customer_acceptance.onlineobjectOptional
customer_acceptance.online.ip_addressstringRequired within parent
customer_acceptance.online.user_agentstringRequired within parentMaximum length: 5000
customer_acceptance.typestringRequired within parentOne of: offline, online
Maximum length: 5000
Update a Payment Intent — request body — body shipping address, carrier, name, phone, tracking number
FieldTypePresenceDescription and constraints
$objectRoot
addressobjectRequired within parent
address.citystringOptionalMaximum length: 5000
address.countrystringOptionalMaximum length: 5000
address.line1stringOptionalMaximum length: 5000
address.line2stringOptionalMaximum length: 5000
address.postal_codestringOptionalMaximum length: 5000
address.statestringOptionalMaximum length: 5000
carrierstringOptionalMaximum length: 5000
namestringRequired within parentMaximum length: 5000
phonestringOptionalMaximum length: 5000
tracking_numberstringOptionalMaximum length: 5000
Cancel a SetupIntent — response body — last_setup_error / value / type: api error, card error, idempotency error, invalid request error
FieldTypePresenceDescription and constraints
$objectRoot
advice_codestringOptionalFor card errors resulting from a card issuer decline, a short string indicating [how to proceed with an error](https://docs.stripe.com/declines/card#retrying-issuer-declines) if they provide one.
Maximum length: 5000
chargestringOptionalFor card errors, the ID of the failed charge.
Maximum length: 5000
codestringOptionalFor some errors that could be handled programmatically, a short string indicating the [error code](https://docs.stripe.com/error-codes) reported.
Maximum length: 5000
decline_codestringOptionalFor card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://docs.stripe.com/declines#issuer-declines) if they provide one.
Maximum length: 5000
doc_urlstringOptionalA URL to more information about the [error code](https://docs.stripe.com/error-codes) reported.
Maximum length: 5000
messagestringOptionalA human-readable message providing more details about the error. For card errors, these messages can be shown to your users.
Maximum length: 40000
network_advice_codestringOptionalFor card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error.
Maximum length: 5000
network_decline_codestringOptionalFor payments declined by the network, an alphanumeric code which indicates the reason the payment failed.
Maximum length: 5000
paramstringOptionalIf the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field.
Maximum length: 5000
payment_intentModelOptionalExpand Cancel a Payment Intent — response body
payment_methodModelOptionalExpand Create a Payment Method — response body
payment_method_typestringOptionalIf the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors.
Maximum length: 5000
request_log_urlstringOptionalA URL to the request log entry in your dashboard.
Maximum length: 5000
setup_intentModelOptionalExpand Cancel a Setup Intent — response body
sourceJSONOptionalThe [source object](https://docs.stripe.com/api/sources/object) for errors returned on a request involving a source.
source (anyOf 1)ModelAlternativeExpand Retrieve a bank account — response body
source (anyOf 2)ModelAlternativeExpand Retrieve a card — customers get Customers Customer Cards Id — response body
source (anyOf 3)ModelAlternativeExpand Create a source — response body
typestringRequired within parentThe type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error`
Known values: api_error, card_error, idempotency_error, invalid_request_error

Referenced models: Retrieve a bank account — response body, Retrieve a card — customers get Customers Customer Cards Id — response body, Cancel a Payment Intent — response body, Create a Payment Method — response body, Cancel a Setup Intent — response body, Create a source — response body

PostApplicationFeesIdRefund — response body — application / object: application
FieldTypePresenceDescription and constraints
$objectRoot
idstringRequired within parentUnique identifier for the object.
Maximum length: 5000
nameJSONOptional
name (anyOf 1)stringAlternativeThe name of the application.
Maximum length: 5000
name (anyOf 2)nullAlternative
objectstringRequired within parentString representing the object's type. Objects of the same type share the same value.
Known values: application
Delete a customer — response body
FieldTypePresenceDescription and constraints
$objectRoot
deletedbooleanRequired within parentAlways true for a deleted object
Known values: True
idstringRequired within parentUnique identifier for the object.
Maximum length: 5000
objectstringRequired within parentString representing the object's type. Objects of the same type share the same value.
Known values: customer
Cancel a Payment Intent — response body — amount details tip
FieldTypePresenceDescription and constraints
$objectRoot
tipModelOptionalExpand Cancel a Payment Intent — response body — amount details tip tip

Referenced models: Cancel a Payment Intent — response body — amount details tip tip

Cancel a Payment Intent — response body — hooks
FieldTypePresenceDescription and constraints
$objectRoot
inputsModelOptionalExpand Cancel a Payment Intent — response body — hooks inputs

Referenced models: Cancel a Payment Intent — response body — hooks inputs

SDK function policy ID: stripe.postpaymentintentsintentconfirm. Catalog operation: PostPaymentIntentsIntentConfirm. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Pinned headers: {"Stripe-Version": "2026-09-30.endive"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.