Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Conversion's avatar

Spark Pay as You Go

Hi Everybody,

We are actually launching a project using Spark and we would like to have both the already implemented billing solution ( subscription ) and also the pay as you go plans means the customers can choose to pay for example for 10000 api calls, Is anybody working on that actually, or have any information about that ?

Best Regards,

0 likes
2 replies
ejdelmonico's avatar

Use Cashier for the pay as you go billing through stripe. Spark is built on top of Cashier and is already within your project. You can basically do whatever Stripe will allow with Cashier.

2 likes
jekinney's avatar

To piggyback on @edjelmonico.

I've implemented this in a few ways. First for one off charges, stripe doesn't store c/c data for one click payments. So I set up a dynamic priced subscription. Price defaults to zero.

When a user "subscribes" their c/c is validated and they are assigned that subscription (no charge yet, but c/c is valid and stored.

If they actually subscribe to a plan then you can "upgrade" to that plan. If they instead want to by API access, they are charged via explicitly setting a price on the original plan.

Other cases I just implemented my own payment gateway to handle one off payments. The stripe API and docs are above average.

2 likes

Please or to participate in this conversation.