Easy Labs
Changelog

React SDK changelog

Release history for `@easylabs/react`.

Synced from packages/easy-react/CHANGELOG.md on the latest publish. This is the canonical release history for @easylabs/react.

Unreleased

BREAKING CHANGES

  • Removed balance transfer operations from the SDK surface.
  • Migration: Treasury operations are managed internally by Easy Labs.

0.0.10

Patch Changes

  • 7134a80: Update ProductData for new api contract returning price ids array

0.0.9

Patch Changes

  • Added comprehensive subscription management capabilities including subscription plans and customer subscriptions:

    Subscription Plans:

    • getSubscriptionPlans(params?) - List all subscription plans with optional filtering
    • getSubscriptionPlan(planId) - Get a specific subscription plan
    • createSubscriptionPlan(data) - Create a new subscription plan with:
      • Billing intervals (DAILY, WEEKLY, MONTHLY, QUARTERLY, YEARLY)
      • Trial periods with configurable duration
      • Discount phases for promotional pricing
      • Billing defaults (invoice/receipt settings)
    • updateSubscriptionPlan(planId, data) - Update an existing plan

    Customer Subscriptions:

    • getSubscriptions(params?) - List all subscriptions (admin context)
    • getCustomerSubscriptions(params?) - Get subscriptions for authenticated customer
    • getSubscription(subscriptionId) - Get a specific subscription
    • createSubscription(data) - Create a subscription with:
      • Buyer details (name, email, phone)
      • Subscription details (trial overrides, discount overrides)
      • Payment instrument configuration
    • cancelSubscription(subscriptionId) - Cancel an active subscription

    Integration:

    • Recurring prices now automatically create subscriptions during checkout
    • Mixed cart support (one-time purchases + subscriptions in single transaction)
    • Subscription data included in order line items for tracking

    All list/collection endpoints now support filtering by specific IDs using the ids query parameter:

    Affected Methods:

    • getCustomers({ ids: ['cus_123', 'cus_456'] })
    • getProducts({ ids: ['prod_123', 'prod_456'] })
    • getPrices({ ids: ['price_123', 'price_456'] })
    • getOrders({ ids: ['ord_123', 'ord_456'] })
    • getTransfers({ ids: ['tfr_123', 'tfr_456'] })
    • getSettlements({ ids: ['set_123', 'set_456'] })
    • getDisputes({ ids: ['dis_123', 'dis_456'] })
    • getSubscriptions({ ids: ['sub_123', 'sub_456'] })
    • getSubscriptionPlans({ ids: ['plan_123', 'plan_456'] })

    This enables efficient batch fetching of specific resources without retrieving entire collections.

    Updated Return Value: The checkout() and related checkout methods now return enhanced data:

    {
      order: OrderData;              // The created order
      customer: CustomerData;         // Customer information
      subscriptions?: SubscriptionData[]; // Auto-created subscriptions (if cart contains recurring items)
    }

    Benefits:

    • Immediate access to created subscription IDs
    • No need for separate API calls to fetch subscription details
    • Simplified post-checkout subscription management
    • Better support for mixed carts (one-time + recurring)
    • Added comprehensive subscription examples to Node.js and React SDK docs
    • Updated DEVELOPER_DOCS.md for both packages
    • Enhanced Docusaurus site with subscription management guides
    • Added batch query parameter documentation across all endpoints

    Checkout Return Value: The checkout methods now return an object with { order, customer, subscriptions? } instead of just the order. Update your code:

    // Before
    const order = await checkout(data);
    
    // After
    const { order, customer, subscriptions } = await checkout(data);
    • Fixed price display for subscription products (now uses subscription_plan.amount)
    • Improved type safety for discriminated union types (CreatePrice, CreateSubscription)
    • Fixed controlled input warnings in form components

Patch Changes

  • Introduces a new checkout method to the EasyProvider context, consolidating and generalizing the checkout logic for both new and existing customers.
    • Add handlers for getting a customers payment instruments and orders
    • Add handler for updating payment instrument
    • Add handlers for getting order(s) and updating order tags
    • Add handlers for getProductWithPrice(s). This is used for either getting all the prices for a product or a specifc one. Different from returning the default_price_id

0.0.8

Patch Changes

  • Create EasyApiClient class to handle all the interactions with easy-api, this reduced a lot of repetitive code that was happening between the node and react packages
  • Add product and price management APIs
  • Fix type handling for payment instrument params
  • Changed anonCheckout & checkoutExistingCustomer to only return the id's of paymentInstrument & transfer instead of the entire data object

0.0.7

Patch Changes

  • Support separate card input elements in EasyProvider

0.0.6

Patch Changes

  • Update amount handling and type references

0.0.5

Patch Changes

  • Refactor types package into common and update configs

0.0.4

Patch Changes

  • Switch easy-react to tsdown build system

0.0.3

Patch Changes

  • Add environment-based API URL selection
  • Add tags support to customer, instrument, and transfer forms + refactor types
  • Expose tokenizePaymentInstrument from EasyContext

0.0.2

Patch Changes

  • Fixed API endpoints and andded updateCustomer method

0.0.1

Patch Changes

  • initial release

On this page