Track payment method

This commit is contained in:
Jon Staab
2026-05-29 12:24:39 -07:00
parent d5047dedb1
commit ae3e1c316e
8 changed files with 14 additions and 7 deletions
+3 -1
View File
@@ -22,6 +22,7 @@ pub struct TenantResponse {
pub created_at: i64,
pub billing_anchor: Option<i64>,
pub stripe_customer_id: String,
pub stripe_payment_method_id: Option<String>,
/// Set when billing has churned the tenant; the UI uses it to warn that the
/// account is delinquent until billing is re-activated.
pub churned_at: Option<i64>,
@@ -37,6 +38,7 @@ impl From<Tenant> for TenantResponse {
created_at: t.created_at,
billing_anchor: t.billing_anchor,
stripe_customer_id: t.stripe_customer_id,
stripe_payment_method_id: t.stripe_payment_method_id,
churned_at: t.churned_at,
}
}
@@ -142,7 +144,7 @@ pub async fn list_tenant_relays(
) -> ApiResult {
api.require_admin_or_tenant(&auth, &pubkey)?;
let relays = query::list_relays(&pubkey)
let relays = query::list_relays_for_tenant(&pubkey)
.await
.map_err(internal)?;
ok(relays)