#ekaterina-transfers-in-test-mode
1 messages ยท Page 1 of 1 (latest)
Hey there! You can get some available balance for transfers in test mode by using the "bypass pending" test cards for some payments here:
eg: 4000000000000077
Hello !
Thanks ! I dont really understand , where do I put these card data , since I am making transfers through the API , like this :
transfer=await stripe.transfers.create({
amount: total,
currency: 'eur',
destination: supplierStripeId,
transfer_group: transferGroupId
});
That is beacuse , I cant see where to add these card data : https://stripe.com/docs/api/transfers/create
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
You need to collect payments first to increase your balance
Most of the successful test card (like 4242) will have the balance "pending" and you can't transfer it, unless you use source_transaction and link to the pending payment
I have done that , and the balance of my strip test account is like 15K , yet it still shoes that I cannot make transfers because I have no funds
But if you use those special test cards for payments, you get available balance right away
and can make transfers
You also need to switch to manual payouts, otherwise the available funds are earmarked for automatic payouts
Yes , I have also done that
Well that's 0 available
How can I make it available ?
Can you share the account or any example test payment you made to increase you balance?
sure
req_gTWKtlE3fn8dkF
oh , the account
1 sec please
acct_1Jw4DJPPR7urhNAb
And this is how I did it :
transfer=await stripe.transfers.create({
amount: total,
currency: 'eur',
destination: supplierStripeId,
transfer_group: transferGroupId
});
request is great, no worries
Thanks !
well, wait
a couple things:
- this request is for a different account than the one you just shared
- this request is for creating a checkout session, not creating a payment
yes , doesnt the checkout session implicitly handle the payment ?
My bad , I will try to find ones that match
This one should match : req_jGQSeIWsRbxGjr
By "test paymnet to increase the balance" I assumed you rever to any payments comming from a fictional customer, or do you refer to balance top-ups ?
I don't see any recent payments on your paltform account using those test cards
i mean, on your platform you need to collect payments using those test cards to accrue an available balance
if you don't have available balance, you can't transfer unless you link it to a pending charge:
https://stripe.com/docs/connect/charges-transfers#transfer-availability
I am not sure I understand the dfference between payments on your plaftom and actual payments from test cutsomers
Can it be because I only accumulate balance with the checkout sessions ? (instead of the paymentIntent )
You can use checkout if you like, though it is not necessary. EIther works.
The improtant thing is using one of those two test cards.
Ah damn , I will give it a try
All this time I've been trying a complete 42 sequence
yea, you must use 4000000000000077 or the other "bypass pending" card
otherwise it'll sit as pending
I am trying right now
Thanks so much , I will get back with the updates asap
For some add reason , it makes the balance go negative with each payment
odd*
Even tough my basket total is over the application_fee_amount
This is how I create the session :
line_items: orderData.map(orderProduct => {
return {
price_data: {
currency: 'eur',
product: orderProduct.stripeId,
unit_amount: orderProduct.price * 100,
},
quantity: orderProduct.quantity,
}
}),
payment_intent_data: {
transfer_group: transferGroupId,
application_fee_amount: 123,
transfer_data: {
destination: stripeAccount,
},
}
Is application_fee_amount: 123 enough to cover the Stripe fees?
I thought so , yes , but just to make sure I will dramatically increase it
You were right ! It was way too low. Yet the behaviour I had expected would be to receive all the receipts (because I didnt make the transfer yet )
receive all the receipts
sorry, not sure what you mean by this. Can you describe that another way?
Sure
What i mean is , I expected to receive the whole amount of the purchase (say 100 euro) , and then have 100 available => from which be able to make transfers to the supplier of the service
100- stripe fee *
well you're using a destination charge, which does that transfer for you automatically
here is a diagram of what happens with what you're doing:
np!
But what I cant figure out is how to pass an array of connected accounts ? Because transfer_data is an object , and , in one order , I have to transfer to multiple connected accounts
You can't -- that pattern is for transferring to a single account only
If you need to split with multiple accounts you'll have to implement separate charges and transfers: https://stripe.com/docs/connect/charges-transfers
essentially remove that transfer_data and app fee, just collect the payment as you paltform, then create the transfers after like your other snippet
Got it !
๐
๐
I need to step away so Iโm going to archive this thread. If you need help with anything else please ask in #dev-help or contact Stripe Support: https://support.stripe.com/contact
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.