Skip to content

Stripe: Delete a customer source — customers delete Customers Customer Sources Id

Stripe customers.deleteCustomersCustomerSourcesId: arguments, response, policy and SDK examples.

← Customers operations · Get started

Operation stripe.deletecustomerscustomersourcesid

Provider route: DELETE /v1/customers/{customer}/sources/{id}. 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["customers"]["deleteCustomersCustomerSourcesId"]>[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.customers.deleteCustomersCustomerSourcesId(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.customers.delete_customers_customer_sources_id(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.customerstringRequired within parentMaximum length: 5000
path.idstringRequired within parent
queryobjectOptionalAdditional keys: not allowed
query.expandarrayOptionalSpecifies which fields in the response should be expanded.
query.expand[]stringEach itemMaximum length: 5000

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

FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)ModelAlternativeExpand Get Customers Customer Sources Id — response body
$ (anyOf 2)ModelAlternativeExpand Delete an external account — accounts delete Accounts Account Bank Accounts Id — response body

Referenced models: Delete an external account — accounts delete Accounts Account Bank Accounts Id — response body, Get Customers Customer Sources Id — response body

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

Delete an external account — accounts delete Accounts Account Bank Accounts Id — response body
FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)ModelAlternativeExpand Delete an external account — accounts.deleteAccountsAccountBankAccountsId — response body — deleted: True, object: bank account
$ (anyOf 2)ModelAlternativeExpand Delete an external account — accounts.deleteAccountsAccountBankAccountsId — response body — deleted: True, object: card

Referenced models: Delete an external account — accounts.deleteAccountsAccountBankAccountsId — response body — deleted: True, object: bank account, Delete an external account — accounts.deleteAccountsAccountBankAccountsId — response body — deleted: True, object: card

Get Customers Customer Sources Id — response body
FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)ModelAlternativeExpand Create an account — response body
$ (anyOf 2)ModelAlternativeExpand Retrieve a bank account — response body
$ (anyOf 3)ModelAlternativeExpand Retrieve a card — customers get Customers Customer Cards Id — response body
$ (anyOf 4)ModelAlternativeExpand Create a source — response body

Referenced models: Create an account — response body, Retrieve a bank account — response body, Retrieve a card — customers get Customers Customer Cards Id — response body, Create a source — response body

Delete an external account — accounts.deleteAccountsAccountBankAccountsId — response body — deleted: True, object: bank account
FieldTypePresenceDescription and constraints
$objectRoot
currencyJSONOptional
currency (anyOf 1)stringAlternativeThree-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account.
Maximum length: 5000
currency (anyOf 2)nullAlternative
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: bank_account
Delete an external account — accounts.deleteAccountsAccountBankAccountsId — response body — deleted: True, object: card
FieldTypePresenceDescription and constraints
$objectRoot
currencyJSONOptional
currency (anyOf 1)stringAlternativeThree-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account.
Maximum length: 5000
currency (anyOf 2)nullAlternative
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: card
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
FieldTypePresenceDescription and constraints
$objectRoot
annual_revenueJSONOptional
annual_revenue (anyOf 1)JSONAlternativeThe applicant's gross annual revenue for its preceding fiscal year.
annual_revenue (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 annual revenue value amount, currency, fiscal year end
annual_revenue (anyOf 2)nullAlternative
estimated_worker_countJSONOptional
estimated_worker_count (anyOf 1)JSONAlternative
estimated_worker_count (anyOf 1) (anyOf 1)integerAlternativeAn estimated upper bound of employees, contractors, vendors, etc. currently working for the business.
estimated_worker_count (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
estimated_worker_count (anyOf 2)nullAlternative
mccJSONOptional
mcc (anyOf 1)stringAlternative[The merchant category code for the account](/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide.
Maximum length: 5000
mcc (anyOf 2)nullAlternative
minority_owned_business_designationJSONOptional
minority_owned_business_designation (anyOf 1)arrayAlternativeWhether the business is a minority-owned, women-owned, and/or LGBTQI+ -owned business.
minority_owned_business_designation (anyOf 1)[]stringEach itemKnown values: lgbtqi_owned_business, minority_owned_business, none_of_these_apply, prefer_not_to_answer, women_owned_business
minority_owned_business_designation (anyOf 2)nullAlternative
monthly_estimated_revenueModelOptionalExpand 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 monthly estimated revenue
nameJSONOptional
name (anyOf 1)stringAlternativeThe customer-facing business name.
Maximum length: 5000
name (anyOf 2)nullAlternative
product_descriptionJSONOptional
product_description (anyOf 1)stringAlternativeInternal-only description of the product sold or service provided by the business. It's used by Stripe for risk and underwriting purposes.
Maximum length: 40000
product_description (anyOf 2)nullAlternative
specified_commercial_transactions_act_urlJSONOptional
specified_commercial_transactions_act_url (anyOf 1)stringAlternativeA link to the business's publicly available terms related to the Specified Commercial Transaction Act. Only used for accounts in Japan.
Maximum length: 5000
specified_commercial_transactions_act_url (anyOf 2)nullAlternative
support_addressJSONOptional
support_address (anyOf 1)JSONAlternativeA publicly available mailing address for sending support issues to.
support_address (anyOf 1) (anyOf 1)ModelAlternativeExpand Create a Location — response body — address
support_address (anyOf 2)nullAlternative
support_emailJSONOptional
support_email (anyOf 1)stringAlternativeA publicly available email address for sending support issues to.
Maximum length: 5000
support_email (anyOf 2)nullAlternative
support_phoneJSONOptional
support_phone (anyOf 1)stringAlternativeA publicly available phone number to call with support issues.
Maximum length: 5000
support_phone (anyOf 2)nullAlternative
support_urlJSONOptional
support_url (anyOf 1)stringAlternativeA publicly available website for handling support issues.
Maximum length: 5000
support_url (anyOf 2)nullAlternative
urlJSONOptional
url (anyOf 1)stringAlternativeThe business's publicly available website.
Maximum length: 5000
url (anyOf 2)nullAlternative

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 annual revenue value amount, currency, fiscal year end, 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 monthly estimated revenue, Create a Location — response body — address

Create an account — response body — groups The groups associated with the account payments pricing
FieldTypePresenceDescription and constraints
$objectRoot
payments_pricingJSONOptional
payments_pricing (anyOf 1)stringAlternativeThe group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://docs.stripe.com/connect/platform-pricing-tools) for details.
Maximum length: 5000
payments_pricing (anyOf 2)nullAlternative

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