Capture a charge Deprecated
POST / v1 / charges /:id / capture
This method is deprecated and will be removed soon. If your integration uses it, you need to update it to use a different payment flow, such as the Payment Intents API.
Parameters
- amount integer The amount to capture, which must be less than or equal to the original amount.
- receipt _ email string The email address to send this charge’s receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts will not be sent in test mode. The maximum length is 800 characters.
- statement _ descriptor string For a non-card charge, text that appears on the customer’s statement as the statement descriptor. This value overrides the account’s default statement descriptor. For information about requirements, including the 22-character limit, see the Statement Descriptor docs. For a card charge, this value is ignored unless you don’t specify a
statement_descriptor_suffix, in which case this value is used as the suffix. - statement _ descriptor _ suffix string Provides information about a card charge. Concatenated to the account’s statement descriptor prefix to form the complete statement descriptor that appears on the customer’s statement. If the account has no prefix value, the suffix is concatenated to the account’s statement descriptor.
More parameters
- application _ fee _ amount integer Connect only
- transfer _ data object Connect only
- transfer _ group string Connect only
Returns
Returns the charge object, with an updated captured property (set to true). Capturing a charge will always succeed, unless the charge is already refunded, expired, captured, or an invalid capture amount is specified, in which case this method will raise an error.
Response
Search charges
GET / v1 / charges / search
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.
Parameters
- query string Required The search query string. See search query language and the list of supported query fields for charges.
- limit integer A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
- page 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.
Returns
A dictionary with a data property that contains an array of up to limit charges. If no objects match the query, the resulting array will be empty. See the related guide on expanding properties in lists.
Response
