stripe
Stripe models.
StripeCheckoutSession
pydantic-model
¶
Bases: BaseModel
Represents minimal information on a stripe checkout session.
Fields:
fulfilled = False
pydantic-field
¶
Whether the session has been fulfilled by the API server, i.e., if the user made the purchase whether the product/credits has been assigned to the user's account yet
id
pydantic-field
¶
Unique ID of the stripe checkout session.
url
pydantic-field
¶
The URL the user is redirected to in order to complete the stripe session.
StripeCheckoutSessionCreate
pydantic-model
¶
Bases: BaseModel
Request a Stripe checkout session for one or more credit packages.
The redirect URLs are optional. When the server has a list of allowed application origins, each URL given must point to one of them.
Fields:
-
price_ids(list[str]) -
success_url(HttpUrl | None) -
cancel_url(HttpUrl | None)
cancel_url = None
pydantic-field
¶
Where Stripe returns the buyer when they cancel.
price_ids
pydantic-field
¶
Stripe price ids to purchase, one per package: the price_id of each credit package.
success_url = None
pydantic-field
¶
Where Stripe returns the buyer after payment. Required when the server has no configured application URL to fall back on.
StripePortalSession
pydantic-model
¶
StripePortalSessionCreate
pydantic-model
¶
Bases: BaseModel
Request a Stripe customer-portal session: purchase history and invoices.
Every field is optional; an empty body is a valid request.
Fields:
-
return_url(HttpUrl | None)
return_url = None
pydantic-field
¶
Where Stripe sends the user when they leave the portal. When the server has a list of allowed application origins, it must point to one of them.