Software Engineer, Billing
Software engineeringPosted 7 weeks agofrom Braintrust's own hiring page
- Work type
- On-siteNew York, San Francisco Bay Area, Seattle
- Experience
- Not stated
- Pay
- Not listedUsually $99k a yearSoftware engineering, median, all levels, in the US (Payscale)
- Posted
- 7 weeks ago
Skills it mentions
Add your skills to see which ones you have.
About the job
About the company
Braintrust is the agent observability platform. By actively applying intelligence to agent traces and automatically surfacing the most critical patterns, Braintrust gives teams the visibility to understand how agents behave in production and the tools to improve them.
Teams at Notion, Stripe, Box, OpenAI, and Cloudflare use Braintrust to trace their agents, find the issues in their observability data, and run evals that tell them how to improve.
About the role
We’re looking for a Software Engineer, Billing to build the systems that make Braintrust’s pricing, usage, and payments accurate, scalable, and transparent.
Braintrust helps teams observe, evaluate, and improve production AI agents. Our customers generate large volumes of traces, run automated and human evaluations, use AI-powered product features, and retain data under different plans and policies. Billing needs to turn those product activities into clear, reliable customer experiences—from usage measurement and plan enforcement to invoices, credits, and account state.
You’ll work across the billing stack: usage metering, subscriptions and entitlements, payment integrations, invoicing, credits, and the internal systems that reconcile them. This is a deeply technical IC role. It is not a finance-operations role, and it is not a backend generalist role that contributes to billing occasionally.
You’ll be a technical authority on billing correctness and scale, helping Braintrust launch pricing models that let customers adopt the platform with confidence as their AI workloads grow.
What you'll do
Core responsibilities:
Own Braintrust billing architecture end-to-end, including metering, plans, subscriptions, entitlements, invoices, credits and payments.
Design our billing architecture to solve immediate needs and simplify billing for new features as they are developed and released.
Ensure Braintrust accurately measures and bills for product usage, including processed data, evaluation scores, model usage, and data retention.
Partner with product, infrastructure, finance, and customer-facing teams to introduce new pricing models and billing workflows with confidence.
Build the systems that power Braintrust billing, such as:
A reliable usage-metering and aggregation pipeline that turns product activity into accurate customer usage.
A subscription, limits, and entitlement system that supports plan allowances, feature access, trials, upgrades, and on-demand usage.
Internal tools and APIs for investigating billing anomalies, issuing credits, and helping customers understand their account state.
Observability across the billing pipeline, including metering lag, event completeness, reconciliation discrepancies, and payment health.
Ideal candidate credentials
Expert-level understanding of TypeScript, Rust, SQL, backend systems, APIs, and distributed data-processing patterns
Experience building and operating production usage-based billing, payments, or subscription systems
Experience with metering, aggregation, idempotency, reconciliation, and event-driven architectures
Experience integrating with Stripe or similar payment infrastructure
Experience building or maintaining financial ledgers, credits, balances, or invoice systems is a plus
Comfortable shipping end-to-end, from backend infrastructure and data systems to internal tools and customer-facing UI
Previous experience founding or working at startups is a plus
Has an appreciation for the tension between moving quickly and preserving customer trust and billing correctness
Benefits include
Medical, dental, and vision insurance
Daily lunch, snacks, and beverages
Commuter benefits
Flexible time off
Competitive salary and equity
Wifi & cellphone stipend
Equal opportunity
Braintrust is an equal opportunity employer. All applicants will be considered for employment without attention to race, color, religion, sex, sexual orientation, gender identity, national origin, veteran or disability status.
Interested?Software Engineer, Billing at Braintrust
Apply on company site (opens in a new tab)The job ad ends here
Interview questions for this job6 with answers, on TypeScript, Rust and SQL
Interview questions for this job
For the skills the ad mentions: TypeScript, Rust and SQL.
Is there a way to check for both `null` and `undefined`?TypeScript
Using a juggling-check, you can test both
nullandundefinedin one hit:if (x == null) {If you use a strict-check, it will only be true for values set to
nulland won't evaluate as true for undefined variables:if (x === null) {You can try this with various values using this example:
var a: number; var b: number = null; function check(x, name) { if (x == null) { console.log(name + ' == null'); } if (x === null) { console.log(name + ' === null'); } if (typeof x === 'undefined') { console.log(name + ' is undefined'); } } check(a, 'a'); check(b, 'b');Output
"a == null"
"a is undefined"
"b == null"
"b === null"
From Stack Overflow: asked by David Liu, answered by Fenton (CC BY-SA 4.0)
What is this question mark operator about?Rust
As you may have noticed, Rust does not have exceptions. It has panics, but their use for error-handling is discouraged (they are meant for unrecoverable errors).
In Rust, error handling uses
Result. A typical example would be:fn halves_if_even(i: i32) -> Result<i32, Error> { if i % 2 == 0 { Ok(i / 2) } else { Err(/* something */) } } fn do_the_thing(i: i32) -> Result<i32, Error> { let i = match halves_if_even(i) { Ok(i) => i, Err(e) => return Err(e), }; // use `i` }This is great because:
- when writing the code you cannot accidentally forget to deal with the error,
- when reading the code you can immediately see that there is a potential for error right here.
It's less than ideal, however, in that it is very verbose. This is where the question mark operator
?comes in.The above can be rewritten as:
fn do_the_thing(i: i32) -> Result<i32, Error> { let i = halves_if_even(i)?; // use `i` }which is much more concise.
What
?does here is equivalent to thematchstatement above with an addition. In short:- It unpacks the
Resultif OK - It returns the error if not, calling
From::fromon the error value to potentially convert it to another type.
It's a bit magic, but error handling needs some magic to cut down the boilerplate, and unlike exceptions it is immediately visible which function calls may or may not error out: those that are adorned with
?.One example of the magic is that this also works for
Option:// Assume // fn halves_if_even(i: i32) -> Option<i32> fn do_the_thing(i: i32) -> Option<i32> { let i = halves_if_even(i)?; // use `i` }The
?operator, stabilized in Rust version 1.13.0 is powered by the (unstable)Trytrait.See also:
From Stack Overflow: asked by Angel Angel, answered by Matthieu M. (CC BY-SA 4.0)
Can I concatenate multiple MySQL rows into one field?SQL
You can use
GROUP_CONCAT:SELECT person_id, GROUP_CONCAT(hobbies SEPARATOR ', ') FROM peoples_hobbies GROUP BY person_id;As Ludwig stated in his comment, you can add the
DISTINCToperator to avoid duplicates:SELECT person_id, GROUP_CONCAT(DISTINCT hobbies SEPARATOR ', ') FROM peoples_hobbies GROUP BY person_id;As Jan stated in their comment, you can also sort the values before imploding it using
ORDER BY:SELECT person_id, GROUP_CONCAT(hobbies ORDER BY hobbies ASC SEPARATOR ', ') FROM peoples_hobbies GROUP BY person_id;As Dag stated in his comment, there is a 1024 byte limit on the result. To solve this, run this query before your query:
SET group_concat_max_len = 2048;Of course, you can change
2048according to your needs. To calculate and assign the value:SET group_concat_max_len = CAST( (SELECT SUM(LENGTH(hobbies)) + COUNT(*) * LENGTH(', ') FROM peoples_hobbies GROUP BY person_id) AS UNSIGNED);From Stack Overflow: asked by Dean Rather, answered by che (CC BY-SA 4.0)
What is TypeScript and why should I use it instead of JavaScript?TypeScript
I originally wrote this answer when TypeScript was still hot-off-the-presses. Five years later, this is an OK overview, but look at Lodewijk's answer below for more depth
1000ft view...
TypeScript is a superset of JavaScript which primarily provides optional static typing, classes and interfaces. One of the big benefits is to enable IDEs to provide a richer environment for spotting common errors as you type the code.
To get an idea of what I mean, watch Microsoft's introductory video on the language.
For a large JavaScript project, adopting TypeScript might result in more robust software, while still being deployable where a regular JavaScript application would run.
It is open source, but you only get the clever Intellisense as you type if you use a supported IDE. Initially, this was only Microsoft's Visual Studio (also noted in blog post from Miguel de Icaza). These days, other IDEs offer TypeScript support too.
Are there other technologies like it?
There's CoffeeScript, but that really serves a different purpose. IMHO, CoffeeScript provides readability for humans, but TypeScript also provides deep readability for tools through its optional static typing (see this recent blog post for a little more critique). There's also Dart but that's a full on replacement for JavaScript (though it can produce JavaScript code)
Example
As an example, here's some TypeScript (you can play with this in the TypeScript Playground)
class Greeter { greeting: string; constructor (message: string) { this.greeting = message; } greet() { return "Hello, " + this.greeting; } }And here's the JavaScript it would produce
var Greeter = (function () { function Greeter(message) { this.greeting = message; } Greeter.prototype.greet = function () { return "Hello, " + this.greeting; }; return Greeter; })();Notice how the TypeScript defines the type of member variables and class method parameters. This is removed when translating to JavaScript, but used by the IDE and compiler to spot errors, like passing a numeric type to the constructor.
It's also capable of inferring types which aren't explicitly declared, for example, it would determine the
greet()method returns a string.Debugging TypeScript
Many browsers and IDEs offer direct debugging support through sourcemaps. See this Stack Overflow question for more details: Debugging TypeScript code with Visual Studio
Want to know more?
I originally wrote this answer when TypeScript was still hot-off-the-presses. Check out Lodewijk's answer to this question for some more current detail.
From Stack Overflow: asked by Mohammed Thabet, answered by Paul Dixon (CC BY-SA 4.0)
What's the de-facto way of reading and writing files in Rust 1.x?Rust
None of the functions I show here panic on their own, but I am using
expectbecause I don't know what kind of error handling will fit best into your application. Go read The Rust Programming Language's chapter on error handling to understand how to appropriately handle failure in your own program.Rust 1.26 and onwards
If you don't want to care about the underlying details, there are one-line functions for reading and writing.
Read a file to a
Stringuse std::fs; fn main() { let data = fs::read_to_string("/etc/hosts").expect("Should be able to read hosts file"); println!("{}", data); }Read a file as a
Vec<u8>use std::fs; fn main() { let data = fs::read("/etc/hosts").expect("Should be able to read hosts file"); println!("{}", data.len()); }Write a file
use std::fs; fn main() { let data = "Some data!"; fs::write("/tmp/foo", data).expect("Should be able to write to `/foo/tmp`"); }Rust 1.0 and onwards
These forms are slightly more verbose than the one-line functions that allocate a
StringorVecfor you, but are more powerful in that you can reuse allocated data or append to an existing object.Reading data
Reading a file requires two core pieces:
FileandRead.Read a file to a
Stringuse std::fs::File; use std::io::Read; fn main() { let mut data = String::new(); let mut f = File::open("/etc/hosts").expect("Should be able to open `/etc/hosts`"); f.read_to_string(&mut data).expect("Should be able to read to string"); println!("{}", data); }Read a file as a
Vec<u8>use std::fs::File; use std::io::Read; fn main() { let mut data = Vec::new(); let mut f = File::open("/etc/hosts").expect("Should be able to open `/etc/hosts`"); f.read_to_end(&mut data).expect("Should be able to read data"); println!("{}", data.len()); }Write a file
Writing a file is similar, except we use the
Writetrait and we always write out bytes. You can convert aString/&strto bytes withas_bytes:use std::fs::File; use std::io::Write; fn main() { let data = "Some data!"; let mut f = File::create("/tmp/foo").expect("Should be able to create file"); f.write_all(data.as_bytes()).expect("Should be able to write data"); }Buffered I/O
I felt a bit of a push from the community to use
BufReaderandBufWriterinstead of reading straight from a fileA buffered reader (or writer) uses a buffer to reduce the number of I/O requests. For example, it's much more efficient to access the disk once to read 256 bytes instead of accessing the disk 256 times.
That being said, I don't believe a buffered reader/writer will be useful when reading the entire file.
read_to_endseems to copy data in somewhat large chunks, so the transfer may already be naturally coalesced into fewer I/O requests.Here's an example of using it for reading:
use std::fs::File; use std::io::{BufReader, Read}; fn main() { let mut data = String::new(); let f = File::open("/etc/hosts").expect("Should be able to open `/etc/hosts`"); let mut br = BufReader::new(f); br.read_to_string(&mut data).expect("Should be able to read to string"); println!("{}", data); }Read the rest at the sourceFrom Stack Overflow: asked by Jared, answered by Shepmaster (CC BY-SA 4.0)
Can you tell us about a personal achievement at work?Behavioural
Employers usually base questions on jobs you have done in the past. This gives you the chance to talk about your experience. For instance, they might ask:
- when have you faced a challenging situation?
- can you tell us about a personal achievement at work?
- have you ever taken the initiative?
- have you ever failed at a task?
Your answers should reflect the skills the employer wants. Be positive and tailor your examples to the job description.
If you don't have much work history, you can use examples from outside of work. You can also use examples from volunteering experience.
Use the STAR method to help structure your answers.From National Careers Service: interview advice (Open Government Licence v3.0)
Similar jobs
- Member of Technical StaffClera, San Francisco Bay Area, on-siteToday
- Software Engineer II, Warehouse Management SystemsFlexport, Seattle, on-siteYesterday
- Software Engineer, Safety Data FlywheelOpenAI, Remote, San Francisco Bay AreaYesterday
- Senior Staff Software EngineerFivetran, San Francisco Bay Area, hybridYesterday
More like this: Software engineer jobs in New York (301), Jobs in New York (6,234) and Software engineer jobs in the USA (1,765)



