Checkout 3 endpoints

POST /v1/checkout/sessions/{session}

Updates a Checkout Session object.

Related guide: Dynamically update a Checkout Session

operationId: PostCheckoutSessionsSession

Parameters

Name In Required Type Description
session path required string

Request Body

application/x-www-form-urlencoded
Property Type Required
expand array optional
metadata object optional
line_items array optional
id string optional
price string optional
metadata object optional
quantity integer optional
tax_rates object optional
price_data object optional
product string optional
currency string required
recurring object optional
interval string required
interval_count integer optional
unit_amount integer optional
product_data object optional
name string required
images array optional
metadata object optional
tax_code string optional
unit_label string optional
description string optional
tax_behavior string optional
unit_amount_decimal string optional
adjustable_quantity object optional
enabled boolean required
maximum integer optional
minimum integer optional
shipping_options object optional
collected_information object optional
shipping_details object optional
name string required
address object required
city string optional
line1 string required
line2 string optional
state string optional
country string required
postal_code string optional

Responses

default

Error response.

200

Successful response.

POST /v1/checkout/sessions/{session}
POST /v1/checkout/sessions/{session}/expire

A Checkout Session can be expired when it is in one of these statuses: open

After it expires, a customer can’t complete a Checkout Session and customers loading the Checkout Session see a message saying the Checkout Session is expired.

operationId: PostCheckoutSessionsSessionExpire

Parameters

Name In Required Type Description
session path required string

Request Body

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

Responses

default

Error response.

200

Successful response.

POST /v1/checkout/sessions/{session}/expire
GET /v1/checkout/sessions/{session}/line_items

When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

operationId: GetCheckoutSessionsSessionLineItems

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.

session 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/checkout/sessions/{session}/line_items

Climate 9 endpoints

GET /v1/climate/orders

Lists all Climate order objects. The orders are returned sorted by creation date, with the most recently created orders appearing first.

operationId: GetClimateOrders

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/climate/orders
POST /v1/climate/orders

Creates a Climate order object for a given Climate product. The order will be processed immediately after creation and payment will be deducted your Stripe balance.

operationId: PostClimateOrders

Request Body

required
application/x-www-form-urlencoded
Property Type Required
amount integer optional
expand array optional
product string required
currency string optional
metadata object optional
beneficiary object optional
public_name string required
metric_tons string optional

Responses

default

Error response.

200

Successful response.

POST /v1/climate/orders
GET /v1/climate/orders/{order}

Retrieves the details of a Climate order object with the given ID.

operationId: GetClimateOrdersOrder

Parameters

Name In Required Type Description
expand query optional array

Specifies which fields in the response should be expanded.

order path required string

Unique identifier of the order.

Request Body

application/x-www-form-urlencoded

Responses

default

Error response.

200

Successful response.

GET /v1/climate/orders/{order}
POST /v1/climate/orders/{order}

Updates the specified order by setting the values of the parameters passed.

operationId: PostClimateOrdersOrder

Parameters

Name In Required Type Description
order path required string

Unique identifier of the order.

Request Body

application/x-www-form-urlencoded
Property Type Required
expand array optional
metadata object optional
beneficiary object optional

Responses

default

Error response.

200

Successful response.

POST /v1/climate/orders/{order}
POST /v1/climate/orders/{order}/cancel

Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the reservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier might cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe provides 90 days advance notice and refunds the amount_total.

operationId: PostClimateOrdersOrderCancel

Parameters

Name In Required Type Description
order path required string

Unique identifier of the order.

Request Body

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

Responses

default

Error response.

200

Successful response.

POST /v1/climate/orders/{order}/cancel
GET /v1/climate/products

Lists all available Climate product objects.

operationId: GetClimateProducts

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/climate/products
GET /v1/climate/products/{product}

Retrieves the details of a Climate product with the given ID.

operationId: GetClimateProductsProduct

Parameters

Name In Required Type Description
expand query optional array

Specifies which fields in the response should be expanded.

product path required string

Request Body

application/x-www-form-urlencoded

Responses

default

Error response.

200

Successful response.

GET /v1/climate/products/{product}
GET /v1/climate/suppliers

Lists all available Climate supplier objects.

operationId: GetClimateSuppliers

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/climate/suppliers
GET /v1/climate/suppliers/{supplier}

Retrieves a Climate supplier object.

operationId: GetClimateSuppliersSupplier

Parameters

Name In Required Type Description
expand query optional array

Specifies which fields in the response should be expanded.

supplier path required string

Request Body

application/x-www-form-urlencoded

Responses

default

Error response.

200

Successful response.

GET /v1/climate/suppliers/{supplier}

Confirmationtokens 1 endpoints

GET /v1/confirmation_tokens/{confirmation_token}

Retrieves an existing ConfirmationToken object

operationId: GetConfirmationTokensConfirmationToken

Parameters

Name In Required Type Description
confirmation_token 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/confirmation_tokens/{confirmation_token}

Countryspecs 2 endpoints

GET /v1/country_specs

Lists all Country Spec objects available in the API.

operationId: GetCountrySpecs

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/country_specs
GET /v1/country_specs/{country}

Returns a Country Spec for a given Country code.

operationId: GetCountrySpecsCountry

Parameters

Name In Required Type Description
country 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/country_specs/{country}

Coupons 5 endpoints

GET /v1/coupons

Returns a list of your coupons.

operationId: GetCoupons

Parameters

Name In Required Type Description
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.

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/coupons
POST /v1/coupons

You can create coupons easily via the coupon management page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly.

A coupon has either a percent_off or an amount_off and currency. If you set an amount_off, that amount will be subtracted from any invoice’s subtotal. For example, an invoice with a subtotal of 100 will have a final total of 0 if a coupon with an amount_off of 200 is applied to it and an invoice with a subtotal of 300 will have a final total of 100 if a coupon with an amount_off of 200 is applied to it.

operationId: PostCoupons

Request Body

application/x-www-form-urlencoded
Property Type Required
id string optional
name string optional
expand array optional
currency string optional
duration string optional
metadata object optional
redeem_by integer optional
amount_off integer optional
applies_to object optional
products array optional
percent_off number optional
max_redemptions integer optional
currency_options object optional
duration_in_months integer optional

Responses

default

Error response.

200

Successful response.

POST /v1/coupons
DELETE /v1/coupons/{coupon}

You can delete coupons via the coupon management page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can’t redeem the coupon. You can also delete coupons via the API.

operationId: DeleteCouponsCoupon

Parameters

Name In Required Type Description
coupon path required string

Request Body

application/x-www-form-urlencoded

Responses

default

Error response.

200

Successful response.

DELETE /v1/coupons/{coupon}
GET /v1/coupons/{coupon}

Retrieves the coupon with the given ID.

operationId: GetCouponsCoupon

Parameters

Name In Required Type Description
coupon 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/coupons/{coupon}
POST /v1/coupons/{coupon}

Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable.

operationId: PostCouponsCoupon

Parameters

Name In Required Type Description
coupon path required string

Request Body

application/x-www-form-urlencoded
Property Type Required
name string optional
expand array optional
metadata object optional
currency_options object optional

Responses

default

Error response.

200

Successful response.

POST /v1/coupons/{coupon}

Creditnotes 8 endpoints

GET /v1/credit_notes

Returns a list of credit notes.

operationId: GetCreditNotes

Parameters

Name In Required Type Description
created query optional

Only return credit notes that were created during the given date interval.

customer query optional string

Only return credit notes for the customer specified by this customer ID.

customer_account query optional string

Only return credit notes for the account representing the customer specified by this account ID.

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.

invoice query optional string

Only return credit notes for the invoice specified by this invoice ID.

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/credit_notes
POST /v1/credit_notes

Issue a credit note to adjust the amount of a finalized invoice. A credit note will first reduce the invoice’s amount_remaining (and amount_due), but not below zero. This amount is indicated by the credit note’s pre_payment_amount. The excess amount is indicated by post_payment_amount, and it can result in any combination of the following:

  • Refunds: create a new refund (using refund_amount) or link existing refunds (using refunds).
  • Customer balance credit: credit the customer’s balance (using credit_amount) which will be automatically applied to their next invoice when it’s finalized.
  • Outside of Stripe credit: record the amount that is or will be credited outside of Stripe (using out_of_band_amount).

The sum of refunds, customer balance credits, and outside of Stripe credits must equal the post_payment_amount.

You may issue multiple credit notes for an invoice. Each credit note may increment the invoice’s pre_payment_credit_notes_amount, post_payment_credit_notes_amount, or both, depending on the invoice’s amount_remaining at the time of credit note creation.

operationId: PostCreditNotes

Request Body

required
application/x-www-form-urlencoded
Property Type Required
memo string optional
lines array optional
type string required
amount integer optional
metadata object optional
quantity integer optional
tax_rates object optional
description string optional
tax_amounts object optional
unit_amount integer optional
invoice_line_item string optional
unit_amount_decimal string optional
amount integer optional
expand array optional
reason string optional
invoice string required
refunds array optional
type string optional
refund string optional
amount_refunded integer optional
payment_record_refund object optional
refund_group string required
payment_record string required
metadata object optional
email_type string optional
effective_at integer optional
credit_amount integer optional
refund_amount integer optional
shipping_cost object optional
shipping_rate string optional
out_of_band_amount integer optional

Responses

default

Error response.

200

Successful response.

POST /v1/credit_notes
GET /v1/credit_notes/preview

Get a preview of a credit note without creating it.

operationId: GetCreditNotesPreview

Parameters

Name In Required Type Description
amount query optional integer

The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of amount, lines, or shipping_cost must be provided.

credit_amount query optional integer

The integer amount in cents (or local equivalent) representing the amount to credit the customer’s balance, which will be automatically applied to their next invoice.

effective_at query optional integer

The date when this credit note is in effect. Same as created unless overwritten. When defined, this value replaces the system-generated ‘Date of issue’ printed on the credit note PDF.

email_type query optional string

Type of email to send to the customer, one of credit_note or none and the default is credit_note.

expand query optional array

Specifies which fields in the response should be expanded.

invoice query required string

ID of the invoice.

lines query optional array

Line items that make up the credit note. One of amount, lines, or shipping_cost must be provided.

memo query optional string

The credit note’s memo appears on the credit note PDF.

metadata query optional object

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.

out_of_band_amount query optional integer

The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.

reason query optional string

Reason for issuing this credit note, one of duplicate, fraudulent, order_change, or product_unsatisfactory

refund_amount query optional integer

The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.

refunds query optional array

Refunds to link to this credit note.

shipping_cost query optional object

When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of amount, lines, or shipping_cost must be provided.

Request Body

application/x-www-form-urlencoded

Responses

default

Error response.

200

Successful response.

GET /v1/credit_notes/preview
GET /v1/credit_notes/preview/lines

When retrieving a credit note preview, you’ll get a lines property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items.

operationId: GetCreditNotesPreviewLines

Parameters

Name In Required Type Description
amount query optional integer

The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of amount, lines, or shipping_cost must be provided.

credit_amount query optional integer

The integer amount in cents (or local equivalent) representing the amount to credit the customer’s balance, which will be automatically applied to their next invoice.

effective_at query optional integer

The date when this credit note is in effect. Same as created unless overwritten. When defined, this value replaces the system-generated ‘Date of issue’ printed on the credit note PDF.

email_type query optional string

Type of email to send to the customer, one of credit_note or none and the default is credit_note.

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.

invoice query required string

ID of the invoice.

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.

lines query optional array

Line items that make up the credit note. One of amount, lines, or shipping_cost must be provided.

memo query optional string

The credit note’s memo appears on the credit note PDF.

metadata query optional object

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.

out_of_band_amount query optional integer

The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.

reason query optional string

Reason for issuing this credit note, one of duplicate, fraudulent, order_change, or product_unsatisfactory

refund_amount query optional integer

The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.

refunds query optional array

Refunds to link to this credit note.

shipping_cost query optional object

When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of amount, lines, or shipping_cost must be provided.

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/credit_notes/preview/lines
GET /v1/credit_notes/{credit_note}/lines

When retrieving a credit note, you’ll get a lines property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

operationId: GetCreditNotesCreditNoteLines

Parameters

Name In Required Type Description
credit_note 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/credit_notes/{credit_note}/lines
GET /v1/credit_notes/{id}

Retrieves the credit note object with the given identifier.

operationId: GetCreditNotesId

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/credit_notes/{id}
POST /v1/credit_notes/{id}

Updates an existing credit note.

operationId: PostCreditNotesId

Parameters

Name In Required Type Description
id path required string

Request Body

application/x-www-form-urlencoded
Property Type Required
memo string optional
expand array optional
metadata object optional

Responses

default

Error response.

200

Successful response.

POST /v1/credit_notes/{id}
POST /v1/credit_notes/{id}/void

Marks a credit note as void. Learn more about voiding credit notes.

operationId: PostCreditNotesIdVoid

Parameters

Name In Required Type Description
id path required string

Request Body

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

Responses

default

Error response.

200

Successful response.

POST /v1/credit_notes/{id}/void

Customersessions 1 endpoints

POST /v1/customer_sessions

Creates a Customer Session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.

operationId: PostCustomerSessions

Request Body

required
application/x-www-form-urlencoded
Property Type Required
expand array optional
customer string optional
components object required
buy_button object optional
enabled boolean required
pricing_table object optional
enabled boolean required
customer_sheet object optional
enabled boolean required
features object optional
payment_method_remove string optional
payment_method_allow_redisplay_filters array optional
payment_element object optional
enabled boolean required
features object optional
payment_method_save string optional
payment_method_remove string optional
payment_method_redisplay string optional
payment_method_save_usage string optional
payment_method_redisplay_limit integer optional
payment_method_allow_redisplay_filters array optional
mobile_payment_element object optional
enabled boolean required
features object optional
payment_method_save string optional
payment_method_remove string optional
payment_method_redisplay string optional
payment_method_allow_redisplay_filters array optional
payment_method_save_allow_redisplay_override string optional
customer_account string optional

Responses

default

Error response.

200

Successful response.

POST /v1/customer_sessions

Customers 21 endpoints

GET /v1/customers

Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first.

operationId: GetCustomers

Parameters

Name In Required Type Description
created query optional

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

email query optional string

A case-sensitive filter on the list based on the customer’s email field. The value must be a 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.

test_clock query optional string

Provides a list of customers that are associated with the specified test clock. The response will not include customers with test clocks if this parameter is not set.

Request Body

application/x-www-form-urlencoded

Responses

default

Error response.

200

Successful response.

GET /v1/customers
POST /v1/customers

Creates a new customer object.

operationId: PostCustomers

Request Body

application/x-www-form-urlencoded
Property Type Required
tax object optional
ip_address object optional
validate_location string optional
name string optional
email string optional
phone string optional
expand array optional
source string optional
address object optional
balance integer optional
metadata object optional
shipping object optional
tax_exempt string optional
test_clock string optional
description string optional
tax_id_data array optional
type string required
value string required
cash_balance object optional
settings object optional
reconciliation_mode string optional
business_name object optional
invoice_prefix string optional
payment_method string optional
individual_name object optional
invoice_settings object optional
footer string optional
custom_fields object optional
rendering_options object optional
default_payment_method string optional
…2 more object optional

Responses

default

Error response.

200

Successful response.

POST /v1/customers
GET /v1/customers/search

Search for customers 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: GetCustomersSearch

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 customers.

Request Body

application/x-www-form-urlencoded

Responses

default

Error response.

200

Successful response.

GET /v1/customers/search
DELETE /v1/customers/{customer}

Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer.

operationId: DeleteCustomersCustomer

Parameters

Name In Required Type Description
customer path required string

Request Body

application/x-www-form-urlencoded

Responses

default

Error response.

200

Successful response.

DELETE /v1/customers/{customer}
GET /v1/customers/{customer}

Retrieves a Customer object.

operationId: GetCustomersCustomer

Parameters

Name In Required Type Description
customer 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/customers/{customer}
POST /v1/customers/{customer}

Updates the specified customer by setting the values of the parameters passed. Any parameters not provided are left unchanged. For example, if you pass the source parameter, that becomes the customer’s active source (such as a card) to be used for all charges in the future. When you update a customer to a new valid card source by passing the source parameter: for each of the customer’s current subscriptions, if the subscription bills automatically and is in the past_due state, then the latest open invoice for the subscription with automatic collection enabled is retried. This retry doesn’t count as an automatic retry, and doesn’t affect the next regularly scheduled payment for the invoice. Changing the default_source for a customer doesn’t trigger this behavior.

This request accepts mostly the same arguments as the customer creation call.

operationId: PostCustomersCustomer

Parameters

Name In Required Type Description
customer path required string

Request Body

application/x-www-form-urlencoded
Property Type Required
tax object optional
ip_address object optional
validate_location string optional
card object optional
name string optional
email string optional
phone string optional
expand array optional
source string optional
address object optional
balance integer optional
metadata object optional
shipping object optional
tax_exempt string optional
description string optional
bank_account object optional
cash_balance object optional
settings object optional
reconciliation_mode string optional
default_card string optional
business_name object optional
default_source string optional
invoice_prefix string optional
individual_name object optional
…5 more object optional

Responses

default

Error response.

200

Successful response.

POST /v1/customers/{customer}
GET /v1/customers/{customer}/balance_transactions

Returns a list of transactions that updated the customer’s balances.

operationId: GetCustomersCustomerBalanceTransactions

Parameters

Name In Required Type Description
created query optional

Only return customer balance transactions that were created during the given date interval.

customer 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.

invoice query optional string

Only return transactions that are related to the specified invoice.

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/customers/{customer}/balance_transactions
POST /v1/customers/{customer}/balance_transactions

Creates an immutable transaction that updates the customer’s credit balance.

operationId: PostCustomersCustomerBalanceTransactions

Parameters

Name In Required Type Description
customer path required string

Request Body

required
application/x-www-form-urlencoded
Property Type Required
amount integer required
expand array optional
currency string required
metadata object optional
description string optional

Responses

default

Error response.

200

Successful response.

POST /v1/customers/{customer}/balance_transactions
GET /v1/customers/{customer}/balance_transactions/{transaction}

Retrieves a specific customer balance transaction that updated the customer’s balances.

operationId: GetCustomersCustomerBalanceTransactionsTransaction

Parameters

Name In Required Type Description
customer path required string
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/customers/{customer}/balance_transactions/{transaction}
POST /v1/customers/{customer}/balance_transactions/{transaction}

Most credit balance transaction fields are immutable, but you may update its description and metadata.

operationId: PostCustomersCustomerBalanceTransactionsTransaction

Parameters

Name In Required Type Description
customer path required string
transaction path required string

Request Body

application/x-www-form-urlencoded
Property Type Required
expand array optional
metadata object optional
description string optional

Responses

default

Error response.

200

Successful response.

POST /v1/customers/{customer}/balance_transactions/{transaction}
POST /v1/customers/{customer}/bank_accounts

When you create a new credit card, you must specify a customer or recipient on which to create it.

If the card’s owner has no default card, then the new card will become the default. However, if the owner already has a default, then it will not change. To change the default, you should update the customer to have a new default_source.

operationId: PostCustomersCustomerBankAccounts

Parameters

Name In Required Type Description
customer path required string

Request Body

application/x-www-form-urlencoded
Property Type Required
card object optional
expand array optional
source string optional
metadata object optional
bank_account object optional
alipay_account string optional

Responses

default

Error response.

200

Successful response.

POST /v1/customers/{customer}/bank_accounts
DELETE /v1/customers/{customer}/bank_accounts/{id}

Delete a specified source for a given customer.

operationId: DeleteCustomersCustomerBankAccountsId

Parameters

Name In Required Type Description
customer path required string
id path required string

Request Body

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

Responses

default

Error response.

200

Successful response.

DELETE /v1/customers/{customer}/bank_accounts/{id}
POST /v1/customers/{customer}/bank_accounts/{id}

Update a specified source for a given customer.

operationId: PostCustomersCustomerBankAccountsId

Parameters

Name In Required Type Description
customer path required string
id path required string

Request Body

application/x-www-form-urlencoded
Property Type Required
name 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
expand array optional
exp_year string optional
metadata object optional
exp_month string optional
address_zip string optional
address_city string optional
address_line1 string optional
address_line2 string optional
address_state string optional
address_country string optional
account_holder_name string optional
account_holder_type string optional

Responses

default

Error response.

200

Successful response.

POST /v1/customers/{customer}/bank_accounts/{id}
POST /v1/customers/{customer}/bank_accounts/{id}/verify

Verify a specified bank account for a given customer.

operationId: PostCustomersCustomerBankAccountsIdVerify

Parameters

Name In Required Type Description
customer path required string
id path required string

Request Body

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

Responses

default

Error response.

200

Successful response.

POST /v1/customers/{customer}/bank_accounts/{id}/verify
POST /v1/customers/{customer}/cards

When you create a new credit card, you must specify a customer or recipient on which to create it.

If the card’s owner has no default card, then the new card will become the default. However, if the owner already has a default, then it will not change. To change the default, you should update the customer to have a new default_source.

operationId: PostCustomersCustomerCards

Parameters

Name In Required Type Description
customer path required string

Request Body

application/x-www-form-urlencoded
Property Type Required
card object optional
expand array optional
source string optional
metadata object optional
bank_account object optional
alipay_account string optional

Responses

default

Error response.

200

Successful response.

POST /v1/customers/{customer}/cards
DELETE /v1/customers/{customer}/cards/{id}

Delete a specified source for a given customer.

operationId: DeleteCustomersCustomerCardsId

Parameters

Name In Required Type Description
customer path required string
id path required string

Request Body

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

Responses

default

Error response.

200

Successful response.

DELETE /v1/customers/{customer}/cards/{id}
POST /v1/customers/{customer}/cards/{id}

Update a specified source for a given customer.

operationId: PostCustomersCustomerCardsId

Parameters

Name In Required Type Description
customer path required string
id path required string

Request Body

application/x-www-form-urlencoded
Property Type Required
name 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
expand array optional
exp_year string optional
metadata object optional
exp_month string optional
address_zip string optional
address_city string optional
address_line1 string optional
address_line2 string optional
address_state string optional
address_country string optional
account_holder_name string optional
account_holder_type string optional

Responses

default

Error response.

200

Successful response.

POST /v1/customers/{customer}/cards/{id}
GET /v1/customers/{customer}/cash_balance

Retrieves a customer’s cash balance.

operationId: GetCustomersCustomerCashBalance

Parameters

Name In Required Type Description
customer 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/customers/{customer}/cash_balance
POST /v1/customers/{customer}/cash_balance

Changes the settings on a customer’s cash balance.

operationId: PostCustomersCustomerCashBalance

Parameters

Name In Required Type Description
customer path required string

Request Body

application/x-www-form-urlencoded
Property Type Required
expand array optional
settings object optional
reconciliation_mode string optional

Responses

default

Error response.

200

Successful response.

POST /v1/customers/{customer}/cash_balance
GET /v1/customers/{customer}/cash_balance_transactions

Returns a list of transactions that modified the customer’s cash balance.

operationId: GetCustomersCustomerCashBalanceTransactions

Parameters

Name In Required Type Description
customer 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/customers/{customer}/cash_balance_transactions
GET /v1/customers/{customer}/cash_balance_transactions/{transaction}

Retrieves a specific cash balance transaction, which updated the customer’s cash balance.

operationId: GetCustomersCustomerCashBalanceTransactionsTransaction

Parameters

Name In Required Type Description
customer path required string
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/customers/{customer}/cash_balance_transactions/{transaction}
Load more endpoints