paystack_client/
models.rs1use serde::{Deserialize, Serialize};
2
3
4#[derive(Debug, Serialize)]
5pub struct PaymentInitializePayload {
6 pub email: String,
7 pub amount: i64,
8 pub reference: String,
9 pub callback_url: String,
10}
11
12
13#[derive(Debug, Deserialize)]
14pub struct PaymentInitializeResponse {
15 pub status: bool,
16 pub message: String,
17 pub data: Option<InitData>,
18}
19
20#[derive(Debug, Deserialize)]
21pub struct InitData {
22 pub authorization_url: String,
23 pub access_code: String,
24 pub reference: String,
25}
26
27#[derive(Debug, Deserialize)]
28pub struct PaymentVerifyResponse {
29 pub status: bool,
30 pub message: String,
31 pub data: Option<PaymentVerifyData>,
32}
33
34#[derive(Debug, Deserialize)]
35pub struct PaymentVerifyData {
36 pub status: String,
37 pub reference: String,
38 pub amount: i64,
39 pub gateway_response: String,
40 #[serde(rename = "customer")]
41 pub customer: PaymentCustomer,
42}
43
44#[derive(Debug, Deserialize)]
45pub struct PaymentCustomer {
46 pub email: String,
47}