#aaron_app-connect

1 messages ยท Page 1 of 1 (latest)

chilly girderBOT
static fogBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

chilly girderBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1273743345054777395

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

cursive raptor
#

Hey, sorry to make another threat - the last one got closed when I walked away.

#

The thread ID is 1273711949305085995 from the #dev-help channel.

#

it was @wet star on this one

chilly girderBOT
gentle igloo
#

@cursive raptor yes if you are building a Stripe App it will work the same as Connect and you can use that parameter

#

aaron_app-connect

cursive raptor
#

Awesome. Do you know what we'd need to pass in to get this to work?

Right now we're already passing the users OAuth key (so we can make the request on their account).

This is our code where accessToken is the users access token from our Stripe App.

    async #stripeRequest(url, params = {}) {
        const accessToken = await this.#refreshToken();
        const method = params["method"] || "GET";
        const headers = {
            "Authorization": `Bearer ${accessToken}`,
            "Content-Type": "application/x-www-form-urlencoded"
        };
        const data = params["data"] || {};
        url = `${url}?${new URLSearchParams(data)}`;
        let response = await fetch(url, {
            method: method,
            headers: headers
        });
        return response;
    }```
gentle igloo
#

You shouldn't need to "pass in" anything specific.

cursive raptor
#

How would it know to give our app the platform fee?

gentle igloo
#

I think it's better to focus on real examples. What did you do that errored and what exact error are you taking?

#

Sure you have to pass the parameter my colleague gave you but that's already what we're talking about

cursive raptor
#

We actually haven'tr tried yet we just don't know where to start in getting this to work

#

yeah say we pass that subscription_data.application_fee_percent param, how does that request know to give our Stripe App Account the platform fee?

#

Because the request is being made on the users stripe account with their accessToken

#

Does the request just know automatically it's coming from our Stripe App?

gentle igloo
#

the "access token" is specifically for your app so yes that's how we know, otherwise we wouldn't know you are making the request

cursive raptor
#

ahhhhhh interesting! okay okay

#

wow that's amazing, thank you so much for your help

gentle igloo
#

sure thing! I think just try it and see if it works and if it doesn't I can have a look!

cursive raptor
#

for sure, we'll get to testing and come back if we have issues. you saved us so much time fumbling around

gentle igloo
#

happy to help!

cursive raptor
# gentle igloo happy to help!

Also quick question - you said that accounts connected to our app are essentially Connected Accounts.

Is that only for specific endpoints or can we assume that we can use the applicable Connect features in an endpoint

gentle igloo
#

Apps are basically a new version of Connect with more granular permissions, otherwise they work the same

cursive raptor
#

awesome. a wealth of knowledge right here

gentle igloo
#

we're always happy to help! If your thread is closed when you come back (we keep them open only a short time as we help hundreds of developers a week), you can always start a new thread with a new question ๐Ÿ™‚

cursive raptor
#

totally get it - you can close this one if you'd like. have a great day koopajah! you're the best