Update a charge
POST / v1 / charges /:id
Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
Parameters
- customer string The ID of an existing customer that will be associated with this request. This field may only be updated if there is no existing associated customer with this charge.
- description string An arbitrary string which you can attach to a charge object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the
descriptionof the charge(s) that they are describing. - metadata map 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
metadata. - receipt _ email string This is the email address that the receipt for this charge will be sent to. If this field is updated, then a new email receipt will be sent to the updated address.
- shipping object Shipping information for the charge. Helps prevent fraud on charges for physical goods.
More parameters
- fraud _ details object
- transfer _ group string Connect only
Returns
Returns the charge object if the update succeeded. This call will raise an error if update parameters are invalid.
Response
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
