pub struct Charge {Show 47 fields
pub amount: i64,
pub amount_captured: i64,
pub amount_refunded: i64,
pub application: Option<Expandable<Application>>,
pub application_fee: Option<Expandable<ApplicationFee>>,
pub application_fee_amount: Option<i64>,
pub authorization_code: Option<String>,
pub balance_transaction: Option<Expandable<BalanceTransaction>>,
pub billing_details: BillingDetails,
pub calculated_statement_descriptor: Option<String>,
pub captured: bool,
pub created: i64,
pub currency: Currency,
pub customer: Option<Expandable<Customer>>,
pub description: Option<String>,
pub disputed: bool,
pub failure_balance_transaction: Option<Expandable<BalanceTransaction>>,
pub failure_code: Option<String>,
pub failure_message: Option<String>,
pub fraud_details: Option<ChargeFraudDetails>,
pub id: ChargeId,
pub level3: Option<Level3>,
pub livemode: bool,
pub metadata: HashMap<String, String>,
pub on_behalf_of: Option<Expandable<Account>>,
pub outcome: Option<ChargeOutcome>,
pub paid: bool,
pub payment_intent: Option<Expandable<PaymentIntent>>,
pub payment_method: Option<String>,
pub payment_method_details: Option<PaymentMethodDetails>,
pub presentment_details: Option<PaymentFlowsPaymentIntentPresentmentDetails>,
pub radar_options: Option<RadarRadarOptions>,
pub receipt_email: Option<String>,
pub receipt_number: Option<String>,
pub receipt_url: Option<String>,
pub refunded: bool,
pub refunds: Option<List<Refund>>,
pub review: Option<Expandable<Review>>,
pub shipping: Option<Shipping>,
pub source: Option<PaymentSource>,
pub source_transfer: Option<Expandable<Transfer>>,
pub statement_descriptor: Option<String>,
pub statement_descriptor_suffix: Option<String>,
pub status: ChargeStatus,
pub transfer: Option<Expandable<Transfer>>,
pub transfer_data: Option<ChargeTransferData>,
pub transfer_group: Option<String>,
}
Expand description
The Charge
object represents a single attempt to move money into your Stripe account.
PaymentIntent confirmation is the most common way to create Charges, but transferring
money to a different Stripe account through Connect also creates Charges.
Some legacy payment flows create Charges directly, which is not recommended for new integrations.
For more details see <https://stripe.com/docs/api/charges/object>.
Fields§
§amount: i64
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).
amount_captured: i64
Amount in cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made).
amount_refunded: i64
Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the charge if a partial refund was issued).
application: Option<Expandable<Application>>
ID of the Connect application that created the charge.
application_fee: Option<Expandable<ApplicationFee>>
The application fee (if any) for the charge. See the Connect documentation for details.
application_fee_amount: Option<i64>
The amount of the application fee (if any) requested for the charge. See the Connect documentation for details.
Authorization code on the charge.
balance_transaction: Option<Expandable<BalanceTransaction>>
ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes).
billing_details: BillingDetails
§calculated_statement_descriptor: Option<String>
The full statement descriptor that is passed to card networks, and that is displayed on your customers’ credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. This value only exists for card payments.
captured: bool
If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured.
created: i64
Time at which the object was created. Measured in seconds since the Unix epoch.
currency: Currency
Three-letter ISO currency code, in lowercase. Must be a supported currency.
customer: Option<Expandable<Customer>>
ID of the customer this charge is for if one exists.
description: Option<String>
An arbitrary string attached to the object. Often useful for displaying to users.
disputed: bool
Whether the charge has been disputed.
failure_balance_transaction: Option<Expandable<BalanceTransaction>>
ID of the balance transaction that describes the reversal of the balance on your account due to payment failure.
failure_code: Option<String>
Error code explaining reason for charge failure if available (see the errors section for a list of codes).
failure_message: Option<String>
Message to user further explaining reason for charge failure if available.
fraud_details: Option<ChargeFraudDetails>
Information on fraud assessments for the charge.
id: ChargeId
Unique identifier for the object.
level3: Option<Level3>
§livemode: bool
Has the value true
if the object exists in live mode or the value false
if the object exists in test mode.
metadata: HashMap<String, String>
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.
on_behalf_of: Option<Expandable<Account>>
The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the Connect documentation for details.
outcome: Option<ChargeOutcome>
Details about whether the payment was accepted, and why. See understanding declines for details.
paid: bool
true
if the charge succeeded, or was successfully authorized for later capture.
payment_intent: Option<Expandable<PaymentIntent>>
ID of the PaymentIntent associated with this charge, if one exists.
payment_method: Option<String>
ID of the payment method used in this charge.
payment_method_details: Option<PaymentMethodDetails>
Details about the payment method at the time of the transaction.
presentment_details: Option<PaymentFlowsPaymentIntentPresentmentDetails>
§radar_options: Option<RadarRadarOptions>
§receipt_email: Option<String>
This is the email address that the receipt for this charge was sent to.
receipt_number: Option<String>
This is the transaction number that appears on email receipts sent for this charge.
This attribute will be null
until a receipt has been sent.
receipt_url: Option<String>
This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt.
refunded: bool
Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false.
refunds: Option<List<Refund>>
A list of refunds that have been applied to the charge.
review: Option<Expandable<Review>>
ID of the review associated with this charge if one exists.
shipping: Option<Shipping>
Shipping information for the charge.
source: Option<PaymentSource>
This is a legacy field that will be removed in the future.
It contains the Source, Card, or BankAccount object used for the charge.
For details about the payment method used for this charge, refer to payment_method
or payment_method_details
instead.
source_transfer: Option<Expandable<Transfer>>
The transfer ID which created this charge. Only present if the charge came from another Stripe account. See the Connect documentation for details.
statement_descriptor: Option<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: Option<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.
status: ChargeStatus
The status of the payment is either succeeded
, pending
, or failed
.
transfer: Option<Expandable<Transfer>>
ID of the transfer to the destination
account (only applicable if the charge was created using the destination
parameter).
transfer_data: Option<ChargeTransferData>
An optional dictionary including the account to automatically transfer to as part of a destination charge. See the Connect documentation for details.
transfer_group: Option<String>
A string that identifies this transaction as part of a group. See the Connect documentation for details.