← Questions

Monthly AI token billing with plan switching

0
StripeCodingLast asked Sep 2026

A coding interview question asked in Stripe's HackerRank assessment, last asked Sep 2026. It tests parsing, hash map and billing.

You are building the monthly invoice step for a chat-based AI product that charges by token usage. Each chat session produces one record, given as a comma-separated string with exactly four fields: plan is payg (pay as you go) or fixed.

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

What it tests

parsing · hash map · billing · rounding

Your code and the AI tutor open when you unlock this question.