(checkouts)
Create a checkout session.
⚠️ DEPRECATED: This API is deprecated. We recommend you to use the new custom checkout API, which is more flexible and powerful. Please refer to the documentation for more information.. Usecreate
instead.
from polar_sdk import Polar
with Polar(
access_token="<YOUR_BEARER_TOKEN_HERE>",
) as polar:
res = polar.checkouts.create(request={
"product_price_id": "<value>",
"success_url": "http://limp-pastry.org",
})
# Handle response
print(res)
Parameter | Type | Required | Description |
---|---|---|---|
request |
models.CheckoutLegacyCreate | ✔️ | The request object to use for the request. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
Error Type | Status Code | Content Type |
---|---|---|
models.HTTPValidationError | 422 | application/json |
models.SDKError | 4XX, 5XX | */* |
Get an active checkout session by ID.
⚠️ DEPRECATED: This API is deprecated. We recommend you to use the new custom checkout API, which is more flexible and powerful. Please refer to the documentation for more information..
from polar_sdk import Polar
with Polar(
access_token="<YOUR_BEARER_TOKEN_HERE>",
) as polar:
res = polar.checkouts.get(id="<id>")
# Handle response
print(res)
Parameter | Type | Required | Description |
---|---|---|---|
id |
str | ✔️ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
Error Type | Status Code | Content Type |
---|---|---|
models.HTTPValidationError | 422 | application/json |
models.SDKError | 4XX, 5XX | */* |