Moosa
Moosa

Reputation: 3216

Stripe - delaying transfers in a marketplace app

I'm building a marketplace app. I'm using Stripe to accept buyer payments and transfer a percentage to the seller. However, stripe only let's you transfer from your stripe balance. So if I accept a buyer payment that takes 2 business days to show up in my stripe balance, I can't transfer payment as a sale occurs. I get an insufficient balance error from Stripe.

Is there a way to delay the transfer by say 3 days so the transfer is initiated after the buyer payment clears? I want to queue up transfers automatically rather than manually initiate each sellers transfer.

Is this possible or is the only option for me to pay out of my pocket by funding my stripe balance while waiting for the charges to clear?

Upvotes: 6

Views: 2051

Answers (5)

Ian
Ian

Reputation: 379

When creating separate charges and transfers, your platform can inadvertently attempt a transfer without having a sufficient available balance. Doing so raises an error and the transfer attempt fails. If you’re commonly experiencing this problem, you can use the source_transaction parameter to tie a transfer to an existing charge. 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. https://stripe.com/docs/connect/charges-transfers#transfer-availability

Alternatively create the initial charge with a destination account, and include your commission in that.

Upvotes: 0

Rahul Sharma
Rahul Sharma

Reputation: 1431

Yes, this is definitely possible using stripe connect. you can transfer a fixed percentage to seller every time using stripe connect destination charges.

You can choose a better approach which suits your business model from here

there is two option I think your business model should fit. Direct charges and destination charges. I am giving links to understand the flow of funds in both the methods. You should also see the section collecting application fees.

  1. Direct charges flow of funds
  2. Destination Charges flow of funds

Upvotes: 0

Rishabh Tayal
Rishabh Tayal

Reputation: 496

I have the same model for my payment requirement. The way it's supposed to work is:

  1. Create a 'managed' account on Stripe on behalf of the seller/merchant. You can do it through their API. You will get the stripe account information for that merchant. You need to store that info somewhere in your DB for future reference.
  2. When a buyer pays for the product create a 'charge token' API call. You need to set the 'destination' parameter to the merchants account. You can also specify 'application_fee' parameter to take a percentage of the total amount in your Stripe account.

That way you would need to make only one API call that would take care of charging the buyer and paying the merchant (taking your cut off).

Upvotes: 0

futureProgrammer25
futureProgrammer25

Reputation: 71

What I've done so far that has worked for me is to create the charge, associate it to a seller. Then I created a sales history page where the seller has a button that says "complete order". Once the seller presses the button does the transfer begin. Hope this helps.

Upvotes: 0

rfunduk
rfunduk

Reputation: 30442

There's no way to delay the transfer via the API. Besides funding your account, I think your best bet is to just do this delay on your end.

The easiest way would be to just make a table in your database that describes the transfer to make, and the date/time to make it, then run a cronjob that finds transfers that should be made and perform them (and mark them as paid or delete the record).

Upvotes: 2

Related Questions