Skip to content

Commit

Permalink
Upadate billing schema
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanFlurry committed Jan 6, 2024
1 parent b0f7614 commit 7175f3e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
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;
}

0 comments on commit 7175f3e

Please sign in to comment.