#sapient_api
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/1286619790131068961
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- sapient_api, 23 hours ago, 3 messages
- sapient_api, 1 day ago, 5 messages
- sapient_api, 4 days ago, 16 messages
We wish we could help, but you need to talk to Stripe support
We can only help on Discord if all of the following are true:
- ๐งโ๐ป You must be a developer
- ๐ ๏ธ Your question must be about building a Stripe integration
- โ๏ธ Your question must be technical/developer focused
- โฑ๏ธ You must be available to respond in realtime
- ๐ฅ You must be comfortable receiving help in public (this is a public server)
If any of those aren't true please contact Stripe support.
If all of those are true we may have misunderstood your question; please provide more details below.
Note that using an inappropriate button or submitting inappropriate information is a violation of our rules. You will be removed from this server if you repeatedly create invalid threads.
Please reach out to Support, regarding fees, we don't know much about it in this channel because this is for technical integration questions only.
plz show this image i tell about fee
Those are Application Fees, defined by the Platform Account.
i tell about this fee
what's your question about them?
i have create connected account and For example one user make 206$ payment so 200$ send to connected account and 6$ send to stripe account holder...but now in my case 200 send successfuly to connected account but not send 6$ to stripe account holder account cut some charge which is show in image which i already send you
account cut some charge which is show in image
are you talking about the processing fee that is paid to Stripe? https://stripe.com/pricing
As for the rest of your message: what code did you write to make that payment and transfer?
createConnectedAccount: async (daycareName, email, profile_id) => {
return new Promise(async (resolve, reject) => {
try {
const account = await stripe.accounts.create({
type: "express",
metadata: {
daycare_name: daycareName,
email: email,
profile_id: profile_id,
},
});
const accountLink = await stripe.accountLinks.create({
account: account?.id,
refresh_url: process.env.USER_FRONTEND_URL,
return_url: process.env.USER_FRONTEND_URL,
type: "account_onboarding",
});
return resolve({ account, accountLink });
} catch (error) {
console.log(`createConnectedAccount error: `, error);
return reject({
status: false,
message: `Unable to createConnectedAccount in stripe.`,
});
}
});
},
i uesd this code for make connected account
that code is not related to how you make the payment and transfer.
this is code for transfer amount code
const paymentIntent = await stripe.paymentIntents.create({
amount: updates.platform_fee + updates.amount,
currency: "cad",
confirm: true,
payment_method_types: ["card"],
application_fee_amount: updates.platform_fee,
transfer_data: {
// destination: "acct_1PyXSjGhu91MNezT",
destination: daycareBankAccount.stripe_account_id,
// amount: updatedSubscription.amount,
},
payment_method: "pm_card_visa",
});\
this is code for payment link
addRegistrationFeeSessionInStripe: async (
stripe_product_price_ids,
existUser
) => {
try {
const session = await stripe.checkout.sessions.create({
mode: "payment",
billing_address_collection: "auto",
phone_number_collection: {
enabled: true,
},
invoice_creation: {
enabled: true,
},
line_items: stripe_product_price_ids,
customer: existUser[0].stripe_customer_id,
payment_method_types: ["acss_debit", "card"],
// payment_method_types: ["card"],
payment_method_options: {
acss_debit: {
mandate_options: {
payment_schedule: "interval",
interval_description: "On ",
transaction_type: "personal",
},
verification_method: "automatic",
},
},
metadata: {
user_id: existUser[0].user_id,
user_name: existUser[0].user_name,
user_email: existUser[0].user_email,
},
// Redirect to the client
success_url: ${process.env.USER_FRONTEND_URL}/registration-fee-payment-success,
cancel_url: ${process.env.USER_FRONTEND_URL}/registration-fee-payment-failed,
});
return session;
} catch (error) {
console.error("Error creating Stripe session:", error);
throw error; // This will allow the caller to handle the error appropriately
}
},
cool. So that's a Destination charge and the way fees work is described in details at https://docs.stripe.com/connect/destination-charges?platform=web&ui=elements#flow-of-funds-app-fee
Did you have a specific question?
so it is deducted every time or any solution for this or any calculaiton for this charge
?
it is deducted
what is "it" you're referring to?
means fee is ddecucted everytime ??
the Stripe processing fee, you mean? https://stripe.com/pricing ?
then yes, of course. It costs money to process a payment, we deduct a fee from each charge we process, that's how our business works.
If you're using Connect there are various means to think about this and who pays the fee etc, it's all described in the docs.
If you're using Destination Charges, your platform pays us the processing fee. You need to set your own application_fee high enough that you can both pay us, and make a profit.
When a client of my website makes a payment, the amount charged by Stripe for the amount connected to the account and the amount going to the strip account holder's account (shown by the red line in the photo I sent you) is to be collected from the customers of my website. So if there is any specific charge, I can calculate it and take it from them.
Or this charge will be different at all payment times ??
the calculation for the fee is described in https://stripe.com/pricing and you can check the values in test mode (https://docs.stripe.com/expand/use-cases#charges-in-payout) and write your own logic to "predict" what the fee will be, and potentially add that amount to the amount you are charging the end-customer.
you should consult your business's legal advice though since that sort of "surcharging" the customer for processing fees is not allowed in all jurisdictions.
but how i know payment is done with which card ??
in your code above you pass a PaymentMethod into payment_method when creating the PaymentIntent
you can retrieve the PaymentMethod and look at details of it like the brand/country, so you know what logic to use for fees.
i used for canada
Hey, taking over here. Let me know if there's any follow-up Qs I can answer!
When a client of my website makes a payment, the amount charged by Stripe for the amount connected to the account and the amount going to the strip account holder's account (shown by the red line in the photo I sent you) is to be collected from the customers of my website. So if there is any specific charge, I can calculate it and take it from them.
Or this charge will be different at all payment times ??
and may stripe account country is canada.
Or this charge will be different at all payment times ??
It will likely vary depending on the payment method/card used to make the payment as per details here
i.e. 'international' cards have a higher fee
As stated, you will need to write logic in your application to calculate the fee for the payment and then add that to the charge accordingly if you want your customers to pay the fees