Right way to credit to marketplace owner's bank account via Balanced Payouts API

211 Views Asked by At

How do I initiate a credit from my market place's escrow to my own bank account via balanced payouts API ?

Should I create a customer representing my website via the dashboard, attach my bank account to that customer and then send a credit ? Is there an easier to do this via the API ?

1

There are 1 best solutions below

2
On

Each marketplace should have a owner_customer object that represents the marketplace owner. You'll want to add the bank account to this object which will then allow you to issue a simple credit.

I'm not sure what client library you're using, but in balanced-ruby this would look something like:

marketplace.owner_customer.add_bank_account(bank_account.uri)
marketplace.in_escrow
=> 32065655
marketplace.owner_customer.credit(
    :amount => 100000,
    :description => "Collect revenue",
    :destination_uri => bank_account.uri # without destination_uri, defaults to most recent bank account
)
marketplace.reload
marketplace.in_escrow
=> 31965655

You may also add the bank account via your Dashboard settings and just use that bank account URI as destination_uri in the credit.