Stripe API outdated

Hello!

I am having trouble with Stripe API

I get response which indicates error:

{

“error”: {

"code": "parameter_unknown",

"doc_url": "https://stripe.com/docs/error-codes/parameter-unknown",

"message": "Received unknown parameter: account[legal_entity]",

"param": "account[legal_entity]",

"type": "invalid_request_error"

}

}

It seems that Sharetribe is usind outdated version of the API

https://stripe.com/docs/upgrades

My Stripe Dashboard says I may be using multiple versions:

https://stripe.com/docs/building-plugins#set-api-version

library should use the setApiVersion function.

Stripe.api_version = " 2019-02-19"

How can I do that? Editing config.yml? Please help.

My Sharetribe is installed according to this:

https://freedif.org/how-to-install-sharetribe-for-ubuntu-16-04

Regards,

Tommi

Hi Tommi!

Indeed, Stripe has changed things few days ago, without any prior warning. All Stripe accounts created after February 19th are affected.

We’re working on a fix and hope to publish it to the master branch pretty soon. We’ll keep you posted!

And I am one of those unfortunate ones. Good to hear that fix is coming up!

https://github.com/sharetribe/sharetribe/pull/3637

So when the fix is published, what steps should I take to update the software?

Best regards,

Tommi

As soon as this will be merged to master, you will simply have to update your installation to the latest master branch commit.

We’ll also probably make a release for that, however we’ll publish fixes in many different steps, as impacts are quite important and varies per country.

We’ll keep you posted!

@Tommi_Lehtonen Now the fix has been merged to master. As Thomas said you simply need to update your installation to the latest master branch commit.

There is still a couple of finishing touches that we need to work on, but in general the integration should work.

Best regards!

Many thanks for your work! I will try it as soon as I can.

I did exactly what was instructed here:

https://github.com/sharetribe/sharetribe/blob/master/UPGRADE.md

and rebooted server to make sure. But sharetribe still makes the old Stripe API calls. Maybe I am missing something?

git checkout latest
HEAD is now at 32c51a2… Changes to version 7.5.0

  1. Disable systemd scripts
    sudo systemctl disable sharetribe
    sudo systemctl disable sharetribe2
    sudo systemctl disable sharetribe3

Checked they are not active anymore:

systemctl list-unit-files | grep enabled

  1. Stopped systemd scripts
    sudo systemctl stop sharetribe
    sudo systemctl stop sharetribe2
    sudo systemctl stop sharetribe3

git fetch --tags
git checkout master
git pull

bundle install
npm install
RAILS_ENV=production rake db:migrate
RAILS_ENV=production rake assets:precompile

Then did the startup scripts. Still send the old API schema, when saving my payment information. I am still learning this, please be patient.

Please point me to right direction? I may be missing something very elementary.

First, you did great to use git checkout master! As we’ve mentioned, we haven’t published a release (probably 7.6.0, in a few days), so that code is only available from the master branch.

One thing that was not instructed is that you should enable the new API code via a feature flag. Because it doesn’t affect all of the dozens of thousands marketplaces we host, we enable it only for selected marketplace.

After you’ve updated your code to the latest master branch, you should run the following in your Rails Console: FeatureFlagService::API::Api.features.enable(community_id: YOURMARKETPLACEID, features: [:new_stripe_api]), where YOURMARKETPLACEID is your marketplace ID (probably 1).

Hopefully this helps!

1 Like

Yes, now it works! Thanks, much appreciated! :ok_hand: Learning piece by piece :slight_smile:

Hello,
I also have Stripe’s problem and trying to merge. But I can’t see 7.6.0 release. Is it done, in which commit ?
Thanks,
Marion

Hello Marion,

we’ve published 7.6.0 few hours ago, see https://www.sharetribe.com/community/t/sharetribe-version-7-6-0-is-now-available/1969

Hopefully this helps!

1 Like