15

I want to use STRIPE PHP API for creating payments to customers and for that i have found the code to create the customers but not for to create payment for them.

Code to create customers: https://stripe.com/docs/api#create_customer

require_once('./lib/Stripe.php'); 
    Stripe::setApiKey("sk_test_k9NE13Q2LjsIvYTNQHiP5C5H");
    Stripe_Customer::create(
     array( "description" => "Customer for test@example.com",
            "card" => "tok_1509ycG2gfbJDdl3oYWMe6yq" // obtained with Stripe.js
     ));

My Scenario is : I have some products and customers comes to my site and purchase the product but some of the customers will come from the affiliate banner and we need to pay some commission amount to the affiliate customers.

So, for such scenario i have to create customers and create payment for them and i have found PHP API code for creating the customers but not for the creating payment to that customers.

Harshal
  • 3,562
  • 9
  • 36
  • 65
  • 1
    `creating payment to that customers` pretty sure stripe doesn't work like that. – Qix - MONICA WAS MISTREATED Jan 03 '15 at 14:04
  • Obvious thing is that I will take the card details or bank details of the affiliate user to create payment after creating them in Stripe system. – Harshal Jan 03 '15 at 14:12
  • @Qix is right; this is not possible with Stripe, at least not now. – elixenide Jan 03 '15 at 14:55
  • @EdCottrell , I'm assuming that if i can create the customer and pay them manually from my stripe Dashboard , so that can also be possible using API. In Reference to these thing I'm able to create the customer but not to create payment. – Harshal Jan 03 '15 at 15:03
  • Stripe is for receiving payments, not making them. You can issue refunds or reduce the amount you charge your customers, but you can't make payments *to* people from your Stripe account. It's just not set up as an affiliate-payment network. – elixenide Jan 03 '15 at 15:04
  • I want that if i create the customer on Stripe and Create payment for them, If you have stripe account then you can see it on https://dashboard.stripe.com/test/customers/ – Harshal Jan 03 '15 at 15:07
  • I'm sorry, but I have no idea what your last comment means. Are you trying to create customers using the API and receive payments from them? Or are you trying to make payments from you to your "customers?" – elixenide Jan 03 '15 at 15:11
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/68137/discussion-between-harshal-mahajan-and-ed-cottrell). – Harshal Jan 03 '15 at 15:26
  • Isn't that the wrong token? Shouldn't it be "ca..."? – fungusanthrax Jul 10 '17 at 14:25

2 Answers2

11

As I understand, you should use Stripe managed accounts for your customers to make Payouts.

You'll need to collect additional customer verification data to make payouts to managed accounts:

Vishnu S Babu
  • 1,570
  • 1
  • 12
  • 23
Viktor Kruglikov
  • 519
  • 6
  • 16
8

I think your problem here is that you're misunderstanding the customer option in the stripe dashboard.

A typical use would be you register a customer and once you've done that you can charge their card as required, i.e., they are still sending you money, which I believe isn't what you want.

Two options I can see for you.

It's possible to transfer money from your Stipe account to a 3rd party bank account or credit card. See stripe transfers and also this FAQ

Alternatively there is a now Stripe Connect which might just be the ticket for you.

Good luck!

David Taiaroa
  • 25,157
  • 7
  • 62
  • 50
  • Thanks for reply but I want to create payment for users not to charge them.See the `My Scenario is` part of my question. – Harshal Jan 03 '15 at 15:05
  • 2
    @HarshalMahajan , yeah sorry, my coffee hasn't kicked in ;) – David Taiaroa Jan 03 '15 at 15:07
  • Stripe Transfer will work only for US accounts, that would be problematic for me and i think Stripe Transfer can get work for me but let me sure about this first. I'm also in contact with support of Stripe. – Harshal Jan 05 '15 at 10:07