Versioning | Stripe API Reference (original) (raw)

Each major release, such as Acacia, includes changes that aren’t backward-compatible with previous releases. Upgrading to a new major release can require updates to existing code. Each monthly release includes only backward-compatible changes, and uses the same name as the last major release. You can safely upgrade to a new monthly release without breaking any existing code. The current version is 2025-04-30.basil. For information on all API versions, view our API changelog.

You can upgrade your API version in Workbench. As a precaution, use API versioning to test a new API version before committing to an upgrade.


curl https://api.stripe.com/v1/charges \

  -u sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2: \

  -H "Stripe-Version: 2025-04-30.basil"

Balance

This is an object representing your Stripe balance. You can retrieve it to see the balance currently on your Stripe account.

You can also retrieve the balance history, which contains a list of transactions that contributed to the balance (charges, payouts, and so forth).

The available and pending amounts for each currency are broken down further by payment source types.

Related guide: Understanding Connect account balances

Balance Transactions

Balance transactions represent funds moving through your Stripe account. Stripe creates them for every type of transaction that enters or leaves your Stripe account balance.

Related guide: Balance transaction types

Disputes

A dispute occurs when a customer questions your charge with their card issuer. When this happens, you have the opportunity to respond to the dispute with evidence that shows that the charge is legitimate.

Related guide: Disputes and fraud

Events

Events are our way of letting you know when something interesting happens in your account. When an interesting event occurs, we create a new Event object. For example, when a charge succeeds, we create a charge.succeeded event, and when an invoice payment attempt fails, we create an invoice.payment_failed event. Certain API requests might create multiple events. For example, if you create a new subscription for a customer, you receive both a customer.subscription.created event and a charge.succeeded event.

Events occur when the state of another API resource changes. The event’s data field embeds the resource’s state at the time of the change. For example, a charge.succeeded event contains a charge, and an invoice.payment_failed event contains an invoice.

As with other API resources, you can use endpoints to retrieve an individual event or a list of events from the API. We also have a separate webhooks system for sending the Event objects directly to an endpoint on your server. You can manage webhooks in your account settings. Learn how to listen for events so that your integration can automatically trigger reactions.

When using Connect, you can also receive event notifications that occur in connected accounts. For these events, there’s an additional account attribute in the received Event object.

We only guarantee access to events through the Retrieve Event API for 30 days.

Events v2

Learn more about calling API v2 endpoints.

Events are generated to keep you informed of activity in your business account. APIs in the /v2 namespace generate thin events which have small, unversioned payloads that include a reference to the ID of the object that has changed. The Events v2 API returns these new thin events. Retrieve the event object for additional data about the event. Use the related object ID in the event payload to fetch the API resource of the object associated with the event. Comparatively, events generated by most API v1 include a versioned snapshot of an API object in their payload.

Files

This object represents files hosted on Stripe’s servers. You can upload files with the create file request (for example, when uploading dispute evidence). Stripe also creates files independently (for example, the results of a Sigma scheduled query).

Related guide: File upload guide

To share the contents of a File object with non-Stripe users, you can create a FileLink. FileLinks contain a URL that you can use to retrieve the contents of the file without authentication.

FX Quotes

The FX Quotes API provides three key functions:

Mandates

A Mandate is a record of the permission that your customer gives you to debit their payment method.

Setup Attempts

A SetupAttempt describes one attempted confirmation of a SetupIntent, whether that confirmation is successful or unsuccessful. You can use SetupAttempts to inspect details of a specific attempt at setting up a payment method using a SetupIntent.

Confirmation Token

ConfirmationTokens help transport client side data collected by Stripe JS over to your server for confirming a PaymentIntent or SetupIntent. If the confirmation is successful, values present on the ConfirmationToken are written onto the Intent.

To learn more about how to use ConfirmationToken, visit the related guides:

Tokens

Tokenization is the process Stripe uses to collect sensitive card or bank account details, or personally identifiable information (PII), directly from your customers in a secure manner. A token representing this information is returned to your server to use. Use our recommended payments integrations to perform this process on the client-side. This guarantees that no sensitive card data touches your server, and allows your integration to operate in a PCI-compliant way.

If you can’t use client-side tokenization, you can also create tokens using the API with either your publishable or secret API key. If your integration uses this method, you’re responsible for any PCI compliance that it might require, and you must keep your secret API key safe. Unlike with client-side tokenization, your customer’s information isn’t sent directly to Stripe, so we can’t determine how it’s handled or stored.

You can’t store or use tokens more than once. To store card or bank account information for later use, create Customer objects or External accounts. Radar, our integrated solution for automatic fraud protection, performs best with integrations that use client-side tokenization.

Endpoints

POST/v1/tokensPOST/v1/tokensPOST/v1/tokensPOST/v1/tokensPOST/v1/tokensPOST/v1/tokensGET/v1/tokens/:id

Cash Balance

A customer’s Cash balance represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account.

Customer Portal Session

The Billing customer portal is a Stripe-hosted UI for subscription and billing management.

A portal configuration describes the functionality and features that you want to provide to your customers through the portal.

A portal session describes the instantiation of the customer portal for a particular customer. By visiting the session’s URL, the customer can manage their subscriptions and billing details. For security reasons, sessions are short-lived and will expire if the customer does not visit the URL. Create sessions on-demand when customers intend to manage their subscriptions and billing details.

Related guide: Customer management

Invoices

Invoices are statements of amounts owed by a customer, and are either generated one-off, or generated periodically from a subscription.

They contain invoice items, and proration adjustments that may be caused by subscription upgrades/downgrades (if necessary).

If your invoice is configured to be billed through automatic charges, Stripe automatically finalizes your invoice and attempts payment. Note that finalizing the invoice, when automatic, does not happen immediately as the invoice is created. Stripe waits until one hour after the last webhook was successfully sent (or the last webhook timed out after failing). If you (and the platforms you may have connected to) have no webhooks configured, Stripe waits one hour after creation to finalize the invoice.

If your invoice is configured to be billed by sending an email, then based on your email settings, Stripe will email the invoice to your customer and await payment. These emails can contain a link to a hosted page to pay the invoice.

Stripe applies any customer credit on the account before determining the amount due for the invoice (i.e., the amount that will be actually charged). If the amount due for the invoice is less than Stripe’s minimum allowed charge per currency, the invoice is automatically marked paid, and we add the amount due to the customer’s credit balance which is applied to the next invoice.

More details on the customer’s credit balance are here.

Related guide: Send invoices to customers

Endpoints

POST/v1/invoicesPOST/v1/invoices/create_previewPOST/v1/invoices/:idGET/v1/invoices/:idGET/v1/invoicesDELETE/v1/invoices/:idPOST/v1/invoices/:id/finalizePOST/v1/invoices/:id/mark_uncollectiblePOST/v1/invoices/:id/payGET/v1/invoices/searchPOST/v1/invoices/:id/sendPOST/v1/invoices/:id/void

Meter Events

Meter events represent actions that customers take in your system. You can use meter events to bill a customer based on their usage. Meter events are associated with billing meters, which define both the contents of the event’s payload and how to aggregate those events.

Meter Events v2

Learn more about calling API v2 endpoints.

Meter events are used to report customer usage of your product or service. Meter events are associated with billing meters, which define the shape of the event’s payload and how those events are aggregated. Meter events are processed asynchronously, so they may not be immediately reflected in aggregates or on upcoming invoices.

Meter Event Adjustment

A billing meter event adjustment is a resource that allows you to cancel a meter event. For example, you might create a billing meter event adjustment to cancel a meter event that was created in error or attached to the wrong customer.

Meter Event Streams v2

Learn more about calling API v2 endpoints.

You can send a higher-throughput of meter events using meter event streams. For this flow, you must first create a meter event session, which will provide you with a session token. You can then create meter events through the meter event stream endpoint, using the session token for authentication. The session tokens are short-lived and you will need to create a new meter event session when the token expires.

Meter Event Summary

A billing meter event summary represents an aggregated view of a customer’s billing meter events within a specified timeframe. It indicates how much usage was accrued by a customer for that period.

Note: Meters events are aggregated asynchronously so the meter event summaries provide an eventually consistent view of the reported usage.

Plans

You can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.

Plans define the base price, currency, and billing cycle for recurring purchases of products. Products help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme.

For example, you might have a single “gold” product that has plans for 10/month,10/month, 10/month,100/year, €9/month, and €90/year.

Related guides: Set up a subscription and more about products and prices.

Tax IDs

Endpoints

POST/v1/customers/:id/tax_idsPOST/v1/tax_idsGET/v1/customers/:id/tax_ids/:idGET/v1/tax_ids/:idGET/v1/customers/:id/tax_idsGET/v1/tax_idsDELETE/v1/customers/:id/tax_ids/:idDELETE/v1/tax_ids/:id

Financing Summary Preview

A financing object describes an account’s current financing state. Used by Connect platforms to read the state of Capital offered to their connected accounts.

Account Links are the means by which a Connect platform grants a connected account permission to access Stripe-hosted applications, such as Connect Onboarding.

Related guide: Connect Onboarding

Account Session

An AccountSession allows a Connect platform to grant access to a connected account in Connect embedded components.

We recommend that you create an AccountSession each time you need to display an embedded component to your user. Do not save AccountSessions to your database as they expire relatively quickly, and cannot be used more than once.

Related guide: Connect embedded components

Application Fees

When you collect a transaction fee on top of a charge made for your user (using Connect), an Application Fee object is created in your account. You can list, retrieve, and refund application fees.

Related guide: Collecting application fees

Country Specs

Stripe needs to collect certain pieces of information about each account created. These requirements can differ depending on the account’s country. The Country Specs API makes these rules available to your integration.

You can also view the information from this API call as an online guide.

Person

Endpoints

POST/v1/accounts/:id/personsPOST/v1/accounts/:id/persons/:idGET/v1/accounts/:id/persons/:idGET/v1/accounts/:id/personsDELETE/v1/accounts/:id/persons/:id

Transfers

A Transfer object is created when you move funds between Stripe accounts as part of Connect.

Before April 6, 2017, transfers also represented movement of funds from a Stripe account to a card or bank account. This behavior has since been split out into a Payout object, with corresponding payout endpoints. For more information, read about the transfer/payout split.

Related guide: Creating separate charges and transfers

Secrets

Secret Store is an API that allows Stripe Apps developers to securely persist secrets for use by UI Extensions and app backends.

The primary resource in Secret Store is a secret. Other apps can’t view secrets created by an app. Additionally, secrets are scoped to provide further permission control.

All Dashboard users and the app backend share account scoped secrets. Use the account scope for secrets that don’t change per-user, like a third-party API key.

A user scoped secret is accessible by the app backend and one specific Dashboard user. Use the user scope for per-user secrets like per-user OAuth tokens, where different users might have different permissions.

Related guide: Store data between page reloads

Endpoints

GET/v1/apps/secretsPOST/v1/apps/secrets/deleteGET/v1/apps/secrets/findPOST/v1/apps/secrets

Reviews

Reviews can be used to supplement automated fraud detection with human expertise.

Learn more about Radar and reviewing payments here.

Authorizations

Endpoints

POST/v1/issuing/authorizations/:idGET/v1/issuing/authorizations/:idGET/v1/issuing/authorizationsPOST/v1/issuing/authorizations/:id/approvePOST/v1/issuing/authorizations/:id/declinePOST/v1/test_helpers/issuing/authorizationsPOST/v1/test_helpers/issuing/authorizations/:id/capturePOST/v1/test_helpers/issuing/authorizations/:id/expirePOST/v1/test_helpers/issuing/authorizations/:id/finalize_amountPOST/v1/test_helpers/issuing/authorizations/:id/incrementPOST/v1/test_helpers/issuing/authorizations/:id/fraud_challenges/respondPOST/v1/test_helpers/issuing/authorizations/:id/reverse

Cards

Endpoints

POST/v1/issuing/cardsPOST/v1/issuing/cards/:idGET/v1/issuing/cards/:idGET/v1/issuing/cardsPOST/v1/test_helpers/issuing/cards/:id/shipping/deliverPOST/v1/test_helpers/issuing/cards/:id/shipping/failPOST/v1/test_helpers/issuing/cards/:id/shipping/returnPOST/v1/test_helpers/issuing/cards/:id/shipping/shipPOST/v1/test_helpers/issuing/cards/:id/shipping/submit

Physical Bundles

A Physical Bundle represents the bundle of physical items - card stock, carrier letter, and envelope - that is shipped to a cardholder when you create a physical card.

Reader

Endpoints

POST/v1/terminal/readersPOST/v1/terminal/readers/:idGET/v1/terminal/readers/:idGET/v1/terminal/readersDELETE/v1/terminal/readers/:idPOST/v1/terminal/readers/:id/cancel_actionPOST/v1/terminal/readers/:id/collect_inputsPOST/v1/terminal/readers/:id/confirm_payment_intentPOST/v1/terminal/readers/:id/collect_payment_methodPOST/v1/terminal/readers/:id/process_payment_intentPOST/v1/terminal/readers/:id/process_setup_intentPOST/v1/terminal/readers/:id/refund_paymentPOST/v1/terminal/readers/:id/set_reader_displayPOST/v1/test_helpers/terminal/readers/:id/present_payment_method

Terminal Hardware Product Preview

A TerminalHardwareProduct is a category of hardware devices that are generally similar, but may have variations depending on the country it’s shipped to.

TerminalHardwareSKUs represent variations within the same Product (for example, a country specific device). For example, WisePOS E is a TerminalHardwareProduct and a WisePOS E - US and WisePOS E - UK are TerminalHardwareSKUs.

Terminal Hardware SKU Preview

A TerminalHardwareSKU represents a SKU for Terminal hardware. A SKU is a representation of a product available for purchase, containing information such as the name, price, and images.

Transaction Entries

TransactionEntries represent individual units of money movements within a single Transaction.

Outbound Payments

Endpoints

POST/v1/treasury/outbound_paymentsGET/v1/treasury/outbound_payments/:idGET/v1/treasury/outbound_paymentsPOST/v1/treasury/outbound_payments/:id/cancelPOST/v1/test_helpers/treasury/outbound_payments/:id/failPOST/v1/test_helpers/treasury/outbound_payments/:id/postPOST/v1/test_helpers/treasury/outbound_payments/:id/returnPOST/v1/test_helpers/treasury/outbound_payments/:id

Inbound Transfers

Endpoints

POST/v1/treasury/inbound_transfersGET/v1/treasury/inbound_transfers/:idGET/v1/treasury/inbound_transfersPOST/v1/treasury/inbound_transfers/:id/cancelPOST/v1/test_helpers/treasury/inbound_transfers/:id/failPOST/v1/test_helpers/treasury/inbound_transfers/:id/returnPOST/v1/test_helpers/treasury/inbound_transfers/:id/succeed

Scheduled Queries

If you have scheduled a Sigma query, you’ll receive a sigma.scheduled_query_run.created webhook each time the query runs. The webhook contains a ScheduledQueryRun object, which you can use to retrieve the query results.

Report Types

The Report Type resource corresponds to a particular type of report, such as the “Activity summary” or “Itemized payouts” reports. These objects are identified by an ID belonging to a set of enumerated values. See API Access to Reports documentation for those Report Type IDs, along with required and optional parameters.

Note that certain report types can only be run based on your live-mode data (not test-mode data), and will error when queried without a live-mode API key.

Session

A Financial Connections Session is the secure way to programmatically launch the client-side Stripe.js modal that lets your users link their accounts.

Verification Report

A VerificationReport is the result of an attempt to collect and verify data from a user. The collection of verification checks performed is determined from the type and options parameters used. You can find the result of each verification check performed in the appropriate sub-resource: document, id_number, selfie.

Each VerificationReport contains a copy of any data collected by the user as well as reference IDs which can be used to access collected images through the FileUpload API. To configure and create VerificationReports, use the VerificationSession API.

Related guide: Accessing verification results.

Crypto Onramp Quotes

Crypto Onramp Quotes are estimated quotes for onramp conversions into all the different cryptocurrencies on different networks. The Quotes API allows you to display quotes in your product UI before directing the user to the onramp widget.

Related guide: Quotes API

Climate Product

A Climate product represents a type of carbon removal unit available for reservation. You can retrieve it to see the current price and availability.

Forwarding Request

Instructs Stripe to make a request on your behalf using the destination URL. The destination URL is activated by Stripe at the time of onboarding. Stripe verifies requests with your credentials provided during onboarding, and injects card details from the payment_method into the request.

Stripe redacts all sensitive fields and headers, including authentication credentials and card numbers, before storing the request and response data in the forwarding Request object, which are subject to a 30-day retention period.

You can provide a Stripe idempotency key to make sure that requests with the same key result in only one outbound request. The Stripe idempotency key provided should be unique and different from any idempotency keys provided on the underlying third-party request.

Forwarding Requests are synchronous requests that return a response or time out according to Stripe’s limits.

Related guide: Forward card details to third-party API endpoints.

Endpoints

POST/v1/forwarding/requestsGET/v1/forwarding/requests/:idGET/v1/forwarding/requests