/v1/checkout/sessions/{session}
Updates a Checkout Session object.
Related guide: Dynamically update a Checkout Session
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| session | path | required | string | — |
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 |
Error response.
Successful response.
POST /v1/checkout/sessions/{session}
/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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| session | path | required | string | — |
application/x-www-form-urlencoded
| Property | Type | Required |
|---|---|---|
| expand | array | optional |
Error response.
Successful response.
POST /v1/checkout/sessions/{session}/expire
/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.
| 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. |
| session | 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/checkout/sessions/{session}/line_items
/v1/climate/orders
Lists all Climate order objects. The orders are returned sorted by creation date, with the most recently created orders appearing first.
| 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/climate/orders
/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.
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 |
Error response.
Successful response.
POST /v1/climate/orders
/v1/climate/orders/{order}
Retrieves the details of a Climate order object with the given ID.
| 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. |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/climate/orders/{order}
/v1/climate/orders/{order}
Updates the specified order by setting the values of the parameters passed.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| order | path | required | string | Unique identifier of the order. |
application/x-www-form-urlencoded
| Property | Type | Required |
|---|---|---|
| expand | array | optional |
| metadata | object | optional |
| beneficiary | object | optional |
Error response.
Successful response.
POST /v1/climate/orders/{order}
/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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| order | path | required | string | Unique identifier of the order. |
application/x-www-form-urlencoded
| Property | Type | Required |
|---|---|---|
| expand | array | optional |
Error response.
Successful response.
POST /v1/climate/orders/{order}/cancel
/v1/climate/products
Lists all available Climate product 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. |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/climate/products
/v1/climate/products/{product}
Retrieves the details of a Climate product with the given ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| expand | query | optional | array | Specifies which fields in the response should be expanded. |
| product | path | required | string | — |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/climate/products/{product}
/v1/climate/suppliers
Lists all available Climate supplier 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. |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/climate/suppliers
/v1/climate/suppliers/{supplier}
Retrieves a Climate supplier object.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| expand | query | optional | array | Specifies which fields in the response should be expanded. |
| supplier | path | required | string | — |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/climate/suppliers/{supplier}
/v1/confirmation_tokens/{confirmation_token}
Retrieves an existing ConfirmationToken object
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| confirmation_token | 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/confirmation_tokens/{confirmation_token}
/v1/country_specs
Lists all Country Spec objects available in the API.
| 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/country_specs
/v1/country_specs/{country}
Returns a Country Spec for a given Country code.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| country | 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/country_specs/{country}
/v1/coupons
Returns a list of your coupons.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| created | query | optional | A filter on the list, based on the object |
|
| 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/coupons
/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.
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 |
Error response.
Successful response.
POST /v1/coupons
/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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| coupon | path | required | string | — |
application/x-www-form-urlencoded
Error response.
Successful response.
DELETE /v1/coupons/{coupon}
/v1/coupons/{coupon}
Retrieves the coupon with the given ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| coupon | 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/coupons/{coupon}
/v1/coupons/{coupon}
Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| coupon | path | required | string | — |
application/x-www-form-urlencoded
| Property | Type | Required |
|---|---|---|
| name | string | optional |
| expand | array | optional |
| metadata | object | optional |
| currency_options | object | optional |
Error response.
Successful response.
POST /v1/coupons/{coupon}
/v1/credit_notes
Returns a list of credit notes.
| 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. |
| 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. |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/credit_notes
/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:
refund_amount) or link existing refunds (using refunds).credit_amount) which will be automatically applied to their next invoice when it’s finalized.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.
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 |
Error response.
Successful response.
POST /v1/credit_notes
/v1/credit_notes/preview
Get a preview of a credit note without creating it.
| 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 |
| 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 |
| email_type | query | optional | string | Type of email to send to the customer, one of |
| 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 |
| 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 |
| 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 |
| 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 |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/credit_notes/preview
/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.
| 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 |
| 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 |
| email_type | query | optional | string | Type of email to send to the customer, one of |
| ending_before | query | optional | string | A cursor for use in pagination. |
| 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 |
| 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 |
| 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 |
| 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 |
| starting_after | query | optional | string | A cursor for use in pagination. |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/credit_notes/preview/lines
/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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| credit_note | 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/credit_notes/{credit_note}/lines
/v1/credit_notes/{id}
Retrieves the credit note object with the given identifier.
| 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/credit_notes/{id}
/v1/credit_notes/{id}
Updates an existing credit note.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | — |
application/x-www-form-urlencoded
| Property | Type | Required |
|---|---|---|
| memo | string | optional |
| expand | array | optional |
| metadata | object | optional |
Error response.
Successful response.
POST /v1/credit_notes/{id}
/v1/credit_notes/{id}/void
Marks a credit note as void. Learn more about voiding credit notes.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | — |
application/x-www-form-urlencoded
| Property | Type | Required |
|---|---|---|
| expand | array | optional |
Error response.
Successful response.
POST /v1/credit_notes/{id}/void
/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.
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 |
Error response.
Successful response.
POST /v1/customer_sessions
/v1/customers
Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| created | query | optional | Only return customers that were created during the given date interval. |
|
| query | optional | string | A case-sensitive filter on the list based on the customer’s |
|
| 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. |
| 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. |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/customers
/v1/customers
Creates a new customer object.
application/x-www-form-urlencoded
| Property | Type | Required |
|---|---|---|
| tax | object | optional |
| └ ip_address | object | optional |
| └ validate_location | string | optional |
| name | string | optional |
| 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 |
Error response.
Successful response.
POST /v1/customers
/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.
| 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. |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/customers/search
/v1/customers/{customer}
Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| customer | path | required | string | — |
application/x-www-form-urlencoded
Error response.
Successful response.
DELETE /v1/customers/{customer}
/v1/customers/{customer}
Retrieves a Customer object.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| customer | 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/customers/{customer}
/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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| customer | path | required | string | — |
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 |
| 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 |
Error response.
Successful response.
POST /v1/customers/{customer}
/v1/customers/{customer}/balance_transactions
Returns a list of transactions that updated the customer’s balances.
| 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. |
| 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. |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/customers/{customer}/balance_transactions
/v1/customers/{customer}/balance_transactions
Creates an immutable transaction that updates the customer’s credit balance.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| customer | path | required | string | — |
application/x-www-form-urlencoded
| Property | Type | Required |
|---|---|---|
| amount | integer | required |
| expand | array | optional |
| currency | string | required |
| metadata | object | optional |
| description | string | optional |
Error response.
Successful response.
POST /v1/customers/{customer}/balance_transactions
/v1/customers/{customer}/balance_transactions/{transaction}
Retrieves a specific customer balance transaction that updated the customer’s balances.
| 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 | — |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/customers/{customer}/balance_transactions/{transaction}
/v1/customers/{customer}/balance_transactions/{transaction}
Most credit balance transaction fields are immutable, but you may update its description and metadata.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| customer | path | required | string | — |
| transaction | path | required | string | — |
application/x-www-form-urlencoded
| Property | Type | Required |
|---|---|---|
| expand | array | optional |
| metadata | object | optional |
| description | string | optional |
Error response.
Successful response.
POST /v1/customers/{customer}/balance_transactions/{transaction}
/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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| customer | path | required | string | — |
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 |
Error response.
Successful response.
POST /v1/customers/{customer}/bank_accounts
/v1/customers/{customer}/bank_accounts/{id}
Delete a specified source for a given customer.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| customer | path | required | string | — |
| id | path | required | string | — |
application/x-www-form-urlencoded
| Property | Type | Required |
|---|---|---|
| expand | array | optional |
Error response.
Successful response.
DELETE /v1/customers/{customer}/bank_accounts/{id}
/v1/customers/{customer}/bank_accounts/{id}
Update a specified source for a given customer.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| customer | path | required | string | — |
| id | path | required | string | — |
application/x-www-form-urlencoded
| Property | Type | Required |
|---|---|---|
| name | 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 |
| 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 |
Error response.
Successful response.
POST /v1/customers/{customer}/bank_accounts/{id}
/v1/customers/{customer}/bank_accounts/{id}/verify
Verify a specified bank account for a given customer.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| customer | path | required | string | — |
| id | path | required | string | — |
application/x-www-form-urlencoded
| Property | Type | Required |
|---|---|---|
| expand | array | optional |
| amounts | array | optional |
Error response.
Successful response.
POST /v1/customers/{customer}/bank_accounts/{id}/verify
/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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| customer | path | required | string | — |
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 |
Error response.
Successful response.
POST /v1/customers/{customer}/cards
/v1/customers/{customer}/cards/{id}
Delete a specified source for a given customer.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| customer | path | required | string | — |
| id | path | required | string | — |
application/x-www-form-urlencoded
| Property | Type | Required |
|---|---|---|
| expand | array | optional |
Error response.
Successful response.
DELETE /v1/customers/{customer}/cards/{id}
/v1/customers/{customer}/cards/{id}
Update a specified source for a given customer.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| customer | path | required | string | — |
| id | path | required | string | — |
application/x-www-form-urlencoded
| Property | Type | Required |
|---|---|---|
| name | 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 |
| 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 |
Error response.
Successful response.
POST /v1/customers/{customer}/cards/{id}
/v1/customers/{customer}/cash_balance
Retrieves a customer’s cash balance.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| customer | 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/customers/{customer}/cash_balance
/v1/customers/{customer}/cash_balance
Changes the settings on a customer’s cash balance.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| customer | path | required | string | — |
application/x-www-form-urlencoded
| Property | Type | Required |
|---|---|---|
| expand | array | optional |
| settings | object | optional |
| └ reconciliation_mode | string | optional |
Error response.
Successful response.
POST /v1/customers/{customer}/cash_balance
/v1/customers/{customer}/cash_balance_transactions
Returns a list of transactions that modified the customer’s cash balance.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| customer | 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/customers/{customer}/cash_balance_transactions
/v1/customers/{customer}/cash_balance_transactions/{transaction}
Retrieves a specific cash balance transaction, which updated the customer’s cash balance.
| 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 | — |
application/x-www-form-urlencoded
Error response.
Successful response.
GET /v1/customers/{customer}/cash_balance_transactions/{transaction}