mimic Stripe api more