[stripe-api-announce] New `currency` field on customers

1,515 views
Skip to first unread message

Amber Feng

unread,
Jan 6, 2014, 11:36:42 PM1/6/14
to api-an...@lists.stripe.com
Hey all,

We recently added a new `currency` property on customers:
https://stripe.com/docs/api#customers.

This property represents the currency that the customer's
`account_balance` is in, and therefore the currency the customer can
be charged in for recurring billing purposes (subscriptions, invoices,
invoice items). We'll automatically set the value the first time you
do anything subscription-related or update the account balance on a
customer with no currency set.

It's also important to note that the property is immutable and *does
not* affect once-off charges made on the customer.

Happy to answer any questions or clarify anything!

Amber

--
You received this message because you are subscribed to the Google Groups "Stripe API Announcements" group.
To post to this group, send email to api-an...@lists.stripe.com.
Visit this group at http://groups.google.com/a/lists.stripe.com/group/api-announce/.

Jason Rao

unread,
May 13, 2014, 11:46:11 AM5/13/14
to api-d...@lists.stripe.com, api-an...@lists.stripe.com
Hello,

When I create a customer, I subscribe the customer to a plan. I want to charge customer 'application_fee', for subscription it would be 'application_fee_percent'. The document (https://stripe.com/docs/connect/collecting-fees) suggests that if we want to charge a flat, or if it can not be calculated with 'application_fee_percent', we can mention 'application_fee' when invoice is created. The thing is when the subscription is created the first invoice is closed immediately. So to charge customer one-time fee we can add 'account_balance' while creating the customer (https://support.stripe.com/questions/metered-subscription-billing).

When I do this I get error saying, Stripe::InvalidRequestError (Can't combine currencies on a single customer. This customer has had a subscription, coupon, or invoice item with currency eur):
My guess is, the currency for the customer is set to 'eur' and seems like the 'account_balance' is in cents and that is why the error is.
(If I don't mention the 'account_balance' while creating the customer everything works fine).

Now there will be other workarounds, probably create a charge on 'customer.subscription.created' event. But that is some extra coding and logic implementation, so preferring to set 'account_balance'.

So can you suggest me how can I set 'account_balance' without the currency mismatch issue?

Snippet of code I'm using:

total_payment_amount = (payment_event.amount.to_f * 100).to_i
application_fee = (total_payment_amount * 0.01).to_i

customer = Stripe::Customer.create(
        :account_balance => application_fee,
        :plan => plan.stripe_plan_id,
        :card => stripe_card_token
)

ivan.s...@zentrick.com

unread,
May 14, 2014, 6:19:34 AM5/14/14
to api-d...@lists.stripe.com, api-an...@lists.stripe.com
Hello,

On the related note..are you planning to add support for combining multiple currencies on a single user? Since you are supporting multiple subscriptions on a single customer, we would like to allow them having multiple subscriptions in different currencies.

Jim Danz

unread,
May 14, 2014, 6:40:31 AM5/14/14
to api-d...@lists.stripe.com
Hi Jason,

Thanks for writing in to flag this.
It looks like the issue of the account_balance getting set in merchant
default currency before plan has a chance to dictate customer currency
is simply a bug, and something that we will be fixing shortly.

However, on your broader point, I'm concerned that I don't think
account_balance will be able to help you simulate application fees in
the way that you desire.

Supposing that you have a $10 charge on which you assess a $2
application fee, this means that:
* The end user will be charged $10
* You as the connect owner will net $2
* Your merchant will net $8 - stripe fees.

If you have a $10 invoice and a customer with a $2 account balance:
* The end user will be charged $12
* You as the connect owner will not receive any money
* The merchant will net the full $12 - stripe fees

With this in mind, perhaps I should ask: could you provide a bit more
color around why application_fee_percent doesn't suit your needs? Are
you looking to charge an application fee *only* upon subscription
creation (and at no other time)? Or is the hard constraint that you
always think of your fees as being flat rates, never percentages.

Thanks again for engaging on this; we'll get it sorted.
Jim
> "Stripe API Discussion" group.
> To post to this group, send email to api-d...@lists.stripe.com.
> Visit this group at
> http://groups.google.com/a/lists.stripe.com/group/api-discuss/.
>
> To unsubscribe from this group and stop receiving emails from it, send an
> email to api-discuss...@lists.stripe.com.

Jim Danz

unread,
May 14, 2014, 6:45:15 AM5/14/14
to api-d...@lists.stripe.com
Hi Ivan,

We are hoping to give some to our overall multicurrency+subscriptions
story, but I can't promise imminent changes here. In terms of
multiple currencies on a single user, would you be up for providing a
bit of color around your use case here? We know that we want to a
better job of supporting *merchants* charging for their plans in
whatever currency a customer prefers, but I don't know that we've
thought of use cases for a given *customer* wanting to be charged in
multiple different currencies. Happy to discuss off-list if you
prefer.

(As a separate issue, we're aware that the current format is a little
brittle in that if you set a currency on a customer "incorrectly" / to
a currency other than what you meant, there's no good way to salvage
the customer. So while we may not have "multiple active currencies
per customer" on the nearterm horizon, we at least hope to support
migrating a customer from one currency to another -- in some fashion
-- sooner rather than later.)

Thanks,
Jim
> "Stripe API Discussion" group.
> To post to this group, send email to api-d...@lists.stripe.com.
> Visit this group at

Joel @ Fan.si

unread,
May 14, 2014, 7:33:03 AM5/14/14
to api-d...@lists.stripe.com, Jack Read
Hi Ivan, Jim,

We have a use case regarding multiple currencies for our end users. Our service allows fans to join fanclubs/support artists on a monthly recurring basis. We've seen scenarios already where two artists who are from different countries (Canada and the US in this case), are both using Fan.si but in different currencies. If a fan joins both fanclubs (which is something we allow), the fan will end up designated as one currency or the other.

Sorry for hijacking the convo. Just thought I'd chime in.

J.

--------------------
Joel Augé
M:905.518.0378

Kyle Conroy

unread,
May 14, 2014, 9:36:48 PM5/14/14
to api-d...@lists.stripe.com
> It looks like the issue of the account_balance getting set in merchant
> default currency before plan has a chance to dictate customer currency
> is simply a bug, and something that we will be fixing shortly.

The bug has been fixed! We now check the currency of the plan to
correctly set the customer's currency on creation or update.

Jim Danz

unread,
May 15, 2014, 12:02:12 AM5/15/14
to api-d...@lists.stripe.com
Makes sense -- thanks Joel.

Matt Goldman

unread,
Jun 2, 2014, 1:22:11 PM6/2/14
to api-d...@lists.stripe.com, api-an...@lists.stripe.com
I think I may have found a bug here :-/ When the first subscription is created for a customer, you mentioned that their customer.currency would be set/locked.

The problem is, a customer.updated webhook doesn't seem to fire at that moment. Is this intentional?

Thanks!
Matt

Matt Goldman

unread,
Jun 24, 2014, 5:29:27 PM6/24/14
to api-d...@lists.stripe.com
Jim, 


I think I may have found a bug here :-/ When the first subscription is created for a customer, you mentioned that their customer.currency would be set/locked.

The problem is, a customer.updated webhook doesn't seem to fire at that moment. Is this intentional? I need a way of knowing when the currency changes so I can make updates on my end.

Thanks!
Matt

Jim Danz

unread,
Jun 24, 2014, 5:39:19 PM6/24/14
to api-d...@lists.stripe.com
Hi Matt,

Doh, sorry that we never responded here. This is indeed a bug -- will fix.

Jim

Matt Goldman

unread,
Jun 24, 2014, 5:43:14 PM6/24/14
to api-d...@lists.stripe.com
Awesome! Any rough idea of when it will be fixed (so I can plan accordingly and schedule the manual work on my end until it's fixed) - days / weeks / months / unscheduled?

Thanks for the quick response,
Matt

Jim Danz

unread,
Jun 24, 2014, 5:45:37 PM6/24/14
to api-d...@lists.stripe.com
Days. It's a drop-in on our side, and we should just fix it. You'll
hear from us soon!

Cheers,
Jim

Bryan Berg

unread,
Jun 24, 2014, 8:41:43 PM6/24/14
to api-d...@lists.stripe.com
Hey Matt,

It should be fixed as of a few minutes ago, actually! Let us know if it's not working like you'd expect.

-Bryan

Craig Edmonds

unread,
Oct 16, 2015, 8:50:10 PM10/16/15
to Stripe API Discussion
Hi,

I am using Gravity Forms and using Stripe API Plugin and have created a form which is for monthly subscriptions.

However when I go to test the payment form with the stripe test credit card numbers, I am being given the following error:

Can't combine currencies on a single customer. This customer has had a subscription, coupon, or invoice item with currency us.

I have tried various email addresses, names etc, but still each time its giving me this error.

Kindest Regards
Craig Edmonds

Dathan Bennett

unread,
Oct 21, 2015, 1:25:08 AM10/21/15
to api-d...@lists.stripe.com
Yeah, once a customer object has had a subscription in one currency, it cannot have a subscription in any other currency. I’d love to see this changed — it’d make my life a LOT easier.

D

--
You received this message because you are subscribed to the Google Groups "Stripe API Discussion" group.
To post to this group, send email to api-d...@lists.stripe.com.
Visit this group at http://groups.google.com/a/lists.stripe.com/group/api-discuss/.

To unsubscribe from this group and stop receiving emails from it, send an email to api-discuss...@lists.stripe.com.



--
Dathan Bennett
Software Engineer

Stijn Verrept

unread,
Feb 6, 2016, 2:09:47 PM2/6/16
to Stripe API Discussion
Same here!  At first I only supported EUR, now I support multi-currency but this seems to block my migration path for the existing customers...

Remi J.

unread,
Feb 6, 2016, 2:14:26 PM2/6/16
to api-d...@lists.stripe.com
This is definitely something we're acutely aware of and that we'd like to fix. We don't have a firm timeline for this feature at the moment unfortunately but we are looking into this.

Stijn Verrept

unread,
Feb 6, 2016, 2:27:49 PM2/6/16
to Stripe API Discussion
Ok thanks Remi.  Sorry for my other post (asking for a timeframe), which seems to have crossed your reply here.

Matthew Arkin

unread,
Feb 6, 2016, 10:47:17 PM2/6/16
to Jake K.
One slight hack is to do 1 customer per currency (you'd need to have a table in your database that links like your user id to each customer by their currency). Instead of asking for card info again, you could create a Connect platform and connect yourself to it (its a bit easier than it sounds), and then you could use the shared customers API that basically lets you create a new token for a saved card https://stripe.com/docs/connect/shared-customers.

Its a bit of a hack, but there is a way to do it without bugging customers for their card again atleast.
Reply all
Reply to author
Forward
0 new messages