/v1/shipping_rates
Returns a list of your shipping rates.
| 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 |
|
| currency | query | optional | string | Only return shipping rates for the given currency. |
| ending_before | query | optional | string | A cursor for use in pagination. |
| 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. |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/shipping_rates
/v1/shipping_rates
Creates a new shipping rate object.
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 |
Error response.
Successful response.
POST /v1/shipping_rates
/v1/shipping_rates/{shipping_rate_token}
Returns the shipping rate object with the given ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| expand | query | optional | array | Specifies which fields in the response should be expanded. |
| shipping_rate_token | path | required | string | — |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/shipping_rates/{shipping_rate_token}
/v1/shipping_rates/{shipping_rate_token}
Updates an existing shipping rate object.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| shipping_rate_token | path | required | string | — |
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 |
Error response.
Successful response.
POST /v1/shipping_rates/{shipping_rate_token}
/v1/sigma/saved_queries/{id}
Update an existing Sigma query that previously exists
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | The |
application/x-www-form-urlencoded
| Property | Type | Required |
|---|---|---|
| sql | string | optional |
| name | string | optional |
| expand | array | optional |
Error response.
Successful response.
POST /v1/sigma/saved_queries/{id}
/v1/sigma/scheduled_query_runs
Returns a list of scheduled query runs.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| ending_before | query | optional | string | A cursor for use in pagination. |
| 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. |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/sigma/scheduled_query_runs
/v1/sigma/scheduled_query_runs/{scheduled_query_run}
Retrieves the details of an scheduled query run.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| expand | query | optional | array | Specifies which fields in the response should be expanded. |
| scheduled_query_run | path | required | string | — |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/sigma/scheduled_query_runs/{scheduled_query_run}
/v1/sources
Creates a new source object.
application/x-www-form-urlencoded
| Property | Type | Required |
|---|---|---|
| flow | string | optional |
| type | string | optional |
| owner | object | optional |
| └ name | string | optional |
| 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 |
Error response.
Successful response.
POST /v1/sources
/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.
| 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 | — |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/sources/{source}
/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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| source | path | required | string | — |
application/x-www-form-urlencoded
| Property | Type | Required |
|---|---|---|
| owner | object | optional |
| └ name | string | optional |
| 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 |
Error response.
Successful response.
POST /v1/sources/{source}
/v1/sources/{source}/mandate_notifications/{mandate_notification}
Retrieves a new Source MandateNotification.
| 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 | — |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/sources/{source}/mandate_notifications/{mandate_notification}
/v1/sources/{source}/source_transactions
List source transactions for a given source.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| ending_before | query | optional | string | A cursor for use in pagination. |
| 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. |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/sources/{source}/source_transactions
/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.
| 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 | — |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/sources/{source}/source_transactions/{source_transaction}
/v1/sources/{source}/verify
Verify a given source.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| source | path | required | string | — |
application/x-www-form-urlencoded
| Property | Type | Required |
|---|---|---|
| expand | array | optional |
| values | array | required |
Error response.
Successful response.
POST /v1/sources/{source}/verify
/v1/subscription_items
Returns a list of your subscription items for a given subscription.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| ending_before | query | optional | string | A cursor for use in pagination. |
| 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. |
| subscription | query | required | string | The ID of the subscription whose items will be retrieved. |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/subscription_items
/v1/subscription_items
Adds a new item to an existing subscription. No existing items will be changed or replaced.
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 |
Error response.
Successful response.
POST /v1/subscription_items
/v1/subscription_items/{item}
Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| item | path | required | string | — |
application/x-www-form-urlencoded
| Property | Type | Required |
|---|---|---|
| clear_usage | boolean | optional |
| proration_date | integer | optional |
| payment_behavior | string | optional |
| proration_behavior | string | optional |
Error response.
Successful response.
DELETE /v1/subscription_items/{item}
/v1/subscription_items/{item}
Retrieves the subscription item with the given ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| expand | query | optional | array | Specifies which fields in the response should be expanded. |
| item | path | required | string | — |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/subscription_items/{item}
/v1/subscription_items/{item}
Updates the plan or quantity of an item on a current subscription.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| item | path | required | string | — |
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 |
Error response.
Successful response.
POST /v1/subscription_items/{item}
/v1/subscription_schedules
Retrieves the list of your subscription schedules.
| 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. |
| 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. |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/subscription_schedules
/v1/subscription_schedules
Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.
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 |
Error response.
Successful response.
POST /v1/subscription_schedules
/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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| expand | query | optional | array | Specifies which fields in the response should be expanded. |
| schedule | path | required | string | — |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/subscription_schedules/{schedule}
/v1/subscription_schedules/{schedule}
Updates an existing subscription schedule.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| schedule | path | required | string | — |
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 |
Error response.
Successful response.
POST /v1/subscription_schedules/{schedule}
/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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| schedule | path | required | string | — |
application/x-www-form-urlencoded
| Property | Type | Required |
|---|---|---|
| expand | array | optional |
| prorate | boolean | optional |
| invoice_now | boolean | optional |
Error response.
Successful response.
POST /v1/subscription_schedules/{schedule}/cancel
/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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| schedule | path | required | string | — |
application/x-www-form-urlencoded
| Property | Type | Required |
|---|---|---|
| expand | array | optional |
| preserve_cancel_date | boolean | optional |
Error response.
Successful response.
POST /v1/subscription_schedules/{schedule}/release
/v1/subscriptions
By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled.
| 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 |
| 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. |
| 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. |
| status | query | optional | string | The status of the subscriptions to retrieve. Passing in a value of |
| 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. |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/subscriptions
/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.
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 |
Error response.
Successful response.
POST /v1/subscriptions
/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.
| 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. |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/subscriptions/search
/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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| subscription_exposed_id | path | required | string | — |
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 |
Error response.
Successful response.
DELETE /v1/subscriptions/{subscription_exposed_id}
/v1/subscriptions/{subscription_exposed_id}
Retrieves the subscription with the given ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| expand | query | optional | array | Specifies which fields in the response should be expanded. |
| subscription_exposed_id | path | required | string | — |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/subscriptions/{subscription_exposed_id}
/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:
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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| subscription_exposed_id | path | required | string | — |
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 |
Error response.
Successful response.
POST /v1/subscriptions/{subscription_exposed_id}
/v1/subscriptions/{subscription_exposed_id}/discount
Removes the currently applied discount on a subscription.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| subscription_exposed_id | path | required | string | — |
application/x-www-form-urlencoded
Error response.
Successful response.
DELETE /v1/subscriptions/{subscription_exposed_id}/discount
/v1/subscriptions/{subscription}/migrate
Upgrade the billing_mode of an existing subscription.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| subscription | path | required | string | — |
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 |
Error response.
Successful response.
POST /v1/subscriptions/{subscription}/migrate
/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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| subscription | path | required | string | — |
application/x-www-form-urlencoded
| Property | Type | Required |
|---|---|---|
| expand | array | optional |
| proration_date | integer | optional |
| proration_behavior | string | optional |
| billing_cycle_anchor | string | optional |
Error response.
Successful response.
POST /v1/subscriptions/{subscription}/resume
/v1/tax/associations/find
Finds a tax association object by PaymentIntent id.
| 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 |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/tax/associations/find
/v1/tax/calculations
Calculates tax based on the input and returns a Tax Calculation object.
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 |
Error response.
Successful response.
POST /v1/tax/calculations
/v1/tax/calculations/{calculation}
Retrieves a Tax Calculation object, if the calculation hasn’t expired.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| calculation | path | required | string | — |
| expand | query | optional | array | Specifies which fields in the response should be expanded. |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/tax/calculations/{calculation}
/v1/tax/calculations/{calculation}/line_items
Retrieves the line items of a tax calculation as a collection, if the calculation hasn’t expired.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| calculation | path | required | string | — |
| ending_before | query | optional | string | A cursor for use in pagination. |
| 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. |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/tax/calculations/{calculation}/line_items
/v1/tax/registrations
Returns a list of Tax Registration objects.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| ending_before | query | optional | string | A cursor for use in pagination. |
| 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. |
| status | query | optional | string | The status of the Tax Registration. |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/tax/registrations
/v1/tax/registrations
Creates a new Tax Registration object.
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 |
Error response.
Successful response.
POST /v1/tax/registrations
/v1/tax/registrations/{id}
Returns a Tax Registration object.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| expand | query | optional | array | Specifies which fields in the response should be expanded. |
| id | path | required | string | — |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/tax/registrations/{id}
/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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | — |
application/x-www-form-urlencoded
| Property | Type | Required |
|---|---|---|
| expand | array | optional |
| expires_at | object | optional |
| active_from | object | optional |
Error response.
Successful response.
POST /v1/tax/registrations/{id}
/v1/tax/settings
Retrieves Tax Settings for a merchant.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| expand | query | optional | array | Specifies which fields in the response should be expanded. |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/tax/settings
/v1/tax/settings
Updates Tax Settings parameters used in tax calculations. All parameters are editable but none can be removed once set.
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 |
Error response.
Successful response.
POST /v1/tax/settings
/v1/tax/transactions/create_from_calculation
Creates a Tax Transaction from a calculation, if that calculation hasn’t expired. Calculations expire after 90 days.
application/x-www-form-urlencoded
| Property | Type | Required |
|---|---|---|
| expand | array | optional |
| metadata | object | optional |
| posted_at | integer | optional |
| reference | string | required |
| calculation | string | required |
Error response.
Successful response.
POST /v1/tax/transactions/create_from_calculation
/v1/tax/transactions/create_reversal
Partially or fully reverses a previously created Transaction.
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 |
Error response.
Successful response.
POST /v1/tax/transactions/create_reversal
/v1/tax/transactions/{transaction}
Retrieves a Tax Transaction object.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| expand | query | optional | array | Specifies which fields in the response should be expanded. |
| transaction | path | required | string | — |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/tax/transactions/{transaction}
/v1/tax/transactions/{transaction}/line_items
Retrieves the line items of a committed standalone transaction as a collection.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| ending_before | query | optional | string | A cursor for use in pagination. |
| 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. |
| transaction | path | required | string | — |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/tax/transactions/{transaction}/line_items
/v1/tax_codes
A list of all tax codes available to add to Products in order to allow specific tax calculations.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| ending_before | query | optional | string | A cursor for use in pagination. |
| 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. |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/tax_codes
/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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| expand | query | optional | array | Specifies which fields in the response should be expanded. |
| id | path | required | string | — |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/tax_codes/{id}