Latest

Thursday, July 13, 2017

Does Laravel Spark Support Stripe Quantities?

Asked by: Alan Storm


In Laravel Spark, (it's my understanding) you can tie your billing plan to a billing plan already setup in Stripe with code that looks something like this

    Spark::plan('Basic', 'provider-id-1')
        ->price(10)
        ->features([
            'First', 'Second', 'Third'
        ]);

where provider-id-1 is the Stripe ID of you billing plan. The 10 listed as price is used for local display -- the actual price is setup in Stripe. (if this is incorrect, please let me know)

Does Laravel Spark support Stripe's concept of quantities? I don't see anything about this in the docs, but I'm sometimes bad at reading docs.

If not -- has anyone extended Laravel Spark to use quantities. If so, what was involved? I assume you'd need to

  1. Change the Strip API behavior to send along quantities when subscribing a user

  2. Change Laravel display code to display a quantity based pricing

  3. More things that didn't occur to me?

If Laravel spark doesn't support quantities, does anyone know which classes/files are responsible for the two items above? (particularly the Stripe API classes)



Source

No comments:

Post a Comment

Adbox