Shippingrates 4 endpoints

GET /v1/shipping_rates

Returns a list of your shipping rates.

operationId: GetShippingRates

Parameters

Name In Required Type Description
active query optional boolean

Only return shipping rates that are active or inactive.

created query optional

A filter on the list, based on the object created field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.

currency query optional string

Only return shipping rates for the given currency.

ending_before query optional string

A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.

expand query optional array

Specifies which fields in the response should be expanded.

limit query optional integer

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

starting_after query optional string

A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.

Request Body

application/x-www-form-urlencoded

Responses

default

Error response.

200

Successful response.

GET /v1/shipping_rates
POST /v1/shipping_rates

Creates a new shipping rate object.

operationId: PostShippingRates

Request Body

required
application/x-www-form-urlencoded
Property Type Required
type string optional
expand array optional
metadata object optional
tax_code string optional
display_name string required
fixed_amount object optional
amount integer required
currency string required
currency_options object optional
tax_behavior string optional
delivery_estimate object optional
maximum object optional
unit string required
value integer required
minimum object optional
unit string required
value integer required

Responses

default

Error response.

200

Successful response.

POST /v1/shipping_rates
GET /v1/shipping_rates/{shipping_rate_token}

Returns the shipping rate object with the given ID.

operationId: GetShippingRatesShippingRateToken

Parameters

Name In Required Type Description
expand query optional array

Specifies which fields in the response should be expanded.

shipping_rate_token path required string

Request Body

application/x-www-form-urlencoded

Responses

default

Error response.

200

Successful response.

GET /v1/shipping_rates/{shipping_rate_token}
POST /v1/shipping_rates/{shipping_rate_token}

Updates an existing shipping rate object.

operationId: PostShippingRatesShippingRateToken

Parameters

Name In Required Type Description
shipping_rate_token path required string

Request Body

application/x-www-form-urlencoded
Property Type Required
active boolean optional
expand array optional
metadata object optional
fixed_amount object optional
currency_options object optional
tax_behavior string optional

Responses

default

Error response.

200

Successful response.

POST /v1/shipping_rates/{shipping_rate_token}

Sigma 3 endpoints

POST /v1/sigma/saved_queries/{id}

Update an existing Sigma query that previously exists

operationId: PostSigmaSavedQueriesId

Parameters

Name In Required Type Description
id path required string

The id of the saved query to update. This should be a valid id that was previously created.

Request Body

application/x-www-form-urlencoded
Property Type Required
sql string optional
name string optional
expand array optional

Responses

default

Error response.

200

Successful response.

POST /v1/sigma/saved_queries/{id}
GET /v1/sigma/scheduled_query_runs

Returns a list of scheduled query runs.

operationId: GetSigmaScheduledQueryRuns

Parameters

Name In Required Type Description
ending_before query optional string

A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.

expand query optional array

Specifies which fields in the response should be expanded.

limit query optional integer

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

starting_after query optional string

A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.

Request Body

application/x-www-form-urlencoded

Responses

default

Error response.

200

Successful response.

GET /v1/sigma/scheduled_query_runs
GET /v1/sigma/scheduled_query_runs/{scheduled_query_run}

Retrieves the details of an scheduled query run.

operationId: GetSigmaScheduledQueryRunsScheduledQueryRun

Parameters

Name In Required Type Description
expand query optional array

Specifies which fields in the response should be expanded.

scheduled_query_run path required string

Request Body

application/x-www-form-urlencoded

Responses

default

Error response.

200

Successful response.

GET /v1/sigma/scheduled_query_runs/{scheduled_query_run}

Sources 7 endpoints

POST /v1/sources

Creates a new source object.

operationId: PostSources

Request Body

application/x-www-form-urlencoded
Property Type Required
flow string optional
type string optional
owner object optional
name string optional
email string optional
phone string optional
address object optional
city string optional
line1 string optional
line2 string optional
state string optional
country string optional
postal_code string optional
token string optional
usage string optional
amount integer optional
expand array optional
mandate object optional
amount object optional
currency string optional
interval string optional
acceptance object optional
ip string optional
date integer optional
type string optional
online object optional
ip string optional
date integer optional
user_agent string optional
status string required
offline object optional
contact_email string required
user_agent string optional
notification_method string optional
currency string optional
customer string optional
metadata object optional
receiver object optional
refund_attributes_method string optional
redirect object optional
return_url string required
source_order object optional
items array optional
type string optional
amount integer optional
parent string optional
currency string optional
quantity integer optional
description string optional
shipping object optional
name string optional
phone string optional
address object required
city string optional
line1 string required
line2 string optional
state string optional
country string optional
postal_code string optional
carrier string optional
tracking_number string optional
original_source string optional
statement_descriptor string optional

Responses

default

Error response.

200

Successful response.

POST /v1/sources
GET /v1/sources/{source}

Retrieves an existing source object. Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information.

operationId: GetSourcesSource

Parameters

Name In Required Type Description
client_secret query optional string

The client secret of the source. Required if a publishable key is used to retrieve the source.

expand query optional array

Specifies which fields in the response should be expanded.

source path required string

Request Body

application/x-www-form-urlencoded

Responses

default

Error response.

200

Successful response.

GET /v1/sources/{source}
POST /v1/sources/{source}

Updates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

This request accepts the metadata and owner as arguments. It is also possible to update type specific information for selected payment methods. Please refer to our payment method guides for more detail.

operationId: PostSourcesSource

Parameters

Name In Required Type Description
source path required string

Request Body

application/x-www-form-urlencoded
Property Type Required
owner object optional
name string optional
email string optional
phone string optional
address object optional
city string optional
line1 string optional
line2 string optional
state string optional
country string optional
postal_code string optional
amount integer optional
expand array optional
mandate object optional
amount object optional
currency string optional
interval string optional
acceptance object optional
ip string optional
date integer optional
type string optional
online object optional
ip string optional
date integer optional
user_agent string optional
status string required
offline object optional
contact_email string required
user_agent string optional
notification_method string optional
metadata object optional
source_order object optional
items array optional
type string optional
amount integer optional
parent string optional
currency string optional
quantity integer optional
description string optional
shipping object optional
name string optional
phone string optional
address object required
city string optional
line1 string required
line2 string optional
state string optional
country string optional
postal_code string optional
carrier string optional
tracking_number string optional

Responses

default

Error response.

200

Successful response.

POST /v1/sources/{source}
GET /v1/sources/{source}/mandate_notifications/{mandate_notification}

Retrieves a new Source MandateNotification.

operationId: GetSourcesSourceMandateNotificationsMandateNotification

Parameters

Name In Required Type Description
expand query optional array

Specifies which fields in the response should be expanded.

mandate_notification path required string
source path required string

Request Body

application/x-www-form-urlencoded

Responses

default

Error response.

200

Successful response.

GET /v1/sources/{source}/mandate_notifications/{mandate_notification}
GET /v1/sources/{source}/source_transactions

List source transactions for a given source.

operationId: GetSourcesSourceSourceTransactions

Parameters

Name In Required Type Description
ending_before query optional string

A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.

expand query optional array

Specifies which fields in the response should be expanded.

limit query optional integer

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

source path required string
starting_after query optional string

A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.

Request Body

application/x-www-form-urlencoded

Responses

default

Error response.

200

Successful response.

GET /v1/sources/{source}/source_transactions
GET /v1/sources/{source}/source_transactions/{source_transaction}

Retrieve an existing source transaction object. Supply the unique source ID from a source creation request and the source transaction ID and Stripe will return the corresponding up-to-date source object information.

operationId: GetSourcesSourceSourceTransactionsSourceTransaction

Parameters

Name In Required Type Description
expand query optional array

Specifies which fields in the response should be expanded.

source path required string
source_transaction path required string

Request Body

application/x-www-form-urlencoded

Responses

default

Error response.

200

Successful response.

GET /v1/sources/{source}/source_transactions/{source_transaction}
POST /v1/sources/{source}/verify

Verify a given source.

operationId: PostSourcesSourceVerify

Parameters

Name In Required Type Description
source path required string

Request Body

required
application/x-www-form-urlencoded
Property Type Required
expand array optional
values array required

Responses

default

Error response.

200

Successful response.

POST /v1/sources/{source}/verify

Subscriptionitems 5 endpoints

GET /v1/subscription_items

Returns a list of your subscription items for a given subscription.

operationId: GetSubscriptionItems

Parameters

Name In Required Type Description
ending_before query optional string

A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.

expand query optional array

Specifies which fields in the response should be expanded.

limit query optional integer

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

starting_after query optional string

A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.

subscription query required string

The ID of the subscription whose items will be retrieved.

Request Body

application/x-www-form-urlencoded

Responses

default

Error response.

200

Successful response.

GET /v1/subscription_items
POST /v1/subscription_items

Adds a new item to an existing subscription. No existing items will be changed or replaced.

operationId: PostSubscriptionItems

Request Body

required
application/x-www-form-urlencoded
Property Type Required
price string optional
expand array optional
metadata object optional
quantity integer optional
discounts object optional
tax_rates object optional
price_data object optional
product string required
currency string required
recurring object required
interval string required
interval_count integer optional
unit_amount integer optional
tax_behavior string optional
unit_amount_decimal string optional
subscription string required
proration_date integer optional
payment_behavior string optional
billing_thresholds object optional
proration_behavior string optional

Responses

default

Error response.

200

Successful response.

POST /v1/subscription_items
DELETE /v1/subscription_items/{item}

Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.

operationId: DeleteSubscriptionItemsItem

Parameters

Name In Required Type Description
item path required string

Request Body

application/x-www-form-urlencoded
Property Type Required
clear_usage boolean optional
proration_date integer optional
payment_behavior string optional
proration_behavior string optional

Responses

default

Error response.

200

Successful response.

DELETE /v1/subscription_items/{item}
GET /v1/subscription_items/{item}

Retrieves the subscription item with the given ID.

operationId: GetSubscriptionItemsItem

Parameters

Name In Required Type Description
expand query optional array

Specifies which fields in the response should be expanded.

item path required string

Request Body

application/x-www-form-urlencoded

Responses

default

Error response.

200

Successful response.

GET /v1/subscription_items/{item}
POST /v1/subscription_items/{item}

Updates the plan or quantity of an item on a current subscription.

operationId: PostSubscriptionItemsItem

Parameters

Name In Required Type Description
item path required string

Request Body

application/x-www-form-urlencoded
Property Type Required
price string optional
expand array optional
metadata object optional
quantity integer optional
discounts object optional
tax_rates object optional
price_data object optional
product string required
currency string required
recurring object required
interval string required
interval_count integer optional
unit_amount integer optional
tax_behavior string optional
unit_amount_decimal string optional
off_session boolean optional
proration_date integer optional
payment_behavior string optional
billing_thresholds object optional
proration_behavior string optional

Responses

default

Error response.

200

Successful response.

POST /v1/subscription_items/{item}

Subscriptionschedules 6 endpoints

GET /v1/subscription_schedules

Retrieves the list of your subscription schedules.

operationId: GetSubscriptionSchedules

Parameters

Name In Required Type Description
canceled_at query optional

Only return subscription schedules that were created canceled the given date interval.

completed_at query optional

Only return subscription schedules that completed during the given date interval.

created query optional

Only return subscription schedules that were created during the given date interval.

customer query optional string

Only return subscription schedules for the given customer.

customer_account query optional string

Only return subscription schedules for the given account.

ending_before query optional string

A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.

expand query optional array

Specifies which fields in the response should be expanded.

limit query optional integer

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

released_at query optional

Only return subscription schedules that were released during the given date interval.

scheduled query optional boolean

Only return subscription schedules that have not started yet.

starting_after query optional string

A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.

Request Body

application/x-www-form-urlencoded

Responses

default

Error response.

200

Successful response.

GET /v1/subscription_schedules
POST /v1/subscription_schedules

Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.

operationId: PostSubscriptionSchedules

Request Body

application/x-www-form-urlencoded
Property Type Required
expand array optional
phases array optional
items array required
price string optional
metadata object optional
quantity integer optional
discounts object optional
tax_rates object optional
price_data object optional
product string required
currency string required
recurring object required
unit_amount integer optional
tax_behavior string optional
unit_amount_decimal string optional
billing_thresholds object optional
trial boolean optional
currency string optional
duration object optional
interval string required
interval_count integer optional
end_date integer optional
metadata object optional
discounts object optional
trial_end integer optional
description object optional
on_behalf_of string optional
automatic_tax object optional
enabled boolean required
liability object optional
type string required
account string optional
transfer_data object optional
destination string required
amount_percent number optional
invoice_settings object optional
issuer object optional
type string required
account string optional
days_until_due integer optional
account_tax_ids object optional
add_invoice_items array optional
price string optional
period object optional
end object required
start object required
metadata object optional
quantity integer optional
discounts array optional
coupon string optional
discount string optional
promotion_code string optional
tax_rates object optional
price_data object optional
product string required
currency string required
unit_amount integer optional
tax_behavior string optional
unit_amount_decimal string optional
collection_method string optional
default_tax_rates object optional
billing_thresholds object optional
proration_behavior string optional
billing_cycle_anchor string optional
default_payment_method string optional
…1 more object optional
customer string optional
metadata object optional
start_date object optional
billing_mode object optional
type string required
flexible object optional
proration_discounts string optional
end_behavior string optional
customer_account string optional
default_settings object optional
description object optional
on_behalf_of object optional
automatic_tax object optional
enabled boolean required
liability object optional
type string required
account string optional
transfer_data object optional
invoice_settings object optional
issuer object optional
type string required
account string optional
days_until_due integer optional
account_tax_ids object optional
collection_method string optional
billing_thresholds object optional
billing_cycle_anchor string optional
default_payment_method string optional
application_fee_percent number optional
from_subscription string optional

Responses

default

Error response.

200

Successful response.

POST /v1/subscription_schedules
GET /v1/subscription_schedules/{schedule}

Retrieves the details of an existing subscription schedule. You only need to supply the unique subscription schedule identifier that was returned upon subscription schedule creation.

operationId: GetSubscriptionSchedulesSchedule

Parameters

Name In Required Type Description
expand query optional array

Specifies which fields in the response should be expanded.

schedule path required string

Request Body

application/x-www-form-urlencoded

Responses

default

Error response.

200

Successful response.

GET /v1/subscription_schedules/{schedule}
POST /v1/subscription_schedules/{schedule}

Updates an existing subscription schedule.

operationId: PostSubscriptionSchedulesSchedule

Parameters

Name In Required Type Description
schedule path required string

Request Body

application/x-www-form-urlencoded
Property Type Required
expand array optional
phases array optional
items array required
price string optional
metadata object optional
quantity integer optional
discounts object optional
tax_rates object optional
price_data object optional
product string required
currency string required
recurring object required
unit_amount integer optional
tax_behavior string optional
unit_amount_decimal string optional
billing_thresholds object optional
trial boolean optional
duration object optional
interval string required
interval_count integer optional
end_date object optional
metadata object optional
discounts object optional
trial_end object optional
start_date object optional
description object optional
on_behalf_of string optional
automatic_tax object optional
enabled boolean required
liability object optional
type string required
account string optional
transfer_data object optional
destination string required
amount_percent number optional
invoice_settings object optional
issuer object optional
type string required
account string optional
days_until_due integer optional
account_tax_ids object optional
add_invoice_items array optional
price string optional
period object optional
end object required
start object required
metadata object optional
quantity integer optional
discounts array optional
coupon string optional
discount string optional
promotion_code string optional
tax_rates object optional
price_data object optional
product string required
currency string required
unit_amount integer optional
tax_behavior string optional
unit_amount_decimal string optional
collection_method string optional
default_tax_rates object optional
billing_thresholds object optional
proration_behavior string optional
billing_cycle_anchor string optional
default_payment_method string optional
…1 more object optional
metadata object optional
end_behavior string optional
default_settings object optional
description object optional
on_behalf_of object optional
automatic_tax object optional
enabled boolean required
liability object optional
type string required
account string optional
transfer_data object optional
invoice_settings object optional
issuer object optional
type string required
account string optional
days_until_due integer optional
account_tax_ids object optional
collection_method string optional
billing_thresholds object optional
billing_cycle_anchor string optional
default_payment_method string optional
application_fee_percent number optional
proration_behavior string optional

Responses

default

Error response.

200

Successful response.

POST /v1/subscription_schedules/{schedule}
POST /v1/subscription_schedules/{schedule}/cancel

Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.

operationId: PostSubscriptionSchedulesScheduleCancel

Parameters

Name In Required Type Description
schedule path required string

Request Body

application/x-www-form-urlencoded
Property Type Required
expand array optional
prorate boolean optional
invoice_now boolean optional

Responses

default

Error response.

200

Successful response.

POST /v1/subscription_schedules/{schedule}/cancel
POST /v1/subscription_schedules/{schedule}/release

Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription’s ID to the released_subscription property.

operationId: PostSubscriptionSchedulesScheduleRelease

Parameters

Name In Required Type Description
schedule path required string

Request Body

application/x-www-form-urlencoded
Property Type Required
expand array optional
preserve_cancel_date boolean optional

Responses

default

Error response.

200

Successful response.

POST /v1/subscription_schedules/{schedule}/release

Subscriptions 9 endpoints

GET /v1/subscriptions

By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled.

operationId: GetSubscriptions

Parameters

Name In Required Type Description
automatic_tax query optional object

Filter subscriptions by their automatic tax settings.

collection_method query optional string

The collection method of the subscriptions to retrieve. Either charge_automatically or send_invoice.

created query optional

Only return subscriptions that were created during the given date interval.

current_period_end query optional

Only return subscriptions whose minimum item current_period_end falls within the given date interval.

current_period_start query optional

Only return subscriptions whose maximum item current_period_start falls within the given date interval.

customer query optional string

The ID of the customer whose subscriptions you’re retrieving.

customer_account query optional string

The ID of the account representing the customer whose subscriptions you’re retrieving.

ending_before query optional string

A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.

expand query optional array

Specifies which fields in the response should be expanded.

limit query optional integer

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

price query optional string

Filter for subscriptions that contain this recurring price ID.

starting_after query optional string

A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.

status query optional string

The status of the subscriptions to retrieve. Passing in a value of canceled will return all canceled subscriptions, including those belonging to deleted customers. Pass ended to find subscriptions that are canceled and subscriptions that are expired due to incomplete payment. Passing in a value of all will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned.

test_clock query optional string

Filter for subscriptions that are associated with the specified test clock. The response will not include subscriptions with test clocks if this and the customer parameter is not set.

Request Body

application/x-www-form-urlencoded

Responses

default

Error response.

200

Successful response.

GET /v1/subscriptions
POST /v1/subscriptions

Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions.

When you create a subscription with collection_method=charge_automatically, the first invoice is finalized as part of the request. The payment_behavior parameter determines the exact behavior of the initial payment.

To start subscriptions where the first invoice always begins in a draft status, use subscription schedules instead. Schedules provide the flexibility to model more complex billing configurations that change over time.

operationId: PostSubscriptions

Request Body

application/x-www-form-urlencoded
Property Type Required
items array optional
price string optional
metadata object optional
quantity integer optional
discounts object optional
tax_rates object optional
price_data object optional
product string required
currency string required
recurring object required
interval string required
interval_count integer optional
unit_amount integer optional
tax_behavior string optional
unit_amount_decimal string optional
billing_thresholds object optional
expand array optional
currency string optional
customer string optional
metadata object optional
cancel_at object optional
discounts object optional
trial_end object optional
description string optional
off_session boolean optional
billing_mode object optional
type string required
flexible object optional
proration_discounts string optional
on_behalf_of object optional
automatic_tax object optional
enabled boolean required
liability object optional
type string required
account string optional
transfer_data object optional
destination string required
amount_percent number optional
days_until_due integer optional
default_source string optional
trial_settings object optional
end_behavior object required
missing_payment_method string required
trial_from_plan boolean optional
customer_account string optional
invoice_settings object optional
issuer object optional
type string required
account string optional
account_tax_ids object optional
…15 more object optional

Responses

default

Error response.

200

Successful response.

POST /v1/subscriptions
GET /v1/subscriptions/search

Search for subscriptions you’ve previously created using Stripe’s Search Query Language. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.

operationId: GetSubscriptionsSearch

Parameters

Name In Required Type Description
expand query optional array

Specifies which fields in the response should be expanded.

limit query optional integer

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

page query optional string

A cursor for pagination across multiple pages of results. Don’t include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.

query query required string

The search query string. See search query language and the list of supported query fields for subscriptions.

Request Body

application/x-www-form-urlencoded

Responses

default

Error response.

200

Successful response.

GET /v1/subscriptions/search
DELETE /v1/subscriptions/{subscription_exposed_id}

Cancels a customer’s subscription immediately. The customer won’t be charged again for the subscription. After it’s canceled, you can no longer update the subscription or its metadata.

Any pending invoice items that you’ve created are still charged at the end of the period, unless manually deleted. If you’ve set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to true.

By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.

operationId: DeleteSubscriptionsSubscriptionExposedId

Parameters

Name In Required Type Description
subscription_exposed_id path required string

Request Body

application/x-www-form-urlencoded
Property Type Required
expand array optional
prorate boolean optional
invoice_now boolean optional
cancellation_details object optional
comment object optional
feedback string optional

Responses

default

Error response.

200

Successful response.

DELETE /v1/subscriptions/{subscription_exposed_id}
GET /v1/subscriptions/{subscription_exposed_id}

Retrieves the subscription with the given ID.

operationId: GetSubscriptionsSubscriptionExposedId

Parameters

Name In Required Type Description
expand query optional array

Specifies which fields in the response should be expanded.

subscription_exposed_id path required string

Request Body

application/x-www-form-urlencoded

Responses

default

Error response.

200

Successful response.

GET /v1/subscriptions/{subscription_exposed_id}
POST /v1/subscriptions/{subscription_exposed_id}

Updates an existing subscription to match the specified parameters. When changing prices or quantities, we optionally prorate the price we charge next month to make up for any price changes. To preview how the proration is calculated, use the create preview endpoint.

By default, we prorate subscription changes. For example, if a customer signs up on May 1 for a 100 price, they’ll be billed 100 immediately. If on May 15 they switch to a 200 price, then on June 1 they’ll be billed 250 (200 for a renewal of her subscription, plus a 50 prorating adjustment for half of the previous month’s 100 difference). Similarly, a downgrade generates a credit that is applied to the next invoice. We also prorate when you make quantity changes.

Switching prices does not normally change the billing date or generate an immediate charge unless:

  • The billing interval is changed (for example, from monthly to yearly).
  • The subscription moves from free to paid.
  • A trial starts or ends.

In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how Stripe immediately attempts payment for subscription changes.

If you want to charge for an upgrade immediately, pass proration_behavior as always_invoice to create prorations, automatically invoice the customer for those proration adjustments, and attempt to collect payment. If you pass create_prorations, the prorations are created but not automatically invoiced. If you want to bill the customer for the prorations before the subscription’s renewal date, you need to manually invoice the customer.

If you don’t want to prorate, set the proration_behavior option to none. With this option, the customer is billed 100 on May 1 and 200 on June 1. Similarly, if you set proration_behavior to none when switching between different billing intervals (for example, from monthly to yearly), we don’t generate any credits for the old subscription’s unused time. We still reset the billing date and bill immediately for the new subscription.

Updating the quantity on a subscription many times in an hour may result in rate limiting. If you need to bill for a frequently changing quantity, consider integrating usage-based billing instead.

operationId: PostSubscriptionsSubscriptionExposedId

Parameters

Name In Required Type Description
subscription_exposed_id path required string

Request Body

application/x-www-form-urlencoded
Property Type Required
items array optional
id string optional
price string optional
deleted boolean optional
metadata object optional
quantity integer optional
discounts object optional
tax_rates object optional
price_data object optional
product string required
currency string required
recurring object required
interval string required
interval_count integer optional
unit_amount integer optional
tax_behavior string optional
unit_amount_decimal string optional
clear_usage boolean optional
billing_thresholds object optional
expand array optional
metadata object optional
cancel_at object optional
discounts object optional
trial_end object optional
description object optional
off_session boolean optional
on_behalf_of object optional
automatic_tax object optional
enabled boolean required
liability object optional
type string required
account string optional
transfer_data object optional
days_until_due integer optional
default_source object optional
proration_date integer optional
trial_settings object optional
end_behavior object required
missing_payment_method string required
trial_from_plan boolean optional
invoice_settings object optional
issuer object optional
type string required
account string optional
account_tax_ids object optional
pause_collection object optional
payment_behavior string optional
payment_settings object optional
payment_method_types object optional
payment_method_options object optional
pix object optional
upi object optional
card object optional
payto object optional
konbini object optional
acss_debit object optional
bancontact object optional
sepa_debit object optional
us_bank_account object optional
customer_balance object optional
save_default_payment_method string optional
…11 more object optional

Responses

default

Error response.

200

Successful response.

POST /v1/subscriptions/{subscription_exposed_id}
DELETE /v1/subscriptions/{subscription_exposed_id}/discount

Removes the currently applied discount on a subscription.

operationId: DeleteSubscriptionsSubscriptionExposedIdDiscount

Parameters

Name In Required Type Description
subscription_exposed_id path required string

Request Body

application/x-www-form-urlencoded

Responses

default

Error response.

200

Successful response.

DELETE /v1/subscriptions/{subscription_exposed_id}/discount
POST /v1/subscriptions/{subscription}/migrate

Upgrade the billing_mode of an existing subscription.

operationId: PostSubscriptionsSubscriptionMigrate

Parameters

Name In Required Type Description
subscription path required string

Request Body

required
application/x-www-form-urlencoded
Property Type Required
expand array optional
billing_mode object required
type string required
flexible object optional
proration_discounts string optional

Responses

default

Error response.

200

Successful response.

POST /v1/subscriptions/{subscription}/migrate
POST /v1/subscriptions/{subscription}/resume

Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If no resumption invoice is generated, the subscription becomes active immediately. If a resumption invoice is generated, the subscription remains paused until the invoice is paid or marked uncollectible. If the invoice isn’t paid by the expiration date, it is voided and the subscription remains paused. You can only resume subscriptions with collection_method set to charge_automatically. send_invoice subscriptions are not supported.

operationId: PostSubscriptionsSubscriptionResume

Parameters

Name In Required Type Description
subscription path required string

Request Body

application/x-www-form-urlencoded
Property Type Required
expand array optional
proration_date integer optional
proration_behavior string optional
billing_cycle_anchor string optional

Responses

default

Error response.

200

Successful response.

POST /v1/subscriptions/{subscription}/resume

Tax 14 endpoints

GET /v1/tax/associations/find

Finds a tax association object by PaymentIntent id.

operationId: GetTaxAssociationsFind

Parameters

Name In Required Type Description
expand query optional array

Specifies which fields in the response should be expanded.

payment_intent query required string

Valid PaymentIntent id

Request Body

application/x-www-form-urlencoded

Responses

default

Error response.

200

Successful response.

GET /v1/tax/associations/find
POST /v1/tax/calculations

Calculates tax based on the input and returns a Tax Calculation object.

operationId: PostTaxCalculations

Request Body

required
application/x-www-form-urlencoded
Property Type Required
expand array optional
currency string required
customer string optional
tax_date integer optional
line_items array required
amount integer required
product string optional
metadata object optional
quantity integer optional
tax_code string optional
reference string optional
tax_behavior string optional
shipping_cost object optional
amount integer optional
tax_code string optional
tax_behavior string optional
shipping_rate string optional
customer_details object optional
address object optional
city object optional
line1 object optional
line2 object optional
state object optional
country string required
postal_code object optional
tax_ids array optional
type string required
value string required
ip_address string optional
address_source string optional
taxability_override string optional
ship_from_details object optional
address object required
city object optional
line1 object optional
line2 object optional
state object optional
country string required
postal_code object optional

Responses

default

Error response.

200

Successful response.

POST /v1/tax/calculations
GET /v1/tax/calculations/{calculation}

Retrieves a Tax Calculation object, if the calculation hasn’t expired.

operationId: GetTaxCalculationsCalculation

Parameters

Name In Required Type Description
calculation path required string
expand query optional array

Specifies which fields in the response should be expanded.

Request Body

application/x-www-form-urlencoded

Responses

default

Error response.

200

Successful response.

GET /v1/tax/calculations/{calculation}
GET /v1/tax/calculations/{calculation}/line_items

Retrieves the line items of a tax calculation as a collection, if the calculation hasn’t expired.

operationId: GetTaxCalculationsCalculationLineItems

Parameters

Name In Required Type Description
calculation path required string
ending_before query optional string

A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.

expand query optional array

Specifies which fields in the response should be expanded.

limit query optional integer

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

starting_after query optional string

A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.

Request Body

application/x-www-form-urlencoded

Responses

default

Error response.

200

Successful response.

GET /v1/tax/calculations/{calculation}/line_items
GET /v1/tax/registrations

Returns a list of Tax Registration objects.

operationId: GetTaxRegistrations

Parameters

Name In Required Type Description
ending_before query optional string

A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.

expand query optional array

Specifies which fields in the response should be expanded.

limit query optional integer

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

starting_after query optional string

A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.

status query optional string

The status of the Tax Registration.

Request Body

application/x-www-form-urlencoded

Responses

default

Error response.

200

Successful response.

GET /v1/tax/registrations
POST /v1/tax/registrations

Creates a new Tax Registration object.

operationId: PostTaxRegistrations

Request Body

required
application/x-www-form-urlencoded
Property Type Required
expand array optional
country string required
expires_at integer optional
active_from object required
country_options object required
ae object optional
type string required
standard object optional
place_of_supply_scheme string optional
al object optional
type string required
standard object optional
place_of_supply_scheme string optional
am object optional
type string required
ao object optional
type string required
standard object optional
place_of_supply_scheme string optional
at object optional
type string required
standard object optional
place_of_supply_scheme string required
au object optional
type string required
standard object optional
place_of_supply_scheme string optional
aw object optional
type string required
standard object optional
place_of_supply_scheme string optional
az object optional
type string required
ba object optional
type string required
standard object optional
place_of_supply_scheme string optional
bb object optional
type string required
standard object optional
place_of_supply_scheme string optional
bd object optional
type string required
standard object optional
place_of_supply_scheme string optional
be object optional
type string required
standard object optional
place_of_supply_scheme string required
bf object optional
type string required
standard object optional
place_of_supply_scheme string optional
bg object optional
type string required
standard object optional
place_of_supply_scheme string required
bh object optional
type string required
standard object optional
place_of_supply_scheme string optional
bj object optional
type string required
bs object optional
type string required
standard object optional
place_of_supply_scheme string optional
by object optional
type string required
ca object optional
type string required
province_standard object optional
province string required
cd object optional
type string required
standard object optional
place_of_supply_scheme string optional
…81 more object optional

Responses

default

Error response.

200

Successful response.

POST /v1/tax/registrations
GET /v1/tax/registrations/{id}

Returns a Tax Registration object.

operationId: GetTaxRegistrationsId

Parameters

Name In Required Type Description
expand query optional array

Specifies which fields in the response should be expanded.

id path required string

Request Body

application/x-www-form-urlencoded

Responses

default

Error response.

200

Successful response.

GET /v1/tax/registrations/{id}
POST /v1/tax/registrations/{id}

Updates an existing Tax Registration object.

A registration cannot be deleted after it has been created. If you wish to end a registration you may do so by setting expires_at.

operationId: PostTaxRegistrationsId

Parameters

Name In Required Type Description
id path required string

Request Body

application/x-www-form-urlencoded
Property Type Required
expand array optional
expires_at object optional
active_from object optional

Responses

default

Error response.

200

Successful response.

POST /v1/tax/registrations/{id}
GET /v1/tax/settings

Retrieves Tax Settings for a merchant.

operationId: GetTaxSettings

Parameters

Name In Required Type Description
expand query optional array

Specifies which fields in the response should be expanded.

Request Body

application/x-www-form-urlencoded

Responses

default

Error response.

200

Successful response.

GET /v1/tax/settings
POST /v1/tax/settings

Updates Tax Settings parameters used in tax calculations. All parameters are editable but none can be removed once set.

operationId: PostTaxSettings

Request Body

application/x-www-form-urlencoded
Property Type Required
expand array optional
defaults object optional
tax_code string optional
tax_behavior string optional
head_office object optional
address object required
city string optional
line1 string optional
line2 string optional
state string optional
country string optional
postal_code string optional

Responses

default

Error response.

200

Successful response.

POST /v1/tax/settings
POST /v1/tax/transactions/create_from_calculation

Creates a Tax Transaction from a calculation, if that calculation hasn’t expired. Calculations expire after 90 days.

operationId: PostTaxTransactionsCreateFromCalculation

Request Body

required
application/x-www-form-urlencoded
Property Type Required
expand array optional
metadata object optional
posted_at integer optional
reference string required
calculation string required

Responses

default

Error response.

200

Successful response.

POST /v1/tax/transactions/create_from_calculation
POST /v1/tax/transactions/create_reversal

Partially or fully reverses a previously created Transaction.

operationId: PostTaxTransactionsCreateReversal

Request Body

required
application/x-www-form-urlencoded
Property Type Required
mode string required
expand array optional
metadata object optional
reference string required
line_items array optional
amount integer required
metadata object optional
quantity integer optional
reference string required
amount_tax integer required
original_line_item string required
flat_amount integer optional
shipping_cost object optional
amount integer required
amount_tax integer required
original_transaction string required

Responses

default

Error response.

200

Successful response.

POST /v1/tax/transactions/create_reversal
GET /v1/tax/transactions/{transaction}

Retrieves a Tax Transaction object.

operationId: GetTaxTransactionsTransaction

Parameters

Name In Required Type Description
expand query optional array

Specifies which fields in the response should be expanded.

transaction path required string

Request Body

application/x-www-form-urlencoded

Responses

default

Error response.

200

Successful response.

GET /v1/tax/transactions/{transaction}
GET /v1/tax/transactions/{transaction}/line_items

Retrieves the line items of a committed standalone transaction as a collection.

operationId: GetTaxTransactionsTransactionLineItems

Parameters

Name In Required Type Description
ending_before query optional string

A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.

expand query optional array

Specifies which fields in the response should be expanded.

limit query optional integer

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

starting_after query optional string

A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.

transaction path required string

Request Body

application/x-www-form-urlencoded

Responses

default

Error response.

200

Successful response.

GET /v1/tax/transactions/{transaction}/line_items

Taxcodes 2 endpoints

GET /v1/tax_codes

A list of all tax codes available to add to Products in order to allow specific tax calculations.

operationId: GetTaxCodes

Parameters

Name In Required Type Description
ending_before query optional string

A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.

expand query optional array

Specifies which fields in the response should be expanded.

limit query optional integer

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

starting_after query optional string

A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.

Request Body

application/x-www-form-urlencoded

Responses

default

Error response.

200

Successful response.

GET /v1/tax_codes
GET /v1/tax_codes/{id}

Retrieves the details of an existing tax code. Supply the unique tax code ID and Stripe will return the corresponding tax code information.

operationId: GetTaxCodesId

Parameters

Name In Required Type Description
expand query optional array

Specifies which fields in the response should be expanded.

id path required string

Request Body

application/x-www-form-urlencoded

Responses

default

Error response.

200

Successful response.

GET /v1/tax_codes/{id}
Load more endpoints