Skip to content

CreateSubscriptionCheckoutSessionRequest

Source code in docs_src/capo_appmonetization/types/create_subscription_checkout_session_request.py
class CreateSubscriptionCheckoutSessionRequest(TypedDict, closed=True):
    app_id: "capo_appmonetization.types.app_id.AppId"
    """The ID of the app the subscription is for."""
    user_id: "capo_appmonetization.types.user_id.UserId"
    """The ID of the end user being subscribed. Do not include personally identifiable or otherwise sensitive data in this value."""
    plan_id: NotRequired["capo_appmonetization.types.plan_id.PlanId"]
    """The plan to subscribe to or change to. Absent to open the hosted pricing page for the buyer to choose; the response then carries planSelectionRequired.pricingUrl."""
    return_url: "capo_appmonetization.types.url.Url"
    """The URL the buyer's browser is sent to after they complete payment at checkout. If the buyer is sent to a hosted checkout page, this is that page's success-redirect target. If you omit `planId`, the buyer chooses a plan on a hosted pricing page. After that checkout, the buyer returns to the hosted pages, not to this URL."""
    refresh_url: "capo_appmonetization.types.url.Url"
    """The URL the buyer's browser is sent to if they cancel or abandon the hosted checkout page without completing payment (the checkout page's cancel-redirect target). Point it at a page where the buyer can retry. If you omit `planId`, the buyer chooses a plan on a hosted pricing page. After that checkout, the buyer returns to the hosted pages, not to this URL."""
    session_duration_seconds: NotRequired[
        "capo_appmonetization.types.session_duration_seconds.SessionDurationSeconds"
    ]
    """The lifetime of the hosted session, in seconds, counted from this call. Omit to use the service default. It does not set how long pricingUrl works; see expiresAt."""
    client_token: NotRequired["capo_appmonetization.types.client_token.ClientToken"]
    """A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request but does not return an error."""
    scope: "capo_appmonetization.types.request_scope.RequestScope"
    """Required. The environment: live or sandbox."""

app_id instance-attribute

app_id: AppId

The ID of the app the subscription is for.

client_token instance-attribute

client_token: NotRequired[ClientToken]

A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request but does not return an error.

plan_id instance-attribute

plan_id: NotRequired[PlanId]

The plan to subscribe to or change to. Absent to open the hosted pricing page for the buyer to choose; the response then carries planSelectionRequired.pricingUrl.

refresh_url instance-attribute

refresh_url: Url

The URL the buyer's browser is sent to if they cancel or abandon the hosted checkout page without completing payment (the checkout page's cancel-redirect target). Point it at a page where the buyer can retry. If you omit planId, the buyer chooses a plan on a hosted pricing page. After that checkout, the buyer returns to the hosted pages, not to this URL.

return_url instance-attribute

return_url: Url

The URL the buyer's browser is sent to after they complete payment at checkout. If the buyer is sent to a hosted checkout page, this is that page's success-redirect target. If you omit planId, the buyer chooses a plan on a hosted pricing page. After that checkout, the buyer returns to the hosted pages, not to this URL.

scope instance-attribute

scope: RequestScope

Required. The environment: live or sandbox.

session_duration_seconds instance-attribute

session_duration_seconds: NotRequired[SessionDurationSeconds]

The lifetime of the hosted session, in seconds, counted from this call. Omit to use the service default. It does not set how long pricingUrl works; see expiresAt.

user_id instance-attribute

user_id: UserId

The ID of the end user being subscribed. Do not include personally identifiable or otherwise sensitive data in this value.