Add charges and the billing limit for trusted apps

This commit is contained in:
envoyr committed 2026-11-06 20:00:26 +00:00
1 parent f5d48b7e35
commit 7bd7249730
7 files changed
+799 -60

No files matched your search

+10
View File
@@ -79,6 +79,16 @@ class ApiException extends ResourceException
return $this->status === 409;
}
/**
* A charge was refused because it would take the user's open monthly bill above their billing
* limit (409 "billing_limit_reached"). body() has limit, used, remaining, remaining_net,
* required, currency and resets_at.
*/
public function isBillingLimitReached(): bool
{
return $this->status === 409 && $this->error === 'billing_limit_reached';
}
/**
* The ID service could not be reached (network error, timeout) or failed (5xx): retry later.
*/