#rahal-transfers
1 messages · Page 1 of 1 (latest)
then you probably are not an Administrator on your Stripe account
you should ask whoever is to either change that settings for you or invite you to the team as an admin (https://stripe.com/docs/dashboard/teams)
Ok, and this setup is common between prod and test mode? as my transfert is in test mode for now
that setting is shared between test and live mode yes
if that' a problem you might want to create a new account just for testing with
Ok, grat thanks, it's done
I don't know if I'm doing the transfert the right way.. I way to transfert money to this conecter account from my current balance
presumably you don't have any balance then!
this uses your available balance and you won't have any immediately since payments take a few days to become available (https://stripe.com/docs/payouts#standard-payout-timing)
https://stackoverflow.com/questions/55686949/why-i-am-getting-insufficient-funds-when-trying-stripe-transfers-even-though-i/55687932#55687932 is something I wrote with lots of detail, I'd suggest reading that
Oh.. I made paiements in test mode and they were successful.. but that doesn't mean the money is available
no, they take a few days to clear. There's a test card to skip that period
I used test sepa account for my test
ok, well.. I'll add some founds then try again, thanks
The error changed, I'm a little confused.. it says that sepa_balance is too low. I guess it's because I used 'source_type' => 'bank_account',
hmm. I think you should use source_type:card instead(or just omit it). yes I know that's confusing.
I removed source_type' => 'bank_account' and it worked.. but I don't understand... in prod mode, we are supposed to be working exclusively with sepa_mode , will the "card" have founds?
source_type:bank_account only contains balances from US ACH payments, for some legacy reasons, everything else goes to card. I've never seen this "Your SEPA balance is too low" error before though, maybe something is special about your account. But try it with just removing source_type
yes card will have funds
Even if paiements are made via sepa? sorry I'm asking too much questions
the way it works is if you do payments with US ACH payments, those funds go to bank_account. Everything else(inlcuding SEPA) goes to card
yes
as a side note usually you use source_transaction or destination charges, is there are reason you're not? It creates a lot of work to do it the way you're doing it since you have to keep track of your balance.
ok, thanks for the clarification.. So no need to setup source_type
Ok, let me try to explain what we are trying to do :
- every 28 of the month, we run a "payintent" from all our active clients with sepa
- days later, we run a "transfert" to all our partners ( the amounts are calculated from the succeded paiements )
so we may have 100 paiements , and only 10 or 15 transferts
we do this as I create invoices on the behalf or our partners with the exact paid "services" before initiation the transfert ( so the balance should be enough... althought, i think I need to pay attention to stripe fees )
I don't know if in this setup, I can you source_transaction
maybe we are not doing it right.. I'm trying to keep the "developpement work low" and not throw away existing code
makes sense. I do think you can probably use source_transaction though, don't see why not. You'd just set it to the Charge from the successful PaymentIntent that you ran(multiple transfers can use the same source_transaction for instance)
mutliple transferts can use the same source_transaction, that's good.. but can multiple paymentintent use the same source_transaction too? what if a paiment fails?
PaymentIntents don't use source_transaction so I don't understand that part of the question. For the second part, I would not make the transfer API call until after you know the payment has succeeded and you got the webhooks about it. ( https://stripe.com/docs/payments/sepa-debit/accept-a-payment?platform=web#web-confirm-success)
Guess I don't understand what you meant with this ( You'd just set it to the Charge from the successful PaymentIntent that you ran ) . and I already listen to the webhooks to make sur the paiments are successful.. but I think, it's not enough.. I still need to make sur all the founds are available
or listen for webhooks to make sure funds are received for those payment intents
if I understand correctly, payment_intent.succeeded doesn't necessary mean the money can be transfered
but I think, it's not enough.. I still need to make sur all the founds are available
so when you get thepayment_intent.payment_succeededevent the payment was successful and the funds are added to yourpendingbalance. A few days later(depends on your country, I linked to payout timing earlier), those funds becomeavailable.
If you want to transfer the funds to connected accounts you either :
a) wait until you have enough in your available balance and then call the transfer API
b) use source_transaction https://stripe.com/docs/connect/charges-transfers#transfer-availability , which you can in fact do before the funds are available "By using source_transaction, the transfer request succeeds regardless of your available balance and the transfer itself only occurs once the charge’s funds become available."
I don't undestand how to use source_transaction as I use PaymentIntents for the paiements, do I just need to set an arbitrary value?
but I have multiple PaymentIntents... maybe 100 Payments for 10 transferts ( for example ) , how can I set the source_transaction for my case
that depends on your business logic and how you connect these payments being made to customers to the money your partners make
we have multiple parteners collaborating for the same customer ( so they have a defined percent of their monthy paiement ) , and an affiiliate ( wich we'll also consider as a partners that will have a small percet too ) ... So we have connected accounts for parteners ( businesses ) and affiliates ( individuals ) . and every month, we charge all our customers, et "when all transferts" are in , we make transferts to the connected accounts. I don't know if I explained correctly the business logic
makes sense I suppose
I don't have any input for you! As you said, it's business logic. You'd probably make life easier from an accounting and auditing perspective to link the transfers to appropriate payments in whatever way makes sense for your business.
from the technical perspective all that matters in the API call is the charge you use as the source_transaction has enough pending funds for the amount of the transfer
Sorry, I'm really having a hard time understanding this " is the charge you use as the source_transaction has enough pending funds for the amount of the transfer"
Hey, taking over from @fiery crane – let me catch-up
Ok, yeah. So if you're creating a transfer with amount: 999 and you pass the source_transaction parameter then that Charge/PI must be >= 999
my confusion is about the source_transaction "value" , where to get it? as I explained, I may have 100 paymentIntent and I'll have only 10 transfers ( I need to make sure all the 100 paymentIntent funds are available before initiating the 10 transfers )
The source_transaction would be the ID of the corresponding payment. So likely pi_xxx
https://stripe.com/docs/api/transfers/create#create_transfer-source_transaction
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
That's what I understood.. but I'll have 100 payment and only 10 transfers , so I think I can't use this method
I mean, you don't need to use the source_transaction parameter
If a transfer does not correlate directly with a single payment then it's probably not useful
exactly .. a transfert correlate with multiple payments
So I just need to make sure all payments are sucessful and more importantly that the funds are available. how can I be sure that all Payments are "Available" ?
You'd want to check the Balance object for the account: https://stripe.com/docs/api/balance/balance_retrieve
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
That'll ensure there's sufficient funds to cover the transfer
ok, that's one way.. is there a way to make sure every single Payment Intent is available?
Not really, no. The state of subsequent balance isn't managed on the PI object
there is no weebhooks that I can listen to when the available balance changes then I can know what PI became available?
Well you can listen for balance.available which will fire when funds from a payment become available: https://stripe.com/docs/api/events/types#event_types-balance.available
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
But that won't contain any details about which PI became available
I saw.. but I'll now that every PI is available when pending = 0 ( if we stick to only one paiment cycle per month )
I'm not sure I understand
while listening to the balance.available event, I can still read the pending balance, and if it is = 0 , it should mean than all the PI are available
Yes, but more importantly you want to ensure the available balance is enough to cover the transfers
Ok, gotcha.. I'll juste check my available balance before running all my transfers, Thanks for the feedback
Sure, np!