问题
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.
回答1:
As I understand, you should use Stripe managed accounts
for your customers to make Payouts
.
- https://stripe.com/docs/connect/managed-accounts
- https://stripe.com/docs/connect/payouts
You'll need to collect additional customer verification data to make payouts
to managed accounts:
- https://stripe.com/docs/connect/identity-verification
- https://stripe.com/docs/connect/updating-accounts#account-verification
- https://stripe.com/docs/connect/required-verification-information
- https://stripe.com/docs/connect/testing-verification
回答2:
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!
来源:https://stackoverflow.com/questions/27755663/stripe-send-payment-to-customers