stripe_pay_core/charge/enum.rs
1/// Whether the charge actually took the customer's money.
2///
3/// Stripe distinguishes a charge that captured funds from one that was
4/// authorised but not captured, and from one that failed outright.
5#[derive(
6 Clone, Copy, Debug, Default, Eq, Hash, PartialEq, serde::Deserialize, serde::Serialize,
7)]
8#[serde(rename_all = "snake_case")]
9pub enum ChargeStatus {
10 /// Stripe has the customer's details but has not taken money yet.
11 #[default]
12 Pending,
13 /// The charge succeeded and the funds are captured.
14 Succeeded,
15 /// The charge was authorised but not captured.
16 Authorized,
17 /// The charge failed and no money moved.
18 Failed,
19}
20
21/// How the customer paid.
22#[derive(
23 Clone, Copy, Debug, Default, Eq, Hash, PartialEq, serde::Deserialize, serde::Serialize,
24)]
25#[serde(rename_all = "snake_case")]
26pub enum PaymentMethodKind {
27 /// A payment card.
28 #[default]
29 Card,
30 /// A bank debit mandate.
31 SepaDebit,
32 /// A bank transfer, such as ACH.
33 BankTransfer,
34 /// A wallet such as Apple Pay or Google Pay.
35 Wallet,
36}