Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/util/env/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ pub fn billing() -> Option<&'static RivetBilling> {
}

/// The current stripe API token.
pub async fn stripe_token() -> Result<String, std::env::VarError> {
read_secret(&["stripe", "token"]).await
pub async fn stripe_secret_key() -> Result<String, std::env::VarError> {
read_secret(&["stripe", "secret_key"]).await
}

/// The current stripe webhook secret.
Expand Down
14 changes: 14 additions & 0 deletions proto/backend/billing.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,17 @@ message RegionTierMetrics {
int64 uptime = 4; // in seconds
}

message Team {
rivet.common.Uuid team_id = 1;
optional string stripe_customer_id = 2;
optional int64 payment_method_attached_ts = 3;
optional int64 payment_method_valid_ts = 4;
optional int64 payment_failed_ts = 5;
optional int64 payment_succeeded_ts = 6;
}

message Game {
rivet.common.Uuid game_id = 1;
int64 create_ts = 2;
optional string stripe_customer_id = 3;
}