Search + K

Command Palette

Search for a command to run...

Sign In

Delete a customer discount

DELETE /v1/customers/{customer}/discount
Copy endpoint
https://api.stripe.com/

Parameters

path Path Parameters

Name Type
customer required
string

Request Body

application/x-www-form-urlencoded
{}

Responses

200 application/json

Successful response.

interface DeletedDiscount {
checkout_session?: string | null;
customer?: Customer

This object represents a customer of your business. Use it to create recurring charges, save payment and contact information, and track payments that belong to the same customer.

interface Customer {
address?: Address | null;
balance?: number;
business_name?: string;
cash_balance?: CashBalance | null;
created: number;
currency?: string | null;
customer_account?: string | null;
default_source?: BankAccount | Card | Source | string | null;
delinquent?: boolean | null;
description?: string | null;
discount?: Discount | null;
email?: string | null;
id: string;
individual_name?: string;
invoice_credit_balance?: { };
invoice_prefix?: string | null;
invoice_settings?: InvoiceSettingCustomerSetting;
livemode: boolean;
metadata?: { };
name?: string | null;
next_invoice_sequence?: number;
object: "customer";
phone?: string | null;
preferred_locales?: string[] | null;
shipping?: Shipping | null;
sources?: {
data: (BankAccount | Card | Source)[];
has_more: boolean;
object: "list";
url: string;
}
;
subscriptions?: {
data: Subscription[];
has_more: boolean;
object: "list";
url: string;
}
;
tax?: CustomerTax;
tax_exempt?: "exempt" | "none" | "reverse" | null;
tax_ids?: {
data: TaxId[];
has_more: boolean;
object: "list";
url: string;
}
;
test_clock?: TestHelpersTestClock | string | null;
}
| DeletedCustomer
interface DeletedCustomer {
deleted: true;
id: string;
object: "customer";
}
| string | null
;
customer_account?: string | null;
deleted: true;
id: string;
invoice?: string | null;
invoice_item?: string | null;
object: "discount";
promotion_code?: PromotionCode

A Promotion Code represents a customer-redeemable code for an underlying promotion. You can create multiple codes for a single promotion.

If you enable promotion codes in your customer portal configuration, then customers can redeem a code themselves when updating a subscription in the portal. Customers can also view the currently active promotion codes and coupons on each of their subscriptions in the portal.

interface PromotionCode {
active: boolean;
code: string;
created: number;
customer?: Customer | DeletedCustomer | string | null;
customer_account?: string | null;
expires_at?: number | null;
id: string;
livemode: boolean;
max_redemptions?: number | null;
metadata?: { } | null;
object: "promotion_code";
promotion: PromotionCodesResourcePromotion;
restrictions: PromotionCodesResourceRestrictions;
times_redeemed: number;
}
| string | null
;
source: DiscountSource
interface DiscountSource {
coupon?: Coupon | string | null;
type: "coupon";
}
;
start: number;
subscription?: string | null;
subscription_item?: string | null;
}
default application/json

Error response.

interface Error {
error: ApiErrors
interface ApiErrors {
advice_code?: string;
charge?: string;
code?: string;
decline_code?: string;
doc_url?: string;
message?: string;
network_advice_code?: string;
network_decline_code?: string;
param?: string;
payment_intent?: PaymentIntent;
payment_method?: PaymentMethod;
payment_method_type?: string;
request_log_url?: string;
setup_intent?: SetupIntent;
source?: BankAccount | Card | Source;
type: "api_error" | "card_error" | "idempotency_error" | "invalid_request_error";
}
;
}