Skip to content

Instantly share code, notes, and snippets.

@benfoster
benfoster / flexprice-vs-credyt.md
Last active April 16, 2026 09:20
Flexprice vs Credyt

Credyt vs Flexprice: real-time billing vs invoice-based

Flexprice is an open-source monetization platform that meters usage in real time and generates invoices at end of cycle. Credyt is real-time billing infrastructure where customers prepay into wallets and usage debits immediately. This article compares their billing architectures, pricing, and when each fits.

At a glance

Flexprice: An open-source (AGPLv3) monetization platform targeting SaaS and AI teams evaluating usage-based billing for the first time. Subscriptions, credit wallets, and invoicing are supported as separate billing tracks. Wallet and advanced credit features sit in the paid cloud tiers: Starter at $500/month, Premium at $1,000/month. Available as managed cloud or self-hosted (Docker Compose, AWS ECS/EKS). Founded 2023; v2.1.3 shipped April 2026; 3.6k GitHub stars (github.com/flexprice/flexprice, accessed April 2026).

Credyt: Real-time billing infrastructure for AI products. Pl

@benfoster
benfoster / integration-guide.md
Last active April 21, 2026 13:19
Credyt Integration Guide

Keybase proof

I hereby claim:

  • I am benfoster on github.
  • I am benfoster (https://keybase.io/benfoster) on keybase.
  • I have a public key ASAHVC9RNoa9g8n5MtUGFrXPGegaMX-gzzUSdmnbeKJSwgo

To claim this, I am signing this object:

public static void Execute(ChargeCommand command)
{
var pipeline = new PipelineBuilder<ChargeContext>()
.Register(new TimingHandler())
.Register(new LoggingHandler())
.Register(new ValidationHandler(
validationPipeline =>
{
validationPipeline.Register(new AmountValidator(maxAmount: 500));
}
@benfoster
benfoster / loggingshutdowndetector.cs
Created August 8, 2016 09:52
Serilog Application Shutdown
using Serilog;
using Serilog.Core;
using System;
using System.Web.Hosting;
namespace Merchant.Api.Logging
{
/// <summary>
/// Detects application pool shutdowns and ensures all batched log entries
/// are flushed.
@benfoster
benfoster / pipeline.cs
Created June 23, 2016 07:24
c# Pipeline
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace PipelineDemo
{
// http://www.rantdriven.com/post/2009/09/16/Simple-Pipe-and-Filters-Implementation-in-C-with-Fluent-Interface-Behavior.aspx
public interface IFilter<TContext>
{
@benfoster
benfoster / Global.asax.cs
Created February 10, 2016 10:33
Theme-able View Engine in ASP.NET MVC 4/5
private void InitializeViewEngine()
{
HostingEnvironment.RegisterVirtualPathProvider(new DynamicAssetVirtualPathProvider());
ViewEngines.Engines.Clear();
ViewEngines.Engines.Add(new ThemableViewEngine
{
Theme = ctx => DependencyResolver.Current.GetService<ISiteContext>().Theme.ThemeName
});
@benfoster
benfoster / script.js
Created January 19, 2016 11:41
Disable lightbox on Calico spotlight layout
<script>
$('.fab-portfolio-details .project-media li a')
.css('cursor', 'default')
.on('click', function() {
return false;
});
var dtl = $('.fab-portfolio-details .project-media');
if (dtl.length) {
$.magnificPopup.defaults.disableOn = function() { return false; }
@benfoster
benfoster / MessageHandlerConfig.cs
Created May 27, 2015 11:26
SqlAzureEntityTagStore
private void ConfigureCaching()
{
var services = ConfigurationManager.ConnectionStrings[Constants.FabrikServicesConnectionStringKey];
var cacheControlPolicy = new AttributeBasedCacheControlPolicy(new CacheControlHeaderValue
{
Private = true,
MustRevalidate = true,
NoTransform = true,
MaxAge = TimeSpan.Zero
var gulp = require('gulp'),
$ = require('gulp-load-plugins')({
pattern: [
'gulp-*',
'gulp.*',
'del',
'run-sequence',
'main-bower-files'
]
});