pub struct CreateCheckoutSessionRequest {
pub plan_id: String,
pub success_url: Option<String>,
pub cancel_url: Option<String>,
}Expand description
CreateCheckoutSessionRequest model.
Fields§
§plan_id: String§success_url: Option<String>Where to send the customer afterwards (billing.ts resolveReturnTarget, since #457): a path,
resolved against the caller’s origin (Origin, then Referer) or, without one, the public
web origin (https://snaga.ai on production); an absolute URL on one of those two origins;
or the app’s own scheme — snaga://…, the same test the OAuth callback uses
(isMobileReturnTo), which is what the iOS and Android apps send. Anything else is 422.
Absent or empty: /browser/settings/billing?success=1 on that origin.
cancel_url: Option<String>Where to send the customer afterwards (billing.ts resolveReturnTarget, since #457): a path,
resolved against the caller’s origin (Origin, then Referer) or, without one, the public
web origin (https://snaga.ai on production); an absolute URL on one of those two origins;
or the app’s own scheme — snaga://…, the same test the OAuth callback uses
(isMobileReturnTo), which is what the iOS and Android apps send. Anything else is 422.
Absent or empty: the billing settings page (/browser/settings/billing) on that origin.