You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
sdk(python): v2027_01 Checkout model requires product_price_id, which the 2027-01 API no longer returns #16146
With the Python SDK's polar.v2027_01 client, checkouts.create() creates the checkout on the server but then fails to read the response:
polar.base.PolarDeserializationError: Failed to deserialize data: while loading model <class 'polar.v2027_01.outputs.Checkout'> (1 sub-exception)
adaptix.load_error.NoRequiredFieldsLoadError: fields={'product_price_id'}
The 2027-01 API response for a checkout no longer has product_price_id (it has product, product_price, products and prices), and the Checkout schema in the 2027-01 OpenAPI spec doesn't list it either. But polar.v2027_01.outputs.Checkout still declares product_price_id: str | None as a required field. The same field is also required in CheckoutPublic and CheckoutPublicConfirmed of v2027_01.
polar.v2026_10 works fine with the same call.
Versions
polar-sdk 1.0.2 (latest release) and 1.0.3a5 (latest pre-release): both fail the same way
importasyncio, os, uuidfrompolar.v2027_01importPolarAsyncasyncdefmain() ->None:
asyncwithPolarAsync(os.environ["POLAR_ACCESS_TOKEN"], environment="sandbox") aspolar:
products=awaitpolar.products.list(is_archived=False, is_recurring=False, limit=10)
awaitpolar.checkouts.create(
products=[products.items[0].id], # a one-time product with a fixed priceexternal_customer_id=str(uuid.uuid4()),
) # -> PolarDeserializationError: fields={'product_price_id'}asyncio.run(main())
Expected
checkouts.create() returns a Checkout. Probably product_price_id should be removed from (or made optional in) the v2027_01 checkout models, to match the 2027-01 API. Other calls with v2027_01 that we tried (products.list, orders.list) work.
Activity