Connect Manual Charge + Transfer Question

767 views
Skip to first unread message

Dmitriy

unread,
Jun 3, 2017, 11:35:21 AM6/3/17
to Stripe API Discussion
Hi Guys,
I seem to be running into an issue w/ manual transfers.  I followed a use case by grouping transactions for separate charges and transfers.  Charged amount is listed under pending balance & it appears that transfer is being denied.  

While when I try a use case where I apply charge + destination, it appears that system automatically creates a transfer transaction properly to the destination account.  So I was expecting a manual transfer to work in similar way as i need multiple transfers to take place and perhaps keeping manual transfer(s) in pending status as well.

Am I missing something here? 


charge:   {amount=30975, transfer_group=1111, currency=USD, customer=cus_xxx}

transfer1: {amount=590, transfer_group=1111, destination=acct_yyy, currency=USD}

transfer2: TBD


com.stripe.exception.InvalidRequestException: Insufficient funds in Stripe account. In test mode, you can add funds to your available balance (bypassing your pending balance) by creating a charge


Thank you,

Dmitriy

Remi J.

unread,
Jun 3, 2017, 11:42:06 AM6/3/17
to api-d...@lists.stripe.com
Hey Dmitriy,

When you create a destination charge, the transfer is created automatically for you and associated with the original charge. In that case, the transfer is linked to the charge's availability which means the funds are not available immediately. We will release the funds in the connected account once the funds for the original charge are available which would be two days later.

When you split charges and transfers though, you have to manually create the transfer yourself. Even though you associate the charge with one or multiple transfers via `transfer_group`, this transfer is taken out of your own available Stripe balance. This allows you to charge John Doe $10 on behalf of a third-party but send them the funds upfront from your own balance.

In your case though the funds are not available and you don't have any other funds available in your balance. The charge's funds are in the pending balance and will stay there for two days.

You have two solutions here:
- You wait two days for the charge's funds to be available and at that point you split them in one or multiple transfers to connected accounts via `transfer_group`.
- You use `source_transaction` [1] when creating the transfer and pass the charge's id (ch_XXXX) in it. This allows you to create a transfer from your pending balance that will follow that charge's availability similar to how it works for destination charges.

Based on your needs, the second option seems best and you can always create another transfer later for the remaining amount and link everything together with the same `transfer_group`.

Hope this helps!
Remi


--
You received this message because you are subscribed to the Google Groups "Stripe API Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to api-discuss+unsubscribe@lists.stripe.com.
To post to this group, send email to api-d...@lists.stripe.com.
Visit this group at https://groups.google.com/a/lists.stripe.com/group/api-discuss/.

sarath kurup

unread,
Jun 7, 2017, 11:44:37 AM6/7/17
to api-d...@lists.stripe.com
Hey Dmitriy, 

"com.stripe.exception.InvalidRequestException: Insufficient funds in Stripe account. In test mode, you can add funds to your available balance (bypassing your pending balance) by creating a charge"


First you make a charge with "4000 0000 0000 0077" as the card number in test mode.Then you will get balance in your account.

then go to Payouts -> Settings -> Payout schedule  change to Manual 

            c#
            //Creating a transfer to other Stripe account
            var myTransfer = new StripeTransferCreateOptions();
            myTransfer.Amount = 300;     //means $3
            myTransfer.Currency = "usd";
            myTransfer.Destination = "acct_1blah_blah";    //connected account ID 

            var transferService = new StripeTransferService("sk_test_blah_blah");
            StripeTransfer stripeTransfer = transferService.Create(myTransfer);  //get TransferId (tr_blah_blah)

            //Retrieving a transfer details
            StripeTransfer stripeRetrievingTransfer = transferService.Get("tr_blah_blah"); //pass TransferId (tr_blah_blah)

            //List all transfers
            IEnumerable<StripeTransfer> response = transferService.List(); // optional StripeTransferListOptions


Thanks,
Sarath

Reply all
Reply to author
Forward
0 new messages