Jun 30, 2025

Jun 30, 2025

Jun 30, 2025

Jun 30, 2025

Commit #1 : Introducing The Developer Toolkit

Explore Flexprice's latest product updates, including new Python and JavaScript SDKs, fire-and-forget event ingestion, real-time analytics APIs, credits management, and webhooks.

Billing systems weren’t built for how software works today.

Especially not for fast-moving AI teams dealing with usage spikes, model swaps, or infra variance across customers and the developers are still stuck rewriting the billing logic you ‘shipped’ three sprints ago?

So we’re shipping a developer-first toolkit that makes it easier to send events, track them, and use them to create customized dashboards.

Here’s everything that’s new.

SDK improvements

We’ve expanded SDK support, Flexprice now includes two more SDKs, alongside the existing Golang SDK

We’ve also introduced fire-and-forget mode for event ingestion. Given how fast billing events can scale, this mode allows you to push events without waiting for the API response.

# Create an event
event = DtoIngestEventRequest(
    external_customer_id="<your_db_customer_id>",
    event_name="api_call",
    properties={"region": "us-west", "method": "GET"},
    source="my_application"
)

# Submit asynchronously (fire-and-forget)
events_api.events_post_async(event)

The SDK handles event delivery asynchronously in the background with built in auto-retry logic, so your application logic stays clean and responsive.

You can also put verbose metadata in the event that you want to track. Here are some examples:

  • tool_calls: how your AI model was used

  • region: where your infra is hosted

  • caching_used: true

We have also shipped a real time event debugger. Every event you send:

  • Shows up instantly on admin UI.

  • Clearly shows the timestamp, source, and original payload.

  • Can be filtered by customer, event type, or source tag.

The event debugger screen of Flexprice

Event analytics API

We track usage usually means, “Here’s a dump of raw events, now go build a dashboard and explain it to your customer.”

That doesn’t work when your users are asking:

  • “Which model cost us the most last week?”

  • “Why did usage spike on Friday?”

  • “How much of that was Claude vs GPT-4?”

The usage data tab of Cursor

Example: Detailed usage breakdown from Cursor’s billing tab

Event usage API

We have built a real-time flexible endpoint that gives you billing-grade usage data you can actually use. Using this API you can:

  • Pull event-level usage across any time period

  • Group it by source and/or feature

  • Filter it down to a single customer, source, or feature

  • Get back usage, cost, and event counts

  • Bucket the usage by window size (ex 30 mins, 1 day, etc) to get back chart-ready datapoints

request = DtoGetUsageAnalyticsRequest(
    external_customer_id="your_db_customer_id",
    group_by=["source", "feature_id"]             # final usage and cost per group
    property_filters={"model": ["o4-mini-high"]}, # filter by any property
    window_size=WindowSize.MINUTE,                # per-minute buckets for graph
)

response = events_api.events_analytics_post(request=request)

Simplismart, one of our customers, built a visual dashboard that displays stacked bar charts of node minutes per model, bucketed by day.

This gives their customers a quick, high-level view of infrastructure usage, model performance, and deployment costs all in one place.

Simplismart event usage tab

Credits

If your product runs on prepaid usage,  think credits for API calls, tokens, image generations, compute time,  you’ve probably built some version of this in past

  • A balance tracker in your DB

  • A cron job to expire unused credits

  • A half-working admin tool to top up user wallets

And every time something breaks, it’s on you to figure out where the credits went, what got applied, why the balance dipped,  and explain all of it to support, finance, and the customer.

Flexprice takes that burden off your shoulders, starting with two key upgrades

Free credits for new signup

Giving trial credits to new users at signup is one of the most common patterns we’ve seen.

Until now, this meant first creating a wallet, then calling a separate top-up endpoint, and hoping the sequence held up in production.

Now, you can do both in one step. Create a wallet and preload it with credits using a single line of code.

request = DtoCreateWalletRequest(
    currency="USD",
    external_customer_id="your_db_customer_id",
    initial_credits_to_load=100
)

response = wallets_api.wallets_post(request=request)

Now you can do it in a few easy steps. When creating a wallet, you can pass:

  • The initial number of credits

  • An optional expiry date (for trial/promo logic)

  • A conversion rate between currency and credits

Control which credits get used first

Every credit top-up now supports priority settings.

Here’s why that matters: let’s say a user has leftover promotional credits that expire in 7 days, and they just purchase new credits today. You want the promo credits to be  used first, not the freshly purchased ones.

With Flexprice, you can:

  • Set custom priority levels on every credit topup

  • Automatically deduct from the highest-priority batch first

  • Expire credits independently, without affecting the rest of the wallet

This means:

  • Free and paid credits don’t clash

  • Expiring credits are used first (without you having to write any custom logic)

  • Credit balances stay clean, explainable, and user-friendly

Check how Apollo.io does it:

Apollo.io offers 100 free credits per user/month on their free plan. That’s an “initial balance” per user wallet. Once you run out, you can purchase more credits as top-ups. That’s exactly the kind of flow you can build with this Flexprice feature, but completely customizable.

Apollo.io credit function screen

Webhooks

When using Flexprice, your app generates events that you can listen to and use to trigger workflows. Each time an event is fired, it appears in the webhook logs inside the Flexprice dashboard, helping you inspect payloads, catch delivery issues, and retry failed attempts.

Example workflows

  • A new billing period approaches for a customer. You can subscribe to the invoice.update.finalized event → you can trigger an automated email reminding them of the upcoming charge.

  • Customer has purchased the subscription and you want to trigger a welcome email. Subscribe to the subscription.createdevent → trigger a customised email to the customer.

Full list of events available - https://docs.flexprice.io/docs/webhook/webhooks

Webhook log screen of Flexprice

Wrapping up

That’s Day 01 of Commit. And we’re just getting started, wee’ve got 4 more days, 4 more launches. Each one fixing a broken piece of billing infra.

→ If you have any questions, talk to us

Sign up for launch updates to get tomorrow’s drop in your inbox

See you on Day 02.

Blogs

Blogs

Blogs

More insights on billing

Insights on
billing and beyond

Explore expert tips, industry trends, and best practices for billing, pricing, and scaling revenue.

Get started with your billing today

Get started with
your billing today