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

mkarnicki's avatar

Does Spark support charging in multiple currencies?

I understand I can choose what currency Spark will charge in.

I would like to know if I can call

Laravel\Cashier\Cashier::useCurrency('eur', '€');

with a currency chosen by the user during registration, right before the charge happens?

For the record, I know I can add custom registration fields, etc., that's required to attempt the aforementioned solution :). Also for the record, I do not own Spark, looking into purchasing. Otherwise I would check myself :).

Thanks!

0 likes
10 replies
Cronix's avatar

I really don't know if that would work (never needed to try it), however, you could always just convert it to a different currency, like if they are using € you could convert it to $ and charge stripe/braintree in $ while displaying € to the user.

I haven't used this package, but it looks like it could do that easily once you know what currency the user wishes to use.

http://lyften.com/projects/laravel-currency/doc/

mkarnicki's avatar

Thank you for the suggestion @Cronix . I specifically want to avoid currency conversion, because there's quite a lot of issues with that (including potential refunds not matching charges, or really weird looking non-USD prices). I got a Braintree account with two merchat account ids (for USD and EUR), so I'm still interested if anyone owning Spark can answer my question. Actually... I just realized this is more Cashier than Spark specific, so Cashier's code should give me the answer :).

mkarnicki's avatar
mkarnicki
OP
Best Answer
Level 8

I'm currently handling USD, but had this idea to handle it in the following way. You can store the selected user currency in the plan attributes (you should have separate plans for different currencies):

            Spark::plan('Early Adopter (USD)', 'plan-name')
                ->trialDays(14)
                ->price(10)
                ->features($features)
                ->attributes([
                    'currency' => 'usd', // <---- plan currency
                    'early' => true,
                ]);

Then I intend to call:

Laravel\Cashier\Cashier::useCurrency($plan->attributes['currency']);

I think we just need to pick the right place to make that call. I think this could work. What do you think @danielmeade ?

1 like
danielmeade's avatar

@MKARNICKI - Ah, yeah something like that could work! I'll have to give it a go when I get around to picking up the project again. Thanks!

aakarim's avatar

Very interesting solution @mkarnicki, never thought to try that. Has anyone had any luck implementing it?

aakarim's avatar

I've tried implementing this, and it does work, but you have to make a few UI changes to make sure you're not displaying one currency when you should be displaying the other. For instance on the 'Subscription' page in the team settings it will display all the available plans in the same currency.

For my product there is a straightforward solution, I just delete the box with the sign up to other plans and replace it with a currency selection dropdown box. I then choose the global app currency using a GeoIP package. This only works because offer one pricing plan per currency, but I can imagine if you're offering multiple plans per currency this solution won't work.

I feel like having a global currency assignment in SparkServiceProvider is unnecessary and Spark could & should be converted to using per-plan currency using per-plan attributes like you described @mkarnicki .

mkarnicki's avatar

@aakarim Hey, sorry I didn't come round earlier. Been a while I peeked in here. Glad this worked for you! And yes, I can imagine it requires extra caution in context of what is displayed to the user currency-wise.

TBH I don't think we'll see this in Spark (just not getting my hopes up), but at least it appears we have this workaround. Cheers!

lukassmith's avatar

also looking into this .. I guess a big issue would be if a customer would switch currency because afaik Stripe does not support this. though maybe this is just an issue if you prorate in case of a plan switch.

robkerry's avatar

Did you find out where Laravel\Cashier\Cashier::useCurrency($plan->attributes['currency']); should be called? I gather that this would change as well, now that Spark uses the env variable CASHIER_CURRENCY instead?

Perhaps it would change to config(['cashier.currency' => $plan->attributes['currency']]); (and require publishing the Cashier vendor config file). But I'm not sure where to call it.

Please or to participate in this conversation.