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.
Call through Alter
Section titled “Call through Alter”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 osfrom alter_sdk import Appfrom 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()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.customer | string | Required within parent | Maximum length: 5000 |
path.id | string | Required within parent | |
query | object | Optional | Additional keys: not allowed |
query.expand | array | Optional | Specifies which fields in the response should be expanded. |
query.expand[] | string | Each item | Maximum length: 5000 |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (anyOf 1) | Model | Alternative | Expand Get Customers Customer Sources Id — response body |
$ (anyOf 2) | Model | Alternative | Expand 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
Schemas
Section titled “Schemas”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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (anyOf 1) | Model | Alternative | Expand Delete an external account — accounts.deleteAccountsAccountBankAccountsId — response body — deleted: True, object: bank account |
$ (anyOf 2) | Model | Alternative | Expand 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (anyOf 1) | Model | Alternative | Expand Create an account — response body |
$ (anyOf 2) | Model | Alternative | Expand Retrieve a bank account — response body |
$ (anyOf 3) | Model | Alternative | Expand Retrieve a card — customers get Customers Customer Cards Id — response body |
$ (anyOf 4) | Model | Alternative | Expand 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
currency | JSON | Optional | |
currency (anyOf 1) | string | Alternative | Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. Maximum length: 5000 |
currency (anyOf 2) | null | Alternative | |
deleted | boolean | Required within parent | Always true for a deleted object Known values: True |
id | string | Required within parent | Unique identifier for the object. Maximum length: 5000 |
object | string | Required within parent | String 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
currency | JSON | Optional | |
currency (anyOf 1) | string | Alternative | Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. Maximum length: 5000 |
currency (anyOf 2) | null | Alternative | |
deleted | boolean | Required within parent | Always true for a deleted object Known values: True |
id | string | Required within parent | Unique identifier for the object. Maximum length: 5000 |
object | string | Required within parent | String 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
annual_revenue | JSON | Optional | |
annual_revenue (anyOf 1) | JSON | Alternative | The applicant's gross annual revenue for its preceding fiscal year. |
annual_revenue (anyOf 1) (anyOf 1) | Model | Alternative | Expand 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) | null | Alternative | |
estimated_worker_count | JSON | Optional | |
estimated_worker_count (anyOf 1) | JSON | Alternative | |
estimated_worker_count (anyOf 1) (anyOf 1) | integer | Alternative | An estimated upper bound of employees, contractors, vendors, etc. currently working for the business. |
estimated_worker_count (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
estimated_worker_count (anyOf 2) | null | Alternative | |
mcc | JSON | Optional | |
mcc (anyOf 1) | string | Alternative | [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) | null | Alternative | |
minority_owned_business_designation | JSON | Optional | |
minority_owned_business_designation (anyOf 1) | array | Alternative | Whether the business is a minority-owned, women-owned, and/or LGBTQI+ -owned business. |
minority_owned_business_designation (anyOf 1)[] | string | Each item | Known values: lgbtqi_owned_business, minority_owned_business, none_of_these_apply, prefer_not_to_answer, women_owned_business |
minority_owned_business_designation (anyOf 2) | null | Alternative | |
monthly_estimated_revenue | Model | Optional | Expand 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 |
name | JSON | Optional | |
name (anyOf 1) | string | Alternative | The customer-facing business name. Maximum length: 5000 |
name (anyOf 2) | null | Alternative | |
product_description | JSON | Optional | |
product_description (anyOf 1) | string | Alternative | Internal-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) | null | Alternative | |
specified_commercial_transactions_act_url | JSON | Optional | |
specified_commercial_transactions_act_url (anyOf 1) | string | Alternative | A 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) | null | Alternative | |
support_address | JSON | Optional | |
support_address (anyOf 1) | JSON | Alternative | A publicly available mailing address for sending support issues to. |
support_address (anyOf 1) (anyOf 1) | Model | Alternative | Expand Create a Location — response body — address |
support_address (anyOf 2) | null | Alternative | |
support_email | JSON | Optional | |
support_email (anyOf 1) | string | Alternative | A publicly available email address for sending support issues to. Maximum length: 5000 |
support_email (anyOf 2) | null | Alternative | |
support_phone | JSON | Optional | |
support_phone (anyOf 1) | string | Alternative | A publicly available phone number to call with support issues. Maximum length: 5000 |
support_phone (anyOf 2) | null | Alternative | |
support_url | JSON | Optional | |
support_url (anyOf 1) | string | Alternative | A publicly available website for handling support issues. Maximum length: 5000 |
support_url (anyOf 2) | null | Alternative | |
url | JSON | Optional | |
url (anyOf 1) | string | Alternative | The business's publicly available website. Maximum length: 5000 |
url (anyOf 2) | null | Alternative |
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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
payments_pricing | JSON | Optional | |
payments_pricing (anyOf 1) | string | Alternative | The 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) | null | Alternative |
Policy, approvals and errors
Section titled “Policy, approvals and errors”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"}