Stripe: How to get the configured API version through API - api

Is there any endpoint in Stripe that returns the current API version configured in the account?
I need it to check if an account uses the last API version or not.
Basically, I get the list of last Stripe API version scraping the page https://stripe.com/docs/upgrades
Then I'd like to connect to the Stripe account via API and heck if it uses the last scraped API version.
If not, I'd like to calculate how many new releases there are between the API version used in the acount and the last API version released by Stripe.
But I need a way to retrieve the API version configured in the account: any ideas?

There is unfortunately no endpoint to find the API version of the account being used.
If you are using Stripe Connect however then it shouldn't matter what default version any connected account has, as long as you pin the API version in your requests and create webhook endpoints with pinned versions.
If you absolutely need the API version of an account, the only real way to find it is to look at the Stripe dashboard: https://dashboard.stripe.com/test/developers

Related

Is there a REST api to create a channel in Agora Web sdk?

I'm trying to integrate our web app with voice/video call feature by using Agora. I have read the documentation on their side, but I have not found any rest api for web sdk to create channel. Basically, when a user joins a channel, we have to pass in the app id, token, and channel name. I know that we can create channel in agora dashboard, but I'm looking for a dynamic way, where we can trigger a REST api to do it. Any help would be greatly appreciated. Thank you.
You can deploy your own token server, that will give you the token based on a channel name and uid.
Here's a pre-built server that you can deploy to Heroku in 2 clicks.
I have been able to build a node js to generate agora io token. It is hosted in heroku. The source code can be found here:
https://github.com/Hoang-Minh/partie-agora-token-generator
Here are the endpoint that you can call to generate a token:
api/agora/rtcToken/:tokenType where
tokenType can be either uid or account, depends on what you need.
The default expiration time that I have is 24 hours.

nodeJS connection with Google API

I am trying to connect hangouts chat API with NodeJS but did not find any documentation related to Oauth in NodeJS, without which I can not connect to APIs. There is a code in Python but is there any thing in Node so that we can do the API call from front end it self.
The Oauth flow is the same for all Google APIs
If there is a quickstart for a specific API in a specific language missing, you can use one from another API.
For example, there is a Node.js quickstart for the Drive API
You can take it as a base and have to modify only 2 things:
Modify
const SCOPES = ['https://www.googleapis.com/auth/drive.metadata.readonly'];
by specifying the scopes you are going to use, for example
https://www.googleapis.com/auth/chat
For building the service, modify
const drive = google.drive({version: 'v3', auth});
to
const chat = google.chat({version: 'v1', auth});
Mind that depending on the application, you might need to use a service account
The documentaiton about implementing a service account in node.js can be found here

Can we use Lydia API or Lydia web sdk with React-Native

Lydia (easy paiement solution) propose Lydia API and web and iOS SDKs
Does anyone has a proof that Lydia auth/paiement actions can work in a React-Native app?
What I actually think:
Using the web sdk will maybe make the auth callbacks impossibles (like a web social auth on cordova => cookies policy errors)
Using the Lydia API using fetch is surelly ok, but without SDK the experience will be limited to create/read data from api.
Thanks by advance
Lydia tech lead here.
All SDKs you can find are just a quick and easy integration of the API : they are mainly distributed to not tech people. Using Lydia to make a payment is easy just one cURL.
Actually, there is no auth required for a payment through Lydia : the only thing you need is a phone number or an email address.
The API will return a link you can redirect the user to. If he has the app, it will open it for a on click payment. If he doesn't he will land on a credit card form. In both case, after the payment, he will redirected to an URL you gave when sending the payment request (meanwhile the payment confirmation will be done by a server to server call).

Stripe.net and Stripe API

Im looking to find out the latest stripe.net (https://github.com/jaymedavis/stripe.net/tree/v6.11.0) compatibility with stripe.com api (https://stripe.com/docs/upgrades).
Does anybody know if there is a compatibility relationship between the stripe.net and stripe.com api?
Per Stripe docs:
When we make backwards-incompatible changes to the API, we release new, dated versions. The current version is 2016-07-06. Read our API upgrades guide to see our API changelog and to learn more about backwards compatibility.
...
All requests will use your account API settings, unless you override the API version.
...
To set the API version on a specific request, send a Stripe-Version header.
Stripe.net sets the Stripe-Version for every request -- currently to 2016-07-06. In the GitHub repo, you can see the code that sets it. See here for the API Version it uses and here where it actually adds the header.

Parse Server and Stripe Events

I am hosting my parse server on Heroku. Before migrating my parse.com account, I used the webhooks feature of parse to process billing events from Stripe using the URL http:KEY#api.parse.com/1/functions/stripEvents in strip's webhooks.
I have installed the node Stripe module as per the instructions of the migration steps.
My understanding is that api calls are no longer supported in the parse server platform. How would I route/send posts sent from Stripe to a function inside the new parse server platform?
Thanks
I stand corrected, it does work.
www.your_app_name.herokuapp.com/path/functions/yourFunctionName is the URL to access a cloud function. You do however need to add the needed security keys. In the case of stripe you past this URL:
https://MASTER_KEY:javascript-key=JAVASCRIPT_KEY#your_app_name.herokuapp.com/v1/functions/FUNCTION_NAME
note that I mount my parse app on path V1.