#storm-lao_code

1 messages ยท Page 1 of 1 (latest)

buoyant harborBOT
#

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

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

acoustic bolt
#

Hi ๐Ÿ‘‹

So you want to transfer some funds related to an individual payment as a sort of comission?

quiet bramble
#

I saw that this code works but it is a subscription system so how to resolve this problem subscription_data: {
application_fee_percent: 70, // 10% des frais d'application
transfer_data: {
destination: "acct_1PFgR3QPAYFw2Cln"
}
}

acoustic bolt
#

That is an entirely different funds flow. I provided you the document that shows you how to solve this problem using the funds flow you specified.

#

Please test that approach first. I think it will solve your exact issue

quiet bramble
#

so for each transaction the amount will be transferred but I have to put it in the wehbook?

acoustic bolt
#

Sorry but what are you talking about? None of that was in the doc I provided

#

Do you mean for asynchronous payment methods? Like SEPA DD?

#

Can you clarify the specifics of what you are trying to achieve?

quiet bramble
#

I just want that when a person uses a promo code 20% of the transaction goes to a connected stripe account

acoustic bolt
#

using what payment methods? How are you generating payments?

quiet bramble
#

I use a subscription via a stripe and a firebase server-side code to create it

acoustic bolt
#

Okay. And you want the connect account to receive 20% for each payment associated with the subscription?

#

Or just the first one?

quiet bramble
#

for each payment

acoustic bolt
#

So you would specify the Account ID in transfer_data.destination and then how much of each payment they would get in transfer_data.amount_percent

quiet bramble
#

ok but I only want this to be done when we use a promo code called "TEST103

acoustic bolt
#

How are you applying the promo code? Is it when a customer enters it in a Checkout page?

quiet bramble
#

when the customer enters the promo code on the payment stripe page

acoustic bolt
#

Okay so a checkout page. In that case you won't know until after the first payment (unless you are using a free trial period).

buoyant harborBOT
quiet bramble
#

how I modify this code to influence multiple connected stripe accounts: subscription_data: {
transfer_data: {
destination: "acct_1PFgR3QPAYFw2Cln",
amount_percent: 30 // 10% of the invoice total will be transferred to the connected account
}

sinful knot
#

Hello
transfer_data,destination can only include one account ID

You should rather use Separate Charges and transfers flow where you create explicit transfers to different connected accounts after subscription amount settles in the platform

quiet bramble
#

the problem is that the transfer does not work because it tells me that the test account is negative while I keep adding funds