class Stripe::ChargesApi
- Stripe::ChargesApi
- Reference
- Object
Defined in:
stripe/api/charges_api.crConstant Summary
-
GET_CHARGES_CHARGE_MAX_LENGTH_FOR_CHARGE =
5000
-
GET_CHARGES_MAX_LENGTH_FOR_CUSTOMER =
5000
-
GET_CHARGES_MAX_LENGTH_FOR_PAYMENT_INTENT =
5000
-
GET_CHARGES_MAX_LENGTH_FOR_TRANSFER_GROUP =
5000
-
GET_CHARGES_SEARCH_MAX_LENGTH_FOR_PAGE =
5000
-
GET_CHARGES_SEARCH_MAX_LENGTH_FOR_QUERY =
5000
-
POST_CHARGES_CHARGE_CAPTURE_MAX_LENGTH_FOR_CHARGE =
5000
-
POST_CHARGES_CHARGE_CAPTURE_MAX_LENGTH_FOR_STATEMENT_DESCRIPTOR =
22
-
POST_CHARGES_CHARGE_CAPTURE_MAX_LENGTH_FOR_STATEMENT_DESCRIPTOR_SUFFIX =
22
-
POST_CHARGES_CHARGE_MAX_LENGTH_FOR_CHARGE =
5000
-
POST_CHARGES_CHARGE_MAX_LENGTH_FOR_CUSTOMER =
5000
-
POST_CHARGES_CHARGE_MAX_LENGTH_FOR_DESCRIPTION =
40000
-
POST_CHARGES_CHARGE_MAX_LENGTH_FOR_RECEIPT_EMAIL =
5000
-
POST_CHARGES_MAX_LENGTH_FOR_CUSTOMER =
500
-
POST_CHARGES_MAX_LENGTH_FOR_DESCRIPTION =
40000
-
POST_CHARGES_MAX_LENGTH_FOR_ON_BEHALF_OF =
5000
-
POST_CHARGES_MAX_LENGTH_FOR_SOURCE =
5000
-
POST_CHARGES_MAX_LENGTH_FOR_STATEMENT_DESCRIPTOR =
22
-
POST_CHARGES_MAX_LENGTH_FOR_STATEMENT_DESCRIPTOR_SUFFIX =
22
Constructors
Instance Method Summary
- #api_client : ApiClient
- #api_client=(api_client : ApiClient)
-
#build_api_request_for_get_charges(*, ending_before : String | Nil = nil, starting_after : String | Nil = nil, limit : Int64 | Nil = nil, customer : String | Nil = nil, transfer_group : String | Nil = nil, payment_intent : String | Nil = nil, created : Stripe::GetAccountsCreatedParameter | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Crest::Request
@return Crest::Request
-
#build_api_request_for_get_charges_charge(*, charge : String | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Crest::Request
@return Crest::Request
-
#build_api_request_for_get_charges_search(*, query : String | Nil = nil, page : String | Nil = nil, limit : Int64 | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Crest::Request
@return Crest::Request
-
#build_api_request_for_post_charges(*, amount : Int64 | Nil = nil, application_fee : Int64 | Nil = nil, application_fee_amount : Int64 | Nil = nil, capture : Bool | Nil = nil, currency : String | Nil = nil, customer : String | Nil = nil, description : String | Nil = nil, destination : Stripe::DestinationSpecs | Nil = nil, expand : Array(String) | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil, on_behalf_of : String | Nil = nil, radar_options : Stripe::RadarOptionsWithHiddenOptions | Nil = nil, receipt_email : String | Nil = nil, shipping : Stripe::OptionalFieldsShipping | Nil = nil, source : String | Nil = nil, statement_descriptor : String | Nil = nil, statement_descriptor_suffix : String | Nil = nil, transfer_data : Stripe::TransferDataSpecs | Nil = nil, transfer_group : String | Nil = nil) : Crest::Request
@return Crest::Request
-
#build_api_request_for_post_charges_charge(*, charge : String | Nil = nil, customer : String | Nil = nil, description : String | Nil = nil, expand : Array(String) | Nil = nil, fraud_details : Stripe::FraudDetails | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil, receipt_email : String | Nil = nil, shipping : Stripe::OptionalFieldsShipping | Nil = nil, transfer_group : String | Nil = nil) : Crest::Request
@return Crest::Request
-
#build_api_request_for_post_charges_charge_capture(*, charge : String | Nil = nil, amount : Int64 | Nil = nil, application_fee : Int64 | Nil = nil, application_fee_amount : Int64 | Nil = nil, expand : Array(String) | Nil = nil, receipt_email : String | Nil = nil, statement_descriptor : String | Nil = nil, statement_descriptor_suffix : String | Nil = nil, transfer_data : Stripe::TransferDataSpecs | Nil = nil, transfer_group : String | Nil = nil) : Crest::Request
@return Crest::Request
- #client_side_validation?(*args, **options)
- #client_side_validation?(*args, **options, &)
- #debugging?(*args, **options)
- #debugging?(*args, **options, &)
-
#get_charges(*, ending_before : String | Nil = nil, starting_after : String | Nil = nil, limit : Int64 | Nil = nil, customer : String | Nil = nil, transfer_group : String | Nil = nil, payment_intent : String | Nil = nil, created : Stripe::GetAccountsCreatedParameter | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Stripe::ChargeList
Returns a list of charges you’ve previously created.
-
#get_charges(*, ending_before : String | Nil = nil, starting_after : String | Nil = nil, limit : Int64 | Nil = nil, customer : String | Nil = nil, transfer_group : String | Nil = nil, payment_intent : String | Nil = nil, created : Stripe::GetAccountsCreatedParameter | Nil = nil, expand : Array(Array(String)) | Nil = nil, &block : Crest::Response -> ) : Nil
<p>Returns a list of charges you’ve previously created.
-
#get_charges_charge(*, charge : String | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Stripe::Charge
Retrieves the details of a charge that has previously been created.
-
#get_charges_charge(*, charge : String | Nil = nil, expand : Array(Array(String)) | Nil = nil, &block : Crest::Response -> ) : Nil
<p>Retrieves the details of a charge that has previously been created.
-
#get_charges_charge_with_http_info(*, charge : String | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Tuple(Stripe::Charge, Int32, Hash(String, Array(String) | String))
<p>Retrieves the details of a charge that has previously been created.
-
#get_charges_search(*, query : String | Nil = nil, page : String | Nil = nil, limit : Int64 | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Stripe::SearchResult
Search for charges you’ve previously created using Stripe’s Search Query Language.
-
#get_charges_search(*, query : String | Nil = nil, page : String | Nil = nil, limit : Int64 | Nil = nil, expand : Array(Array(String)) | Nil = nil, &block : Crest::Response -> ) : Nil
<p>Search for charges you’ve previously created using Stripe’s <a href="/docs/search#search-query-language">Search Query Language</a>.
-
#get_charges_search_with_http_info(*, query : String | Nil = nil, page : String | Nil = nil, limit : Int64 | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Tuple(Stripe::SearchResult, Int32, Hash(String, Array(String) | String))
<p>Search for charges you’ve previously created using Stripe’s <a href="/docs/search#search-query-language">Search Query Language</a>.
-
#get_charges_with_http_info(*, ending_before : String | Nil = nil, starting_after : String | Nil = nil, limit : Int64 | Nil = nil, customer : String | Nil = nil, transfer_group : String | Nil = nil, payment_intent : String | Nil = nil, created : Stripe::GetAccountsCreatedParameter | Nil = nil, expand : Array(Array(String)) | Nil = nil) : Tuple(Stripe::ChargeList, Int32, Hash(String, Array(String) | String))
<p>Returns a list of charges you’ve previously created.
-
#post_charges(*, amount : Int64 | Nil = nil, application_fee : Int64 | Nil = nil, application_fee_amount : Int64 | Nil = nil, capture : Bool | Nil = nil, currency : String | Nil = nil, customer : String | Nil = nil, description : String | Nil = nil, destination : Stripe::DestinationSpecs | Nil = nil, expand : Array(String) | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil, on_behalf_of : String | Nil = nil, radar_options : Stripe::RadarOptionsWithHiddenOptions | Nil = nil, receipt_email : String | Nil = nil, shipping : Stripe::OptionalFieldsShipping | Nil = nil, source : String | Nil = nil, statement_descriptor : String | Nil = nil, statement_descriptor_suffix : String | Nil = nil, transfer_data : Stripe::TransferDataSpecs | Nil = nil, transfer_group : String | Nil = nil) : Stripe::Charge
This method is no longer recommended—use the Payment Intents API to initiate a new payment instead.
-
#post_charges(*, amount : Int64 | Nil = nil, application_fee : Int64 | Nil = nil, application_fee_amount : Int64 | Nil = nil, capture : Bool | Nil = nil, currency : String | Nil = nil, customer : String | Nil = nil, description : String | Nil = nil, destination : Stripe::DestinationSpecs | Nil = nil, expand : Array(String) | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil, on_behalf_of : String | Nil = nil, radar_options : Stripe::RadarOptionsWithHiddenOptions | Nil = nil, receipt_email : String | Nil = nil, shipping : Stripe::OptionalFieldsShipping | Nil = nil, source : String | Nil = nil, statement_descriptor : String | Nil = nil, statement_descriptor_suffix : String | Nil = nil, transfer_data : Stripe::TransferDataSpecs | Nil = nil, transfer_group : String | Nil = nil, &block : Crest::Response -> ) : Nil
<p>This method is no longer recommended—use the <a href="/docs/api/payment_intents">Payment Intents API</a> to initiate a new payment instead.
-
#post_charges_charge(*, charge : String | Nil = nil, customer : String | Nil = nil, description : String | Nil = nil, expand : Array(String) | Nil = nil, fraud_details : Stripe::FraudDetails | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil, receipt_email : String | Nil = nil, shipping : Stripe::OptionalFieldsShipping | Nil = nil, transfer_group : String | Nil = nil) : Stripe::Charge
Updates the specified charge by setting the values of the parameters passed.
-
#post_charges_charge(*, charge : String | Nil = nil, customer : String | Nil = nil, description : String | Nil = nil, expand : Array(String) | Nil = nil, fraud_details : Stripe::FraudDetails | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil, receipt_email : String | Nil = nil, shipping : Stripe::OptionalFieldsShipping | Nil = nil, transfer_group : String | Nil = nil, &block : Crest::Response -> ) : Nil
<p>Updates the specified charge by setting the values of the parameters passed.
-
#post_charges_charge_capture(*, charge : String | Nil = nil, amount : Int64 | Nil = nil, application_fee : Int64 | Nil = nil, application_fee_amount : Int64 | Nil = nil, expand : Array(String) | Nil = nil, receipt_email : String | Nil = nil, statement_descriptor : String | Nil = nil, statement_descriptor_suffix : String | Nil = nil, transfer_data : Stripe::TransferDataSpecs | Nil = nil, transfer_group : String | Nil = nil) : Stripe::Charge
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.
-
#post_charges_charge_capture(*, charge : String | Nil = nil, amount : Int64 | Nil = nil, application_fee : Int64 | Nil = nil, application_fee_amount : Int64 | Nil = nil, expand : Array(String) | Nil = nil, receipt_email : String | Nil = nil, statement_descriptor : String | Nil = nil, statement_descriptor_suffix : String | Nil = nil, transfer_data : Stripe::TransferDataSpecs | Nil = nil, transfer_group : String | Nil = nil, &block : Crest::Response -> ) : Nil
<p>Capture the payment of an existing, uncaptured charge that was created with the <code>capture</code> option set to false.</p> <p>Uncaptured payments expire a set number of days after they are created (<a href="/docs/charges/placing-a-hold">7 by default</a>), after which they are marked as refunded and capture attempts will fail.</p> <p>Don’t use this method to capture a PaymentIntent-initiated charge.
-
#post_charges_charge_capture_with_http_info(*, charge : String | Nil = nil, amount : Int64 | Nil = nil, application_fee : Int64 | Nil = nil, application_fee_amount : Int64 | Nil = nil, expand : Array(String) | Nil = nil, receipt_email : String | Nil = nil, statement_descriptor : String | Nil = nil, statement_descriptor_suffix : String | Nil = nil, transfer_data : Stripe::TransferDataSpecs | Nil = nil, transfer_group : String | Nil = nil) : Tuple(Stripe::Charge, Int32, Hash(String, Array(String) | String))
<p>Capture the payment of an existing, uncaptured charge that was created with the <code>capture</code> option set to false.</p> <p>Uncaptured payments expire a set number of days after they are created (<a href="/docs/charges/placing-a-hold">7 by default</a>), after which they are marked as refunded and capture attempts will fail.</p> <p>Don’t use this method to capture a PaymentIntent-initiated charge.
-
#post_charges_charge_with_http_info(*, charge : String | Nil = nil, customer : String | Nil = nil, description : String | Nil = nil, expand : Array(String) | Nil = nil, fraud_details : Stripe::FraudDetails | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil, receipt_email : String | Nil = nil, shipping : Stripe::OptionalFieldsShipping | Nil = nil, transfer_group : String | Nil = nil) : Tuple(Stripe::Charge, Int32, Hash(String, Array(String) | String))
<p>Updates the specified charge by setting the values of the parameters passed.
-
#post_charges_with_http_info(*, amount : Int64 | Nil = nil, application_fee : Int64 | Nil = nil, application_fee_amount : Int64 | Nil = nil, capture : Bool | Nil = nil, currency : String | Nil = nil, customer : String | Nil = nil, description : String | Nil = nil, destination : Stripe::DestinationSpecs | Nil = nil, expand : Array(String) | Nil = nil, metadata : Stripe::PostAccountsRequestMetadata | Nil = nil, on_behalf_of : String | Nil = nil, radar_options : Stripe::RadarOptionsWithHiddenOptions | Nil = nil, receipt_email : String | Nil = nil, shipping : Stripe::OptionalFieldsShipping | Nil = nil, source : String | Nil = nil, statement_descriptor : String | Nil = nil, statement_descriptor_suffix : String | Nil = nil, transfer_data : Stripe::TransferDataSpecs | Nil = nil, transfer_group : String | Nil = nil) : Tuple(Stripe::Charge, Int32, Hash(String, Array(String) | String))
<p>This method is no longer recommended—use the <a href="/docs/api/payment_intents">Payment Intents API</a> to initiate a new payment instead.
Constructor Detail
Instance Method Detail
@return Crest::Request
@return Crest::Request
@return Crest::Request
@return Crest::Request
@return Crest::Request
@return Crest::Request
Returns a list of charges you’ve previously created. The charges are returned in sorted order, with the most recent charges appearing first.
@optional @param ending_before [String?] A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. @optional @param starting_after [String?] A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. @optional @param limit [Int32?] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. @optional @param customer [String?] Only return charges for the customer specified by this customer ID. @optional @param transfer_group [String?] Only return charges for this transfer group, limited to 100. @optional @param payment_intent [String?] Only return charges that were created by the PaymentIntent specified by this PaymentIntent ID. @optional @param created [Stripe::GetAccountsCreatedParameter?] Only return charges that were created during the given date interval. @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return [Stripe::ChargeList]<p>Returns a list of charges you’ve previously created. The charges are returned in sorted order, with the most recent charges appearing first.</p>
@optional @param ending_before [String?] A cursor for use in pagination. ending_before
is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar
, your subsequent call can include ending_before=obj_bar
in order to fetch the previous page of the list.
@optional @param starting_after [String?] A cursor for use in pagination. starting_after
is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo
, your subsequent call can include starting_after=obj_foo
in order to fetch the next page of the list.
@optional @param limit [Int32?] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
@optional @param customer [String?] Only return charges for the customer specified by this customer ID.
@optional @param transfer_group [String?] Only return charges for this transfer group, limited to 100.
@optional @param payment_intent [String?] Only return charges that were created by the PaymentIntent specified by this PaymentIntent ID.
@optional @param created [Stripe::GetAccountsCreatedParameter?] Only return charges that were created during the given date interval.
@optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded.
@return nil
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.
@required @param charge [String?] @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return [Stripe::Charge]<p>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.</p> @required @param charge [String?] @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return nil
<p>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.</p> @required @param charge [String?] @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return [Tuple(Stripe::Charge, Integer, Hash)] Stripe::Charge, response status code and response headers
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.
@required @param query [String?] The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for charges](https://stripe.com/docs/search#query-fields-for-charges). @optional @param 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. @optional @param limit [Int32?] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return [Stripe::SearchResult]<p>Search for charges you’ve previously created using Stripe’s <a href="/docs/search#search-query-language">Search Query Language</a>. 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.</p> @required @param query [String?] The search query string. See search query language and the list of supported query fields for charges. @optional @param 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. @optional @param limit [Int32?] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return nil
<p>Search for charges you’ve previously created using Stripe’s <a href="/docs/search#search-query-language">Search Query Language</a>. 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.</p> @required @param query [String?] The search query string. See search query language and the list of supported query fields for charges. @optional @param 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. @optional @param limit [Int32?] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. @optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded. @return [Tuple(Stripe::SearchResult, Integer, Hash)] Stripe::SearchResult, response status code and response headers
<p>Returns a list of charges you’ve previously created. The charges are returned in sorted order, with the most recent charges appearing first.</p>
@optional @param ending_before [String?] A cursor for use in pagination. ending_before
is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar
, your subsequent call can include ending_before=obj_bar
in order to fetch the previous page of the list.
@optional @param starting_after [String?] A cursor for use in pagination. starting_after
is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo
, your subsequent call can include starting_after=obj_foo
in order to fetch the next page of the list.
@optional @param limit [Int32?] A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
@optional @param customer [String?] Only return charges for the customer specified by this customer ID.
@optional @param transfer_group [String?] Only return charges for this transfer group, limited to 100.
@optional @param payment_intent [String?] Only return charges that were created by the PaymentIntent specified by this PaymentIntent ID.
@optional @param created [Stripe::GetAccountsCreatedParameter?] Only return charges that were created during the given date interval.
@optional @param expand [Array(Array(String))?] Specifies which fields in the response should be expanded.
@return [Tuple(Stripe::ChargeList, Integer, Hash)] Stripe::ChargeList, response status code and response headers
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.
<p>This method is no longer recommended—use the <a href="/docs/api/payment_intents">Payment Intents API</a> to initiate a new payment instead. Confirmation of the PaymentIntent creates the <code>Charge</code> object used to request payment.</p>
@optional @param amount [Int32?] Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
@optional @param application_fee [Int32?]
@optional @param application_fee_amount [Int32?] A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account
header in order to take an application fee. For more information, see the application fees documentation.
@optional @param capture [Bool?] Whether to immediately capture the charge. Defaults to true
. When false
, the charge issues an authorization (or pre-authorization), and will need to be captured later. Uncaptured charges expire after a set number of days (7 by default). For more information, see the authorizing charges and settling later documentation.
@optional @param currency [String?] Three-letter ISO currency code, in lowercase. Must be a supported currency.
@optional @param customer [String?] The ID of an existing customer that will be charged in this request.
@optional @param 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 description
of the charge(s) that they are describing.
@optional @param destination [Stripe::DestinationSpecs?]
@optional @param expand [Array(String)?] Specifies which fields in the response should be expanded.
@optional @param metadata [Stripe::PostAccountsRequestMetadata?]
@optional @param on_behalf_of [String?] The Stripe account ID for which these funds are intended. Automatically set if you use the destination
parameter. For details, see Creating Separate Charges and Transfers.
@optional @param radar_options [Stripe::RadarOptionsWithHiddenOptions?]
@optional @param receipt_email [String?] The email address to which this charge's receipt will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a Customer, the email address specified here will override the customer's email address. If receipt_email
is specified for a charge in live mode, a receipt will be sent regardless of your email settings.
@optional @param shipping [Stripe::OptionalFieldsShipping?]
@optional @param source [String?] A payment source to be charged. This can be the ID of a card (i.e., credit or debit card), a bank account, a source, a token, or a connected account. For certain sources---namely, cards, bank accounts, and attached sources---you must also pass the ID of the associated customer.
@optional @param 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.
@optional @param 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.
@optional @param transfer_data [Stripe::TransferDataSpecs?]
@optional @param transfer_group [String?] A string that identifies this transaction as part of a group. For details, see Grouping transactions.
@return nil
Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
@required @param charge [String?] @optional @param 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. @optional @param 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 `description` of the charge(s) that they are describing. @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param fraud_details [Stripe::FraudDetails?] @optional @param metadata [Stripe::PostAccountsRequestMetadata?] @optional @param 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. @optional @param shipping [Stripe::OptionalFieldsShipping?] @optional @param transfer_group [String?] A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. @return [Stripe::Charge]<p>Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged.</p>
@required @param charge [String?]
@optional @param 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.
@optional @param 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 description
of the charge(s) that they are describing.
@optional @param expand [Array(String)?] Specifies which fields in the response should be expanded.
@optional @param fraud_details [Stripe::FraudDetails?]
@optional @param metadata [Stripe::PostAccountsRequestMetadata?]
@optional @param 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.
@optional @param shipping [Stripe::OptionalFieldsShipping?]
@optional @param transfer_group [String?] A string that identifies this transaction as part of a group. transfer_group
may only be provided if it has not been set. See the Connect documentation for details.
@return nil
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.
@required @param charge [String?] @optional @param amount [Int32?] The amount to capture, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. @optional @param application_fee [Int32?] An application fee to add on to this charge. @optional @param application_fee_amount [Int32?] An application fee amount to add on to this charge, which must be less than or equal to the original amount. @optional @param expand [Array(String)?] Specifies which fields in the response should be expanded. @optional @param 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. @optional @param 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](https://docs.stripe.com/get-started/account/statement-descriptors). 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. @optional @param statement_descriptor_suffix [String?] Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) 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. @optional @param transfer_data [Stripe::TransferDataSpecs?] @optional @param transfer_group [String?] A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. @return [Stripe::Charge]<p>Capture the payment of an existing, uncaptured charge that was created with the <code>capture</code> option set to false.</p> <p>Uncaptured payments expire a set number of days after they are created (<a href="/docs/charges/placing-a-hold">7 by default</a>), after which they are marked as refunded and capture attempts will fail.</p> <p>Don’t use this method to capture a PaymentIntent-initiated charge. Use <a href="/docs/api/payment_intents/capture">Capture a PaymentIntent</a>.</p>
@required @param charge [String?]
@optional @param amount [Int32?] The amount to capture, which must be less than or equal to the original amount. Any additional amount will be automatically refunded.
@optional @param application_fee [Int32?] An application fee to add on to this charge.
@optional @param application_fee_amount [Int32?] An application fee amount to add on to this charge, which must be less than or equal to the original amount.
@optional @param expand [Array(String)?] Specifies which fields in the response should be expanded.
@optional @param 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.
@optional @param 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.
@optional @param 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.
@optional @param transfer_data [Stripe::TransferDataSpecs?]
@optional @param transfer_group [String?] A string that identifies this transaction as part of a group. transfer_group
may only be provided if it has not been set. See the Connect documentation for details.
@return nil
<p>Capture the payment of an existing, uncaptured charge that was created with the <code>capture</code> option set to false.</p> <p>Uncaptured payments expire a set number of days after they are created (<a href="/docs/charges/placing-a-hold">7 by default</a>), after which they are marked as refunded and capture attempts will fail.</p> <p>Don’t use this method to capture a PaymentIntent-initiated charge. Use <a href="/docs/api/payment_intents/capture">Capture a PaymentIntent</a>.</p>
@required @param charge [String?]
@optional @param amount [Int32?] The amount to capture, which must be less than or equal to the original amount. Any additional amount will be automatically refunded.
@optional @param application_fee [Int32?] An application fee to add on to this charge.
@optional @param application_fee_amount [Int32?] An application fee amount to add on to this charge, which must be less than or equal to the original amount.
@optional @param expand [Array(String)?] Specifies which fields in the response should be expanded.
@optional @param 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.
@optional @param 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.
@optional @param 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.
@optional @param transfer_data [Stripe::TransferDataSpecs?]
@optional @param transfer_group [String?] A string that identifies this transaction as part of a group. transfer_group
may only be provided if it has not been set. See the Connect documentation for details.
@return [Tuple(Stripe::Charge, Integer, Hash)] Stripe::Charge, response status code and response headers
<p>Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged.</p>
@required @param charge [String?]
@optional @param 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.
@optional @param 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 description
of the charge(s) that they are describing.
@optional @param expand [Array(String)?] Specifies which fields in the response should be expanded.
@optional @param fraud_details [Stripe::FraudDetails?]
@optional @param metadata [Stripe::PostAccountsRequestMetadata?]
@optional @param 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.
@optional @param shipping [Stripe::OptionalFieldsShipping?]
@optional @param transfer_group [String?] A string that identifies this transaction as part of a group. transfer_group
may only be provided if it has not been set. See the Connect documentation for details.
@return [Tuple(Stripe::Charge, Integer, Hash)] Stripe::Charge, response status code and response headers
<p>This method is no longer recommended—use the <a href="/docs/api/payment_intents">Payment Intents API</a> to initiate a new payment instead. Confirmation of the PaymentIntent creates the <code>Charge</code> object used to request payment.</p>
@optional @param amount [Int32?] Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
@optional @param application_fee [Int32?]
@optional @param application_fee_amount [Int32?] A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account
header in order to take an application fee. For more information, see the application fees documentation.
@optional @param capture [Bool?] Whether to immediately capture the charge. Defaults to true
. When false
, the charge issues an authorization (or pre-authorization), and will need to be captured later. Uncaptured charges expire after a set number of days (7 by default). For more information, see the authorizing charges and settling later documentation.
@optional @param currency [String?] Three-letter ISO currency code, in lowercase. Must be a supported currency.
@optional @param customer [String?] The ID of an existing customer that will be charged in this request.
@optional @param 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 description
of the charge(s) that they are describing.
@optional @param destination [Stripe::DestinationSpecs?]
@optional @param expand [Array(String)?] Specifies which fields in the response should be expanded.
@optional @param metadata [Stripe::PostAccountsRequestMetadata?]
@optional @param on_behalf_of [String?] The Stripe account ID for which these funds are intended. Automatically set if you use the destination
parameter. For details, see Creating Separate Charges and Transfers.
@optional @param radar_options [Stripe::RadarOptionsWithHiddenOptions?]
@optional @param receipt_email [String?] The email address to which this charge's receipt will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a Customer, the email address specified here will override the customer's email address. If receipt_email
is specified for a charge in live mode, a receipt will be sent regardless of your email settings.
@optional @param shipping [Stripe::OptionalFieldsShipping?]
@optional @param source [String?] A payment source to be charged. This can be the ID of a card (i.e., credit or debit card), a bank account, a source, a token, or a connected account. For certain sources---namely, cards, bank accounts, and attached sources---you must also pass the ID of the associated customer.
@optional @param 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.
@optional @param 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.
@optional @param transfer_data [Stripe::TransferDataSpecs?]
@optional @param transfer_group [String?] A string that identifies this transaction as part of a group. For details, see Grouping transactions.
@return [Tuple(Stripe::Charge, Integer, Hash)] Stripe::Charge, response status code and response headers