Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how split payments by stripe api?

I am building a website for charity donations. I have to get payment a from user/donator and transfer 20% to the website account and 80% to the donation campaign account. Using PayPal I have adaptive payments method, but what should I do with Stripe payments? Which method can be used for the Stripe API?

like image 835
Mian Majid Avatar asked Dec 15 '15 08:12

Mian Majid


People also ask

Does Stripe offer split payments?

You can split funds between multiple users, instantly route payments across borders, and specify your earnings on each transaction.

How does Stripe payment API work?

The API uses a single object to track each process. You create the object at the start of the process, and after every step you can check its status to see what needs to happen next. For instance, while completing a payment, a customer might try several payment methods.

Does Stripe have P2P?

Yes, but Stripe is a more expensive P2P payment processor, as they charge transaction fees for payment option.

Can Stripe deposit to multiple accounts?

Multiple bank accounts for different settlement currencies In some countries, Stripe users can add extra bank accounts to enable settlements and payouts in additional currencies. You can add one bank account per supported settlement currency.


2 Answers

You need to use Stripe Connect for this.

Basically, the platform (= you) would have your own Stripe account, and each donation campaign would have their own account, connected to yours (meaning they granted you permissions to accept payments on their behalf).

You would then be able to create charges for them, using the application_fee parameter to specify your split. There are two different ways to go about it, which are explained here: https://stripe.com/docs/connect/payments-fees.

like image 110
Ywain Avatar answered Sep 29 '22 16:09

Ywain


well you can also use it with stripe connect and distribute it like this

// Set your secret key: remember to change this to your live secret key in production
// See your keys here: https://dashboard.stripe.com/account/apikeys
\Stripe\Stripe::setApiKey("sk_test_0nEtpmgWlX0mXXE6aMXQhhs1");

// Create a Charge:
$charge = \Stripe\Charge::create(array(
  "amount" => 10000,
  "currency" => "gbp",
  "source" => "tok_visa",
  "transfer_group" => "{ORDER10}",
));

// Create a Transfer to a connected account (later):
$transfer = \Stripe\Transfer::create(array(
  "amount" => 7000,
  "currency" => "gbp",
  "destination" => "{CONNECTED_STRIPE_ACCOUNT_ID}",
  "transfer_group" => "{ORDER10}",
));

// Create a second Transfer to another connected account (later):
$transfer = \Stripe\Transfer::create(array(
  "amount" => 2000,
  "currency" => "gbp",
  "destination" => "{OTHER_CONNECTED_STRIPE_ACCOUNT_ID}",
  "transfer_group" => "{ORDER10}",
));
like image 23
Lonare Avatar answered Sep 29 '22 17:09

Lonare