#aaron_stripe-app-application-fee
1 messages ยท Page 1 of 1 (latest)
๐ 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/1273711949305085995
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Basically we want to charge a 1% fee for successful checkout sessions created through our app. The app is a Stripe App installed on a customers Stripe account.
Is there a way to do this?
Hi ๐
How does your app create checkout sessions? Can you share a request?
For sure.
async createCheckoutSession(params = {}) {
params["method"] = "POST";
const response = await this.#stripeRequest(StripeUrls.stripeCheckoutSessionsUrl(), params);
const responseData = await response.json();
if (response.ok) {
console.log(responseData)
return responseData;
} else {
const error = responseData["error"];
throw new StripeAPIError(`${error.type}: ${error.message}`)
}
}
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;
}```
We basically just create a checkout session on the users account using their access_token, then direct users to that session URL
Hi there ๐ catching up here as my teammate needed to step away.
aaron_stripe-app-application-fee
I'm looking around, because offhand I'm not sure you can charge for the usage of a Stripe App like that.
Me neither, but we saw a competitor offering that on their pricing model so we figured there might be a way
But they use the legacy Stripe Extentions so I'm not sure if that's different. I'm also not sure if they made all their customers Stripe Connect Accounts, if that's something we can even do while letting them keeping their account.