based on the stripe library