API Changelog
Stay up to date with the latest changes, improvements and deprecations to the Polar API.
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_amount
instead.
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 status pending
, 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.created
event, the order status might not bepaid
. - Added:
order.updated
webhook, sent when the order status changes or when it’s partially or fully refunded. - Added:
order.paid
webhook, sent when the order is fully processed and paid. - Added:
Order.paid
property 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 the Subscription
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_id
andSubscription.price
. Use theSubscription.prices
array instead. - Deprecated:
Order.product_price_id
andOrder.product_price
. Use theOrder.items
array instead. - Deprecated:
Order.amount
. Use theOrder.net_amount
instead. It has the same value and meaning, but the new name is more explicit. - Added:
Order.subtotal_amount
,Order.discount_amount
, andOrder.total_amount
fields to provide a more detailed breakdown of the order amount.
Was this page helpful?