Retrieve a charge
GET / v1 / charges /:id
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.
Parameters
No parameters.
Returns
Returns a charge if a valid identifier was provided, and raises an error otherwise.
Response
List all charges
GET / v1 / charges
Returns a list of charges you’ve previously created. The charges are returned in sorted order, with the most recent charges appearing first.
Parameters
- customer string Only return charges for the customer specified by this customer ID.
More parameters
- created object
- ending _ before string
- limit integer
- payment _ intent string
- starting _ after string
- transfer _ group string Connect only
Returns
A dictionary with a data property that contains an array of up to limit charges, starting after charge starting_after. Each entry in the array is a separate charge object. If no more charges are available, the resulting array will be empty. If you provide a non-existent customer ID, this call raises an error.
Response
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
