stripe/model/
source_redirect_flow.rs

1use serde::{Serialize, Deserialize};
2///
3#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4pub struct SourceRedirectFlow {
5    ///The failure reason for the redirect, either `user_abort` (the customer aborted or dropped out of the redirect flow), `declined` (the authentication failed or the transaction was declined), or `processing_error` (the redirect failed due to a technical error). Present only if the redirect status is `failed`.
6    #[serde(skip_serializing_if = "Option::is_none")]
7    pub failure_reason: Option<String>,
8    ///The URL you provide to redirect the customer to after they authenticated their payment.
9    pub return_url: String,
10    ///The status of the redirect, either `pending` (ready to be used by your customer to authenticate the transaction), `succeeded` (succesful authentication, cannot be reused) or `not_required` (redirect should not be used) or `failed` (failed authentication, cannot be reused).
11    pub status: String,
12    ///The URL provided to you to redirect a customer to as part of a `redirect` authentication flow.
13    pub url: String,
14}
15impl std::fmt::Display for SourceRedirectFlow {
16    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
17        write!(f, "{}", serde_json::to_string(self).unwrap())
18    }
19}