class Stripetease::API::Charges
- Stripetease::API::Charges
- Reference
- Object
Overview
To charge a credit or a debit card, you create a Charge object. You can retrieve and refund individual charges as well as list all charges. Charges are identified by a unique, random ID.
Defined in:
stripetease/api/charges.crConstructors
Instance Method Summary
-
#capture(id : String, amount : Int32 | Nil = nil, receipt_email : String | Nil = nil, statement_descriptor : String | Nil = nil, statement_descriptor_suffix : String | Nil = nil, application_fee_amount : Int32 | Nil = nil, transfer_data : Hash | Nil = nil, transfer_group : String | Nil = nil)
Capture the payment of an existing, uncaptured, charge.
-
#create(amount : Int32, currency : String, customer : String | Nil = nil, description : String | Nil = nil, metadata : Hash | Nil = nil, receipt_email : String | Nil = nil, shipping : Hash | Nil = nil, source : String | Nil = nil, statement_descriptor : String | Nil = nil, application_fee_amount : Int32 | Nil = nil, capture : Bool | Nil = nil, on_behalf_of : String | Nil = nil, radar_options : Hash | Nil = nil, transfer_data : Hash | Nil = nil, transfer_group : String | Nil = nil)
To charge a credit card or other payment source, you create a Charge object.
-
#get(id : String)
Retrieves the details of a charge that has previously been created.
-
#update(id : String, customer : String | Nil = nil, description : String | Nil = nil, metadata : Hash | Nil = nil, receipt_email : String | Nil = nil, shipping : Hash | Nil = nil, fraud_details : Hash | Nil = nil, transfer_group : String | Nil = nil)
Updates the specified charge by setting the values of the parameters passed.
Constructor Detail
Instance Method Detail
Capture the payment of an existing, uncaptured, charge. This is the second half of the two-step payment flow, where first you created a charge with the capture option set to false.
To charge a credit card or other payment source, you create a Charge object. If your API key is in test mode, the supplied payment source (e.g., card) won’t actually be charged, although everything else will occur as if in live mode. (Stripe assumes that the charge would have completed successfully).
Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged.