Hey fellow reader!
We've got a short but sweet update in case you haven't been following along with Spike. Some big, some small improvements. Nonetheless, all important in helping you get the most out our billing portal. Let's get started!
Bug fixes & small improvements
First of all, throughout the different version updates there has been numerous bug fixes and improvements, such as:
- Fix for subscription resuming when using Paddle
- Ability to override success/cancel URLs when using Stripe Checkout
- Fix for offline subscriptions (without payment card) when using Paddle
- Fix for
view:cache
Laravel command when using Stripe driver - Fix for theme colour not being applied when using
wire:navigate
- Fix UI not handling payment methods other than card
- Fix for race-condition creating multiple Stripe customers
- Fix for current subscription plan not being recognised when using custom resolvers
- ... and more!
So whichever version of Spike you're currently rocking, don't forget to upgrade to get the latest fixes and improvements.
Now, let's move to bigger changes that can help you run your business better.
Spike v3.8
Negative Credit Balances
By enabling negative balances on whichever credit types you want, your users will accumulate a credit balance that they will later pay for. Enabling it is easy - just add Credits::allowNegativeBalance();
to your AppServiceProvider. More flexibility is possible, and you can pass a callback to it to determine whether certain users or credit types should be allowed to have negative balances. Read more in the docs here.
Spike v3.10
Disabling Spike web routes
Small change, but important if you have decided to build your own UI around Spike. Quite a few actually do that!
If you decide you no longer need the Spike's in-built billing portal UI, you can disable it simply by setting the path
to null
:
- 'path' => 'billing',
+ 'path' => null,
Spike v3.13
Stripe Checkout Locale
By default, Stripe's Checkout will use the visitor's browser locale. If you'd like to force a specific locale instead, you can change the default locale for Stripe Checkout in the Spike config:
'stripe' => [
// ...
'checkout' => [
// ...
'default_locale' => 'nl',
],
Spike v3.15
Adding notes when spending credits
Previously, adding notes was not possible when spending credits. But, it seems to be a very useful and much requested feature, so here it is.
You can now add notes when spending credits, so that your users can clearly distinguish what they spent the credits for.
// Spend with an additional note (visible to the user)
$user->credits()->spend(2, 'Premium API call');
There's one requirement for this to work - you have to disable usage grouping, and that's as simple as adding updating this option in your config/spike.php
configuration file:
/*
|--------------------------------------------------------------------------
| Credit spend grouping
|--------------------------------------------------------------------------
|
| By default, credit usage information is grouped daily. This means that
| if a user makes 100 requests in a day, there will only be a single
| usage record for that day. This is useful for performance, but
| does not allow adding notes to each individual usage record.
|
*/
'group_credit_spend_daily' => false,
Spike v3.16
Support for Strong Customer Authentication
Previously, Spike UI was missing support for handling customer cards that requires SCA (or 3D Secure) authentication during purchases or subscription actions. You were forced to enable Stripe Checkout option instead, but even then it might not have handled failed payments correctly.
With this update, your users will see numerous warnings and the ability to complete the payment in order to continue with the subscription:

Massive improvement both for you as a business owner and your users wanting to continue with your services.
How to upgrade?
Simply run the Composer require command with the latest version.
composer require opcodes/spike:^3.16
If you're installing Spike from scratch, learn how to Install Spike here.