Skip to content

Stripe: Capture a charge

Stripe charges.postChargesChargeCapture: arguments, response, policy and SDK examples.

← Charges operations · Get started

Operation stripe.postchargeschargecapture

Provider route: POST /v1/charges/{charge}/capture. 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["charges"]["postChargesChargeCapture"]>[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.charges.postChargesChargeCapture(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.charges.post_charges_charge_capture(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.chargestringRequired within parentMaximum length: 5000
headersobjectOptionalAdditional keys: not allowed
headers.Idempotency-KeystringOptionalMinimum length: 1
Maximum length: 255
bodyobjectOptionalAdditional keys: not allowed
body.amountintegerOptionalThe amount to capture, which must be less than or equal to the original amount.
body.application_feeintegerOptionalAn application fee to add on to this charge.
body.application_fee_amountintegerOptionalAn application fee amount to add on to this charge, which must be less than or equal to the original amount.
body.expandarrayOptionalSpecifies which fields in the response should be expanded.
body.expand[]stringEach itemMaximum length: 5000
body.receipt_emailstringOptionalThe email address to send this charge’s receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts will not be sent in test mode.
body.statement_descriptorstringOptionalFor a non-card charge, text that appears on the customer’s statement as the statement descriptor. This value overrides the account’s default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors).

For a card charge, this value is ignored unless you don’t specify a `statement_descriptor_suffix`, in which case this value is used as the suffix.
Maximum length: 22
body.statement_descriptor_suffixstringOptionalProvides information about a card charge. Concatenated to the account’s [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer’s statement. If the account has no prefix value, the suffix is concatenated to the account’s statement descriptor.
Maximum length: 22
body.transfer_dataobjectOptionalAn optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://docs.stripe.com/connect/destination-charges) for details.
body.transfer_data.amountintegerOptional
body.transfer_groupstringOptionalA string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://docs.stripe.com/connect/separate-charges-and-transfers#transfer-options) for details.

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

FieldTypePresenceDescription and constraints
$ModelRootExpand Create a charge — response body

Referenced models: Create a charge — response body

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

Create an account — response body
FieldTypePresenceDescription and constraints
$objectRootFor new integrations, we recommend using the [Accounts v2 API](/api/v2/core/accounts), in place of /v1/accounts and /v1/customers to represent a user.

This is an object representing a Stripe account. You can retrieve it to see
properties on the account like its current requirements or if the account is
enabled to make live charges or receive payouts.

For accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection)
is `application`, which includes Custom accounts, the properties below are always
returned.

For accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection)
is `stripe`, which includes Standard and Express accounts, some properties are only returned
until you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions)
to start Connect Onboarding. Learn about the [differences between accounts](/connect/accounts).
business_profileJSONOptional
business_profile (anyOf 1)JSONAlternativeBusiness information about the account.
business_profile (anyOf 1) (anyOf 1)ModelAlternativeExpand Create an account — response body — business profile Business information about the account annual revenue, estimated worker count, mcc, minority owned business designation, monthly estimated revenue, name, product description, specified commercial transactions act url, support address, support email, support phone, support url, url
business_profile (anyOf 2)nullAlternative
business_typeJSONOptional
business_type (anyOf 1)stringAlternativeThe business type.
Known values: company, government_entity, individual, non_profit
business_type (anyOf 2)nullAlternative
capabilitiesModelOptionalExpand Create an account — response body — capabilities
charges_enabledbooleanOptionalWhether the account can process charges.
companyModelOptionalExpand Create an account — response body — company
controllerModelOptionalExpand Create an account — response body — controller
countrystringOptionalThe account's country.
Maximum length: 5000
createdJSONOptional
created (anyOf 1)integerAlternativeTime at which the account was connected. Measured in seconds since the Unix epoch.
Format: unix-time
created (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
default_currencystringOptionalThree-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts).
Maximum length: 5000
details_submittedbooleanOptionalWhether account details have been submitted. Accounts with Stripe Dashboard access, which includes Standard accounts, cannot receive payouts before this is true. Accounts where this is false should be directed to [an onboarding flow](/connect/onboarding) to finish submitting account details.
emailJSONOptional
email (anyOf 1)stringAlternativeAn email address associated with the account. It's not used for authentication and Stripe doesn't market to this field without explicit approval from the platform.
Maximum length: 5000
email (anyOf 2)nullAlternative
external_accountsobjectOptionalExternal accounts (bank accounts and debit cards) currently attached to this account. External accounts are only returned for requests where `controller[is_controller]` is true.
external_accounts.dataarrayRequired within parentThe list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards.
external_accounts.data[]JSONEach item
external_accounts.data[] (anyOf 1)ModelAlternativeExpand Retrieve a bank account — response body
external_accounts.data[] (anyOf 2)ModelAlternativeExpand Retrieve a card — customers get Customers Customer Cards Id — response body
external_accounts.has_morebooleanRequired within parentTrue if this list has another page of items after this one that can be fetched.
external_accounts.objectstringRequired within parentString representing the object's type. Objects of the same type share the same value. Always has the value `list`.
Known values: list
external_accounts.urlstringRequired within parentThe URL where this list can be accessed.
Maximum length: 5000
future_requirementsModelOptionalExpand Create an account — response body — future requirements
groupsJSONOptional
groups (anyOf 1)JSONAlternativeThe groups associated with the account.
groups (anyOf 1) (anyOf 1)ModelAlternativeExpand Create an account — response body — groups The groups associated with the account payments pricing
groups (anyOf 2)nullAlternative
idstringRequired within parentUnique identifier for the object.
Maximum length: 5000
individualModelOptionalExpand Create a person — accounts post Accounts Account People — response body
metadataobjectOptionalSet of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
Additional keys: see wildcard field
metadata.*stringAdditional keysMaximum length: 500
objectstringRequired within parentString representing the object's type. Objects of the same type share the same value.
Known values: account
payouts_enabledbooleanOptionalWhether the funds in this account can be paid out.
requirementsModelOptionalExpand Create an account — response body — requirements
settingsJSONOptional
settings (anyOf 1)JSONAlternativeOptions for customizing how the account functions within Stripe.
settings (anyOf 1) (anyOf 1)ModelAlternativeExpand Create an account — response body — settings value bacs debit payments, branding, card issuing, card payments, dashboard, invoices, payments, payouts, paypay payments, sepa debit payments, treasury
settings (anyOf 2)nullAlternative
tos_acceptanceModelOptionalExpand Create an account — response body — tos acceptance
typestringOptionalThe Stripe account type. Can be `standard`, `express`, `custom`, or `none`.
Known values: custom, express, none, standard

Referenced models: Create an account — response body — business profile Business information about the account annual revenue, estimated worker count, mcc, minority owned business designation, monthly estimated revenue, name, product description, specified commercial transactions act url, support address, support email, support phone, support url, url, Create an account — response body — capabilities, Create an account — response body — future requirements, Create an account — response body — groups The groups associated with the account payments pricing, Create an account — response body — requirements, Create an account — response body — settings value bacs debit payments, branding, card issuing, card payments, dashboard, invoices, payments, payouts, paypay payments, sepa debit payments, treasury, Create an account — response body — tos acceptance, Create an account — response body — controller, Retrieve a bank account — response body, Retrieve a card — customers get Customers Customer Cards Id — response body, Create an account — response body — company, Create a person — accounts post Accounts Account People — 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
Create a charge — response body — fraud details Information on fraud assessments for the charge stripe report, user report
FieldTypePresenceDescription and constraints
$objectRoot
stripe_reportstringOptionalAssessments from Stripe. If set, the value is `fraudulent`.
Maximum length: 5000
user_reportstringOptionalAssessments reported by you. If set, possible values of are `safe` and `fraudulent`.
Maximum length: 5000
Create a charge — response body — radar options
FieldTypePresenceDescription and constraints
$objectRootOptions to configure Radar. See [Radar Session](https://docs.stripe.com/radar/radar-session) for more information.
sessionstringOptionalA [Radar Session](https://docs.stripe.com/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
Maximum length: 5000

SDK function policy ID: stripe.postchargeschargecapture. Catalog operation: PostChargesChargeCapture. 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.