#lexumi_best-practices

1 messages ยท Page 1 of 1 (latest)

modest pikeBOT
#

๐Ÿ‘‹ 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.

dusty cairn
#

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.

digital berry
#

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)

dusty cairn
#
    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:

  1. 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
digital berry
#

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

dusty cairn
#

Are there any additional fees for creating a transfer? (stripe fees)

digital berry
#

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

dusty cairn
#

Okay thanks for the quick help :)

digital berry
#

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

dusty cairn
#
    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 :)

digital berry
#

nah you're fine! in that case i stand by my prior recommendation

dusty cairn
#

Okay good :) Already startet implementing it :)

digital berry
#

sounds good ๐Ÿ™‚ i'm gonna go ahead and close out this thread unless you have anything else you want to run by me

dusty cairn
#

Nope :) Thanks for all the help :)