just/mocks_
mockzilla.org →
Catalog /ecommerce /Stripe API

Stripe API

PROVIDER · Stripe SPEC v2026-01-28.clover · OpenAPI 3.0.0 MOCK · LIVE
▸ TRY IT
https://api.justmocks.com/stripe
Open mock →

Mock the Stripe API for payments, subscriptions, and invoicing without test keys, webhooks, or rate limits.

[01]

About

overview

Emulate the core Stripe REST API end-to-end: PaymentIntents, Charges, Customers, PaymentMethods, Checkout Sessions, Setup Intents, Refunds, Disputes, Subscriptions, Invoices, Products, Prices, Coupons, Promotion Codes, Payment Links, Payouts, Balance, Events, and Webhook Endpoints. 187 endpoints across 23 resources, fully self-contained, no Stripe test mode required. Out of the box you get resource-prefixed IDs (cus_, pi_, ch_, sub_, in_, prod_, price_, pm_), USD/cents semantics, lowercase currency codes, and livemode=false, so you can wire your frontend or integration tests against realistic Stripe-shaped responses without touching the real API.

Endpoints
187 across 0 resource groups
Methods
GET 81 · POST 89 · DEL 17 none deprecated
OpenAPI
3.0.0 spec version 2026-01-28.clover
Source spec
3029 KB · YAML
[02]

Endpoints

187 operations · 0 resource groups
GET /v1/balance
Retrieve balance
Retrieves the current account balance, based on the authentication that was used to make the request. For a sample request, see Accounting for negative balances.
GET /v1/balance/history
List all balance transactions
Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first. Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.
GET /v1/balance/history/{id}
Retrieve a balance transaction
Retrieves the balance transaction with the given ID. Note that this endpoint previously used the path /v1/balance/history/:id.
GET /v1/balance_transactions
List all balance transactions
Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first. Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.
GET /v1/balance_transactions/{id}
Retrieve a balance transaction
Retrieves the balance transaction with the given ID. Note that this endpoint previously used the path /v1/balance/history/:id.
GET /v1/charges
List all charges
Returns a list of charges you’ve previously created. The charges are returned in sorted order, with the most recent charges appearing first.
POST /v1/charges
This method is no longer recommended—use the Payment Intents API to initiate a new payment instead. Confirmation of the PaymentIntent creates the Charge object used to request payment.
GET /v1/charges/search
Search charges
Search for charges 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.
GET /v1/charges/{charge}
Retrieve a charge
Retrieves the details of a charge that has previously been created. Supply the unique charge ID that was returned from your previous request, and Stripe will return the corresponding charge information. The same information is returned when creating or refunding the charge. Available as a Mockzilla mock endpoint.
POST /v1/charges/{charge}
Update a charge
Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
POST /v1/charges/{charge}/capture
Capture a payment
Capture the payment of an existing, uncaptured charge that was created with the capture option set to false. Uncaptured payments expire a set number of days after they are created (7 by default), after which they are marked as refunded and capture attempts will fail. Don’t use this method to capture a PaymentIntent-initiated charge. Use Capture a PaymentIntent.
GET /v1/charges/{charge}/dispute
Retrieve a dispute for a specified charge.
POST /v1/charges/{charge}/dispute
POST /v1/charges/{charge}/dispute/close
POST /v1/charges/{charge}/refund
Create a refund
When you create a new refund, you must specify either a Charge or a PaymentIntent object. This action refunds a previously created charge that’s not refunded yet. Funds are refunded to the credit or debit card that’s originally charged. You can optionally refund only part of a charge. You can repeat this until the entire charge is refunded. After you entirely refund a charge, you can’t refund it again. This method raises an error when it’s called on an already-refunded charge, or when you attempt to refund more money than is left on a charge.
GET /v1/charges/{charge}/refunds
List all refunds
You can see a list of the refunds belonging to a specific charge. Note that the 10 most recent refunds are always available by default on the charge object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds. Mockzilla mock: no signup, no API key.
POST /v1/charges/{charge}/refunds
Create customer balance refund
When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it. Creating a new refund will refund a charge that has previously been created but not yet refunded. Funds will be refunded to the credit or debit card that was originally charged. You can optionally refund only part of a charge. You can do so multiple times, until the entire charge has been refunded. Once entirely refunded, a charge can’t be refunded again. This method will raise an error when called on an already-refunded charge, or when trying to refund more money than is left on a charge.
GET /v1/charges/{charge}/refunds/{refund}
Retrieves the details of an existing refund.
POST /v1/charges/{charge}/refunds/{refund}
Update a specified refund.
GET /v1/checkout/sessions
List all Checkout Sessions
Returns a list of Checkout Sessions.
POST /v1/checkout/sessions
Create a Checkout Session
Creates a Checkout Session object. Served by the Mockzilla mock runtime.
GET /v1/checkout/sessions/{session}
Retrieve a Checkout Session
Retrieves a Checkout Session object.
POST /v1/checkout/sessions/{session}
Update a Checkout Session
Updates a Checkout Session object. Related guide: Dynamically update Checkout
POST /v1/checkout/sessions/{session}/expire
Expire a Checkout Session
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.
GET /v1/checkout/sessions/{session}/line_items
Retrieve a Checkout Session's 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.
GET /v1/coupons
List all coupons
Returns a list of your coupons.
POST /v1/coupons
Create a coupon
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.
DEL /v1/coupons/{coupon}
Delete a 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.
GET /v1/coupons/{coupon}
Retrieve a coupon
Retrieves the coupon with the given ID. Served by the Mockzilla mock runtime.
POST /v1/coupons/{coupon}
Update a coupon
Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable.
GET /v1/customers
List all customers
Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first.
POST /v1/customers
Create a customer
Creates a new customer object.
GET /v1/customers/search
Search customers
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.
DEL /v1/customers/{customer}
Delete a customer
Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer.
GET /v1/customers/{customer}
Retrieve a customer
Retrieves a Customer object. Mockzilla mock: no signup, no API key.
POST /v1/customers/{customer}
Update a customer
Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. For example, if you pass the source parameter, that becomes the customer’s active source (e.g., 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 will be retried. This retry will not count as an automatic retry, and will not affect the next regularly scheduled payment for the invoice. Changing the default_source for a customer will not trigger this behavior. This request accepts mostly the same arguments as the customer creation call.
GET /v1/customers/{customer}/balance_transactions
List customer balance transactions
Returns a list of transactions that updated the customer’s balances.
POST /v1/customers/{customer}/balance_transactions
Create a customer balance transaction
Creates an immutable transaction that updates the customer’s credit balance.
GET /v1/customers/{customer}/balance_transactions/{transaction}
Retrieve a customer balance transaction
Retrieves a specific customer balance transaction that updated the customer’s balances.
POST /v1/customers/{customer}/balance_transactions/{transaction}
Update a customer credit balance transaction
Most credit balance transaction fields are immutable, but you may update its description and metadata. Served by the Mockzilla mock runtime.
GET /v1/customers/{customer}/bank_accounts
List all bank accounts
You can see a list of the bank accounts belonging to a Customer. Note that the 10 most recent sources are always available by default on the Customer. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional bank accounts.
POST /v1/customers/{customer}/bank_accounts
Create a card
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.
DEL /v1/customers/{customer}/bank_accounts/{id}
Delete a customer source
Delete a specified source for a given customer.
GET /v1/customers/{customer}/bank_accounts/{id}
Retrieve a bank account
By default, you can see the 10 most recent sources stored on a Customer directly on the object, but you can also retrieve details about a specific bank account stored on the Stripe account.
POST /v1/customers/{customer}/bank_accounts/{id}
Update a specified source for a given customer. Mocked via Mockzilla.
POST /v1/customers/{customer}/bank_accounts/{id}/verify
Verify a bank account
Verify a specified bank account for a given customer.
GET /v1/customers/{customer}/cards
List all cards
You can see a list of the cards belonging to a customer. Note that the 10 most recent sources are always available on the Customer object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional cards.
POST /v1/customers/{customer}/cards
Create a card
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.
DEL /v1/customers/{customer}/cards/{id}
Delete a customer source
Delete a specified source for a given customer.
GET /v1/customers/{customer}/cards/{id}
Retrieve a card
You can always see the 10 most recent cards directly on a customer; this method lets you retrieve details about a specific card stored on the customer. Available as a Mockzilla mock endpoint.
POST /v1/customers/{customer}/cards/{id}
Update a specified source for a given customer.
GET /v1/customers/{customer}/cash_balance
Retrieve a cash balance
Retrieves a customer’s cash balance.
POST /v1/customers/{customer}/cash_balance
Update a cash balance's settings
Changes the settings on a customer’s cash balance.
GET /v1/customers/{customer}/cash_balance_transactions
List cash balance transactions
Returns a list of transactions that modified the customer’s cash balance.
GET /v1/customers/{customer}/cash_balance_transactions/{transaction}
Retrieve a cash balance transaction
Retrieves a specific cash balance transaction, which updated the customer’s cash balance. Mockzilla mock: no signup, no API key.
DEL /v1/customers/{customer}/discount
Delete a customer discount
Removes the currently applied discount on a customer.
GET /v1/customers/{customer}/discount
POST /v1/customers/{customer}/funding_instructions
Create or retrieve funding instructions for a customer cash balance
Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new funding instructions will be created. If funding instructions have already been created for a given customer, the same funding instructions will be retrieved. In other words, we will return the same funding instructions each time.
GET /v1/customers/{customer}/payment_methods
List a Customer's PaymentMethods
Returns a list of PaymentMethods for a given Customer
GET /v1/customers/{customer}/payment_methods/{payment_method}
Retrieve a Customer's PaymentMethod
Retrieves a PaymentMethod object for a given Customer.
GET /v1/customers/{customer}/sources
List sources for a specified customer. Served by the Mockzilla mock runtime.
POST /v1/customers/{customer}/sources
Create a card
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.
DEL /v1/customers/{customer}/sources/{id}
Delete a customer source
Delete a specified source for a given customer.
GET /v1/customers/{customer}/sources/{id}
Retrieve a specified source for a given customer.
POST /v1/customers/{customer}/sources/{id}
Update a specified source for a given customer.
POST /v1/customers/{customer}/sources/{id}/verify
Verify a bank account
Verify a specified bank account for a given customer. Mocked via Mockzilla.
GET /v1/customers/{customer}/subscriptions
List active subscriptions
You can see a list of the customer’s active subscriptions. Note that the 10 most recent active subscriptions are always available by default on the customer object. If you need more than those 10, you can use the limit and starting_after parameters to page through additional subscriptions.
POST /v1/customers/{customer}/subscriptions
Create a subscription
Creates a new subscription on an existing customer.
DEL /v1/customers/{customer}/subscriptions/{subscription_exposed_id}
Cancel a subscription
Cancels a customer’s subscription. If you set the at_period_end parameter to true, the subscription will remain active until the end of the period, at which point it will be canceled and not renewed. Otherwise, with the default false value, the subscription is terminated immediately. In either case, the customer will not be charged again for the subscription. Note, however, that any pending invoice items that you’ve created will still be charged for at the end of the period, unless manually deleted. If you’ve set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed. By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.
GET /v1/customers/{customer}/subscriptions/{subscription_exposed_id}
Retrieve a subscription
Retrieves the subscription with the given ID.
POST /v1/customers/{customer}/subscriptions/{subscription_exposed_id}
Update a subscription on a customer
Updates an existing subscription on a customer to match the specified parameters. When changing plans or quantities, we will optionally prorate the price we charge next month to make up for any price changes. To preview how the proration will be calculated, use the upcoming invoice endpoint. Available as a Mockzilla mock endpoint.
DEL /v1/customers/{customer}/subscriptions/{subscription_exposed_id}/discount
Delete a customer discount
Removes the currently applied discount on a customer.
GET /v1/customers/{customer}/subscriptions/{subscription_exposed_id}/discount
GET /v1/customers/{customer}/tax_ids
List all Customer tax IDs
Returns a list of tax IDs for a customer.
POST /v1/customers/{customer}/tax_ids
Create a Customer tax ID
Creates a new tax_id object for a customer.
DEL /v1/customers/{customer}/tax_ids/{id}
Delete a Customer tax ID
Deletes an existing tax_id object.
GET /v1/customers/{customer}/tax_ids/{id}
Retrieve a Customer tax ID
Retrieves the tax_id object with the given identifier. Mockzilla mock: no signup, no API key.
GET /v1/disputes
List all disputes
Returns a list of your disputes.
GET /v1/disputes/{dispute}
Retrieve a dispute
Retrieves the dispute with the given ID.
POST /v1/disputes/{dispute}
Update a dispute
When you get a dispute, contacting your customer is always the best first step. If that doesn’t work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your dashboard, but if you prefer, you can use the API to submit evidence programmatically. Depending on your dispute type, different evidence fields will give you a better chance of winning your dispute. To figure out which evidence fields to provide, see our guide to dispute types.
POST /v1/disputes/{dispute}/close
Close a dispute
Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost. The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible.
GET /v1/events
List all events
List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in event object api_version attribute (not according to your current Stripe API version or Stripe-Version header).
GET /v1/events/{id}
Retrieve an event
Retrieves the details of an event if it was created in the last 30 days. Supply the unique identifier of the event, which you might have received in a webhook.
GET /v1/invoiceitems
List all invoice items
Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first.
POST /v1/invoiceitems
Create an invoice item
Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified.
DEL /v1/invoiceitems/{invoiceitem}
Delete an invoice item
Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they’re not attached to invoices, or if it’s attached to a draft invoice. Available as a Mockzilla mock endpoint.
GET /v1/invoiceitems/{invoiceitem}
Retrieve an invoice item
Retrieves the invoice item with the given ID.
POST /v1/invoiceitems/{invoiceitem}
Update an invoice item
Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it’s attached to is closed.
GET /v1/invoices
List all invoices
You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first.
POST /v1/invoices
Create an invoice
This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.
POST /v1/invoices/create_preview
Create a preview invoice
At any time, you can preview the upcoming invoice for a subscription or subscription schedule. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice. You can also preview the effects of creating or updating a subscription or subscription schedule, including a preview of any prorations that will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the subscription_details.proration_date parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed on the invoice is to consider line items where parent.subscription_item_details.proration is true. Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer’s discount. Note: Currency conversion calculations use the latest exchange rates. Exchange rates may vary between the time of the preview and the time of the actual invoice creation. Learn more. Mockzilla mock: no signup, no API key.
GET /v1/invoices/search
Search invoices
Search for invoices 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.
DEL /v1/invoices/{invoice}
Delete a draft invoice
Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be voided.
GET /v1/invoices/{invoice}
Retrieve an invoice
Retrieves the invoice with the given ID.
POST /v1/invoices/{invoice}
Update an invoice
Draft invoices are fully editable. Once an invoice is finalized, monetary values, as well as collection_method, become uneditable. If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on, sending reminders for, or automatically reconciling invoices, pass auto_advance=false.
POST /v1/invoices/{invoice}/add_lines
Bulk add invoice line items
Adds multiple line items to an invoice. This is only possible when an invoice is still a draft. Served by the Mockzilla mock runtime.
POST /v1/invoices/{invoice}/attach_payment
Attach a payment to an Invoice
Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments. For the PaymentIntent, when the PaymentIntent’s status changes to succeeded, the payment is credited to the invoice, increasing its amount_paid. When the invoice is fully paid, the invoice’s status becomes paid. If the PaymentIntent’s status is already succeeded when it’s attached, it’s credited to the invoice immediately. See: Partial payments to learn more.
POST /v1/invoices/{invoice}/finalize
Finalize an invoice
Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you’d like to finalize a draft invoice manually, you can do so using this method.
GET /v1/invoices/{invoice}/lines
Retrieve an invoice's line items
When retrieving an invoice, you’ll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
POST /v1/invoices/{invoice}/lines/{line_item_id}
Update an invoice's line item
Updates an invoice’s line item. Some fields, such as tax_amounts, only live on the invoice line item, so they can only be updated through this endpoint. Other fields, such as amount, live on both the invoice item and the invoice line item, so updates on this endpoint will propagate to the invoice item as well. Updating an invoice’s line item is only possible before the invoice is finalized.
POST /v1/invoices/{invoice}/mark_uncollectible
Mark an invoice as uncollectible
Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes. Mocked via Mockzilla.
POST /v1/invoices/{invoice}/pay
Pay an invoice
Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your subscriptions settings. However, if you’d like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so.
POST /v1/invoices/{invoice}/remove_lines
Bulk remove invoice line items
Removes multiple line items from an invoice. This is only possible when an invoice is still a draft.
POST /v1/invoices/{invoice}/send
Send an invoice for manual payment
Stripe will automatically send invoices to customers according to your subscriptions settings. However, if you’d like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email. Requests made in test-mode result in no emails being sent, despite sending an invoice.sent event.
POST /v1/invoices/{invoice}/update_lines
Bulk update invoice line items
Updates multiple line items on an invoice. This is only possible when an invoice is still a draft.
POST /v1/invoices/{invoice}/void
Void an invoice
Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to deletion, however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found. Consult with local regulations to determine whether and how an invoice might be amended, canceled, or voided in the jurisdiction you’re doing business in. You might need to issue another invoice or credit note instead. Stripe recommends that you consult with your legal counsel for advice specific to your business. Available as a Mockzilla mock endpoint.
GET /v1/payment_intents
List all PaymentIntents
Returns a list of PaymentIntents.
POST /v1/payment_intents
Create a PaymentIntent
Creates a PaymentIntent object. After the PaymentIntent is created, attach a payment method and confirm to continue the payment. Learn more about the available payment flows with the Payment Intents API. When you use confirm=true during creation, it’s equivalent to creating and confirming the PaymentIntent in the same call. You can use any parameters available in the confirm API when you supply confirm=true.
GET /v1/payment_intents/search
Search PaymentIntents
Search for PaymentIntents 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. Mockzilla mock: no signup, no API key.
GET /v1/payment_intents/{intent}
Retrieve a PaymentIntent
Retrieves the details of a PaymentIntent that has previously been created. You can retrieve a PaymentIntent client-side using a publishable key when the client_secret is in the query string. If you retrieve a PaymentIntent with a publishable key, it only returns a subset of properties. Refer to the payment intent object reference for more details.
POST /v1/payment_intents/{intent}
Update a PaymentIntent
Updates properties on a PaymentIntent object without confirming. Depending on which properties you update, you might need to confirm the PaymentIntent again. For example, updating the payment_method always requires you to confirm the PaymentIntent again. If you prefer to update and confirm at the same time, we recommend updating properties through the confirm API instead.
GET /v1/payment_intents/{intent}/amount_details_line_items
List all PaymentIntent LineItems
Lists all LineItems of a given PaymentIntent.
POST /v1/payment_intents/{intent}/apply_customer_balance
Reconcile a customer_balance PaymentIntent
Manually reconcile the remaining amount for a customer_balance PaymentIntent.
POST /v1/payment_intents/{intent}/cancel
Cancel a PaymentIntent
You can cancel a PaymentIntent object when it’s in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action or, in rare cases, processing. After it’s canceled, no additional charges are made by the PaymentIntent and any operations on the PaymentIntent fail with an error. For PaymentIntents with a status of requires_capture, the remaining amount_capturable is automatically refunded. You can’t cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session instead. Served by the Mockzilla mock runtime.
POST /v1/payment_intents/{intent}/capture
Capture a PaymentIntent
Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture. Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their creation. Learn more about separate authorization and capture.
POST /v1/payment_intents/{intent}/confirm
Confirm a PaymentIntent
Confirm that your customer intends to pay with current or provided payment method. Upon confirmation, the PaymentIntent will attempt to initiate a payment. If the selected payment method requires additional authentication steps, the PaymentIntent will transition to the requires_action status and suggest additional actions via next_action. If payment fails, the PaymentIntent transitions to the requires_payment_method status or the canceled status if the confirmation limit is reached. If payment succeeds, the PaymentIntent will transition to the succeeded status (or requires_capture, if capture_method is set to manual). If the confirmation_method is automatic, payment may be attempted using our client SDKs and the PaymentIntent’s client_secret. After next_actions are handled by the client, no additional confirmation is required to complete the payment. If the confirmation_method is manual, all payment attempts must be initiated using a secret key. If any actions are required for the payment, the PaymentIntent will return to the requires_confirmation state after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. There is a variable upper limit on how many times a PaymentIntent can be confirmed. After this limit is reached, any further calls to this endpoint will transition the PaymentIntent to the canceled state.
POST /v1/payment_intents/{intent}/increment_authorization
Increment an authorization
Perform an incremental authorization on an eligible PaymentIntent. To be eligible, the PaymentIntent’s status must be requires_capture and incremental_authorization_supported must be true. Incremental authorizations attempt to increase the authorized amount on your customer’s card to the new, higher amount provided. Similar to the initial authorization, incremental authorizations can be declined. A single PaymentIntent can call this endpoint multiple times to further increase the authorized amount. If the incremental authorization succeeds, the PaymentIntent object returns with the updated amount. If the incremental authorization fails, a card_declined error returns, and no other fields on the PaymentIntent or Charge update. The PaymentIntent object remains capturable for the previously authorized amount. Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines. After it’s captured, a PaymentIntent can no longer be incremented. Learn more about incremental authorizations.
POST /v1/payment_intents/{intent}/verify_microdeposits
Verify microdeposits on a PaymentIntent
Verifies microdeposits on a PaymentIntent object.
GET /v1/payment_links
List all payment links
Returns a list of your payment links. Mocked via Mockzilla.
POST /v1/payment_links
Create a payment link
Creates a payment link.
GET /v1/payment_links/{payment_link}
Retrieve payment link
Retrieve a payment link.
POST /v1/payment_links/{payment_link}
Update a payment link
Updates a payment link.
GET /v1/payment_links/{payment_link}/line_items
Retrieve a payment link's line items
When retrieving a payment link, 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.
GET /v1/payment_methods
List PaymentMethods
Returns a list of all PaymentMethods.
POST /v1/payment_methods
Shares a PaymentMethod
Creates a PaymentMethod object. Read the Stripe.js reference to learn how to create PaymentMethods via Stripe.js. Instead of creating a PaymentMethod directly, we recommend using the PaymentIntents API to accept a payment immediately or the SetupIntent API to collect payment method details ahead of a future payment. Served by the Mockzilla mock runtime.
GET /v1/payment_methods/{payment_method}
Retrieve a PaymentMethod
Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method attached to a Customer, you should use Retrieve a Customer’s PaymentMethods
POST /v1/payment_methods/{payment_method}
Update a PaymentMethod
Updates a PaymentMethod object. A PaymentMethod must be attached to a customer to be updated.
POST /v1/payment_methods/{payment_method}/attach
Attach a PaymentMethod to a Customer
Attaches a PaymentMethod object to a Customer. To attach a new PaymentMethod to a customer for future payments, we recommend you use a SetupIntent or a PaymentIntent with setup_future_usage. These approaches will perform any necessary steps to set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach endpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for future use, which makes later declines and payment friction more likely. See Optimizing cards for future payments for more information about setting up future payments. To use this PaymentMethod as the default for invoice or subscription payments, set invoice_settings.default_payment_method, on the Customer to the PaymentMethod’s ID.
POST /v1/payment_methods/{payment_method}/detach
Detach a PaymentMethod from a Customer
Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer.
GET /v1/payouts
List all payouts
Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe sent to you. The payouts return in sorted order, with the most recently created payouts appearing first.
POST /v1/payouts
Create a payout
To send funds to your own bank account, create a new payout object. Your Stripe balance must cover the payout amount. If it doesn’t, you receive an “Insufficient Funds” error. If your API key is in test mode, money won’t actually be sent, though every other action occurs as if you’re in live mode. If you create a manual payout on a Stripe account that uses multiple payment source types, you need to specify the source type balance that the payout draws from. The balance object details available and pending amounts by source type.
GET /v1/payouts/{payout}
Retrieve a payout
Retrieves the details of an existing payout. Supply the unique payout ID from either a payout creation request or the payout list. Stripe returns the corresponding payout information. Mockzilla mock: no signup, no API key.
POST /v1/payouts/{payout}
Update a payout
Updates the specified payout by setting the values of the parameters you pass. We don’t change parameters that you don’t provide. This request only accepts the metadata as arguments.
POST /v1/payouts/{payout}/cancel
Cancel a payout
You can cancel a previously created payout if its status is pending. Stripe refunds the funds to your available balance. You can’t cancel automatic Stripe payouts.
POST /v1/payouts/{payout}/reverse
Reverse a payout
Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US and Canadian bank accounts. If the payout is manual and in the pending status, use /v1/payouts/:id/cancel instead. By requesting a reversal through /v1/payouts/:id/reverse, you confirm that the authorized signatory of the selected bank account authorizes the debit on the bank account and that no other authorization is required.
GET /v1/prices
List all prices
Returns a list of your active prices, excluding inline prices. For the list of inactive prices, set active to false.
POST /v1/prices
Create a price
Creates a new Price for an existing Product. The Price can be recurring or one-time. Mocked via Mockzilla.
GET /v1/prices/search
Search prices
Search for prices 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.
GET /v1/prices/{price}
Retrieve a price
Retrieves the price with the given ID.
POST /v1/prices/{price}
Update a price
Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.
GET /v1/products
List all products
Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first.
POST /v1/products
Create a product
Creates a new product object. Available as a Mockzilla mock endpoint.
GET /v1/products/search
Search products
Search for products 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.
DEL /v1/products/{id}
Delete a product
Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it.
GET /v1/products/{id}
Retrieve a product
Retrieves the details of an existing product. Supply the unique product ID from either a product creation request or the product list, and Stripe will return the corresponding product information.
POST /v1/products/{id}
Update a product
Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
GET /v1/products/{product}/features
List all features attached to a product
Retrieve a list of features for a product. Mockzilla mock: no signup, no API key.
POST /v1/products/{product}/features
Attach a feature to a product
Creates a product_feature, which represents a feature attachment to a product
DEL /v1/products/{product}/features/{id}
Remove a feature from a product
Deletes the feature attachment to a product
GET /v1/products/{product}/features/{id}
Retrieve a product_feature
Retrieves a product_feature, which represents a feature attachment to a product
GET /v1/promotion_codes
List all promotion codes
Returns a list of your promotion codes.
POST /v1/promotion_codes
Create a promotion code
A promotion code points to an underlying promotion. You can optionally restrict the code to a specific customer, redemption limit, and expiration date. Served by the Mockzilla mock runtime.
GET /v1/promotion_codes/{promotion_code}
Retrieve a promotion code
Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use list with the desired code.
POST /v1/promotion_codes/{promotion_code}
Update a promotion code
Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.
GET /v1/refunds
List all refunds
Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent refunds appearing first. The 10 most recent refunds are always available by default on the Charge object.
POST /v1/refunds
Create customer balance refund
When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it. Creating a new refund will refund a charge that has previously been created but not yet refunded. Funds will be refunded to the credit or debit card that was originally charged. You can optionally refund only part of a charge. You can do so multiple times, until the entire charge has been refunded. Once entirely refunded, a charge can’t be refunded again. This method will raise an error when called on an already-refunded charge, or when trying to refund more money than is left on a charge. Mocked via Mockzilla.
GET /v1/refunds/{refund}
Retrieve a refund
Retrieves the details of an existing refund.
POST /v1/refunds/{refund}
Update a refund
Updates the refund that you specify by setting the values of the passed parameters. Any parameters that you don’t provide remain unchanged. This request only accepts metadata as an argument.
POST /v1/refunds/{refund}/cancel
Cancel a refund
Cancels a refund with a status of requires_action. You can’t cancel refunds in other states. Only refunds for payment methods that require customer action can enter the requires_action state.
GET /v1/setup_intents
List all SetupIntents
Returns a list of SetupIntents.
POST /v1/setup_intents
Create a SetupIntent
Creates a SetupIntent object. After you create the SetupIntent, attach a payment method and confirm it to collect any required permissions to charge the payment method later.
GET /v1/setup_intents/{intent}
Retrieve a SetupIntent
Retrieves the details of a SetupIntent that has previously been created. Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string. When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the SetupIntent object reference for more details. Served by the Mockzilla mock runtime.
POST /v1/setup_intents/{intent}
Update a SetupIntent
Updates a SetupIntent object.
POST /v1/setup_intents/{intent}/cancel
Cancel a SetupIntent
You can cancel a SetupIntent object when it’s in one of these statuses: requires_payment_method, requires_confirmation, or requires_action. After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. You can’t cancel the SetupIntent for a Checkout Session. Expire the Checkout Session instead.
POST /v1/setup_intents/{intent}/confirm
Confirm a SetupIntent
Confirm that your customer intends to set up the current or provided payment method. For example, you would confirm a SetupIntent when a customer hits the “Save” button on a payment method management page on your website. If the selected payment method does not require any additional steps from the customer, the SetupIntent will transition to the succeeded status. Otherwise, it will transition to the requires_action status and suggest additional actions via next_action. If setup fails, the SetupIntent will transition to the requires_payment_method status or the canceled status if the confirmation limit is reached.
POST /v1/setup_intents/{intent}/verify_microdeposits
Verify microdeposits on a SetupIntent
Verifies microdeposits on a SetupIntent object.
GET /v1/subscription_items
List all subscription items
Returns a list of your subscription items for a given subscription.
POST /v1/subscription_items
Create a subscription item
Adds a new item to an existing subscription. No existing items will be changed or replaced. Served by the Mockzilla mock runtime.
DEL /v1/subscription_items/{item}
Delete a subscription item
Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.
GET /v1/subscription_items/{item}
Retrieve a subscription item
Retrieves the subscription item with the given ID.
POST /v1/subscription_items/{item}
Update a subscription item
Updates the plan or quantity of an item on a current subscription.
GET /v1/subscriptions
List subscriptions
By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled. Available as a Mockzilla mock endpoint.
POST /v1/subscriptions
Create a subscription
Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions. When you create a subscription with collection_method=charge_automatically, the first invoice is finalized as part of the request. The payment_behavior parameter determines the exact behavior of the initial payment. To start subscriptions where the first invoice always begins in a draft status, use subscription schedules instead. Schedules provide the flexibility to model more complex billing configurations that change over time.
GET /v1/subscriptions/search
Search subscriptions
Search for subscriptions you’ve previously created using Stripe’s Search Query Language. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.
DEL /v1/subscriptions/{subscription_exposed_id}
Cancel a subscription
Cancels a customer’s subscription immediately. The customer won’t be charged again for the subscription. After it’s canceled, you can no longer update the subscription or its metadata. Any pending invoice items that you’ve created are still charged at the end of the period, unless manually deleted. If you’ve set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed if invoice_now and prorate are both set to true. By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.
GET /v1/subscriptions/{subscription_exposed_id}
Retrieve a subscription
Retrieves the subscription with the given ID.
POST /v1/subscriptions/{subscription_exposed_id}
Update a subscription
Updates an existing subscription to match the specified parameters. When changing prices or quantities, we optionally prorate the price we charge next month to make up for any price changes. To preview how the proration is calculated, use the create preview endpoint. By default, we prorate subscription changes. For example, if a customer signs up on May 1 for a 100 price, they’ll be billed 100 immediately. If on May 15 they switch to a 200 price, then on June 1 they’ll be billed 250 (200 for a renewal of her subscription, plus a 50 prorating adjustment for half of the previous month’s 100 difference). Similarly, a downgrade generates a credit that is applied to the next invoice. We also prorate when you make quantity changes. Switching prices does not normally change the billing date or generate an immediate charge unless: The billing interval is changed (for example, from monthly to yearly). The subscription moves from free to paid. A trial starts or ends. In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how Stripe immediately attempts payment for subscription changes. If you want to charge for an upgrade immediately, pass proration_behavior as always_invoice to create prorations, automatically invoice the customer for those proration adjustments, and attempt to collect payment. If you pass create_prorations, the prorations are created but not automatically invoiced. If you want to bill the customer for the prorations before the subscription’s renewal date, you need to manually invoice the customer. If you don’t want to prorate, set the proration_behavior option to none. With this option, the customer is billed 100 on May 1 and 200 on June 1. Similarly, if you set proration_behavior to none when switching between different billing intervals (for example, from monthly to yearly), we don’t generate any credits for the old subscription’s unused time. We still reset the billing date and bill immediately for the new subscription. Updating the quantity on a subscription many times in an hour may result in rate limiting. If you need to bill for a frequently changing quantity, consider integrating usage-based billing instead. Mockzilla mock: no signup, no API key.
DEL /v1/subscriptions/{subscription_exposed_id}/discount
Delete a subscription discount
Removes the currently applied discount on a subscription.
POST /v1/subscriptions/{subscription}/migrate
Migrate a subscription
Upgrade the billing_mode of an existing subscription.
POST /v1/subscriptions/{subscription}/resume
Resume a subscription
Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active, and if payment fails the subscription will be past_due. The resumption invoice will void automatically if not paid by the expiration date.
POST /v1/tokens
Create a CVC update token
Creates a single-use token that represents a bank account’s details. You can use this token with any v1 API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a connected account where controller.requirement_collection is application, which includes Custom accounts.
GET /v1/tokens/{token}
Retrieve a token
Retrieves the token with the given ID.
GET /v1/webhook_endpoints
List all webhook endpoints
Returns a list of your webhook endpoints. Served by the Mockzilla mock runtime.
POST /v1/webhook_endpoints
Create a webhook endpoint
A webhook endpoint must have a url and a list of enabled_events. You may optionally specify the Boolean connect parameter. If set to true, then a Connect webhook endpoint that notifies the specified url about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified url only about events from your account is created. You can also create webhook endpoints in the webhooks settings section of the Dashboard.
DEL /v1/webhook_endpoints/{webhook_endpoint}
Delete a webhook endpoint
You can also delete webhook endpoints via the webhook endpoint management page of the Stripe dashboard.
GET /v1/webhook_endpoints/{webhook_endpoint}
Retrieve a webhook endpoint
Retrieves the webhook endpoint with the given ID.
POST /v1/webhook_endpoints/{webhook_endpoint}
Update a webhook endpoint
Updates the webhook endpoint. You may edit the url, the list of enabled_events, and the status of your endpoint.