#lexumi_best-practices
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/1407130160997728390
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
sorry wrong text:
I need to freeze the payment until the buyer confirms that the plant has arrived or unfreeze after 10 days. So:
User lists a plant -> Someone buys it for 10 Euros -> Arrives at buyers home -> Buyer has a link where he can confirm that it arrived (my api which calls stripe api to unfreeze) which unfreezes the 10 Euros on his account balance.
hello! what types of charges are you using here? the easiest way to do this would if you're doing separate charges and transfers, you could just delay the transfer until the confirmation occurs
i don't think there's a way to freeze a certain amount of a connected account's balance (you can pause payouts entirely which you already found but is not the same thing)
const session = await this.stripe.checkout.sessions.create(
{
payment_method_types: ['card'],
mode: 'payment',
billing_address_collection: 'auto',
allow_promotion_codes: true,
line_items: lineItems,
shipping_options: shippingOptions,
optional_items: optionalItems.length > 0 ? optionalItems : undefined,
payment_intent_data: {
application_fee_amount: applicationFee,
metadata,
shipping: {
name: `${shippingData.firstName} ${shippingData.lastName}`,
address: {
line1: shippingData.street,
line2: shippingData.houseNumber,
city: shippingData.city,
postal_code: shippingData.postalCode,
country: shippingData.country,
},
},
},
metadata,
success_url: `${frontendUrl}/purchase-success?session_id={CHECKOUT_SESSION_ID}`,
cancel_url: `${frontendUrl}/purchase-cancel`,
},
{
stripeAccount: sellerStripeId,
},
);
Thats how i currently create the checkout session
so based on the docs do i understand it right?
remove the stripeAccount and add a transfer_group?
Issues i see:
- I have a custom dashboard that shows balance, available for payout, frozen and stuff. So i would need to also save the frozen part in my database
yep! you would save the amount that is frozen and the account you're supposed to send it to, and when you retrieve the confirmation you would initiate a transfer to the connected account
Are there any additional fees for creating a transfer? (stripe fees)
unfortunately i can't really speak to fees as we're only familiar with the integration side of things - if you want to get more details on fee comparisons i would check with our support team
Okay thanks for the quick help :)
no worries! if you wanna stick around for a bit i might check with my team to see if they have any other suggestions for ways to handle this
what connected account type are you working with?
i checked with a colleague around this to confirm my suggestion and they agreed that separate charges and transfers are the best, but that might get a little tricky if your connected accounts are standard accounts
const account = await this.stripe.accounts.create({
type: 'express',
settings: {
payouts: {
debit_negative_balances: true,
},
},
country: 'DE', // TODO: add option to pass country #32
email,
business_type: 'individual',
capabilities: {
card_payments: { requested: true },
transfers: { requested: true },
},
});
Thats how i create a connected account
Sorry for the late reply, didnt see the message :)
nah you're fine! in that case i stand by my prior recommendation
Okay good :) Already startet implementing it :)
sounds good ๐ i'm gonna go ahead and close out this thread unless you have anything else you want to run by me
Nope :) Thanks for all the help :)