Checkout API and Customer Session API changes
To be more consistent across our API, we’ve renamedcustomer_external_id field to external_customer_id in the Checkout API and Customer Session API.- Deprecated:
customer_external_idfield in the Checkout API and Customer Session API. Useexternal_customer_idinstead.
Benefit metadata in Customer State
The customer state now includes the benefit metadata in thegranted_benefits list.Webhook API endpoints are now documented
The API endpoints for managing webhooks are now documented in the API reference, and fully supported in our SDK.Read moreOrder invoice generation and retrieval
Until now, the invoice was generated automatically when the order was created, allowing you to callGET /v1/orders/{id}/invoice and GET /v1/customer-portal/orders/{id}/invoice endpoints without any prior action.We now require you to explicitly generate the invoice by calling the POST /v1/orders/{id}/invoice or POST /v1/customer-portal/orders/{id}/invoice endpoints.This change allows us to better handle the invoice generation process, and to allow the customer to change the billing details (name and address) before generating the invoice. This can be done through the PATCH /v1/orders/{id} or PATCH /v1/customer-portal/orders/{id} endpoints.Benefit metadata support and floating point numbers in metadata
- Added: Benefits now support metadata.
- Added: Metadata values now support floating-point numbers. Before, only strings, integers and booleans were supported.
Checkout amount fields changes and depreciations
To be more consistent with the Order schema changes, we’ve made some changes to the field related to amounts in the Checkout schema.- Added:
checkout.discount_amount. - Added:
checkout.net_amount. - Deprecated:
checkout.subtotal_amount, usecheckout.net_amountinstead.
New order status and webhooks
Until now, Polar only kept track of fully processed, paid orders. To help you keep track of the order lifecycle, we’ve added a new statuspending, which is a transitive state meaning the order is created but not paid yet. In most cases, the order will transition from pending to paid in a short time.- When receiving
order.createdevent, the order status might not bepaid. - Added:
order.updatedwebhook, sent when the order status changes or when it’s partially or fully refunded. - Added:
order.paidwebhook, sent when the order is fully processed and paid. - Added:
Order.paidproperty to the order schema.
If you were relying on the
order.created webhook to keep track of succesful
orders, we recommend you to switch to order.paid.Subscriptions and Orders schema changes
To prepare our next move to support usage-based billing, we’ve made some changes to theSubscription and Order schemas. The main reason behind those is that we need to support multiple prices and items in a single subscription or order.- Deprecated:
Subscription.price_idandSubscription.price. Use theSubscription.pricesarray instead. - Deprecated:
Order.product_price_idandOrder.product_price. Use theOrder.itemsarray instead. - Deprecated:
Order.amount. Use theOrder.net_amountinstead. It has the same value and meaning, but the new name is more explicit. - Added:
Order.subtotal_amount,Order.discount_amount, andOrder.total_amountfields to provide a more detailed breakdown of the order amount.

