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.
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
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!
Related
We currently have a website that uses eWay token payments and setup Auto Order for customers. They can manage what items are in the auto orders and at what frequency the orders will be placed.
After the first order we can save the users 'Token' with eWay and charge their card at each instance.
We would like to add in the ability to pay with PayPal, but cannot see a similar feature where future orders can be placed without the user interacting.
The issue is that the price may differ from original payment, as discounts for the item may change or the user could add in other products to the auto order. So we don't want to have a repeat purchase setup in PayPal, rather automatically charge the users account when needed.
Been looking through paypal API docs and nothing is jumping out as the correct way to proceed.
We have tried payments through eWay to PayPal however they are not supporting paypal through their gateway anymore so are not much help.
Our website is PHP, Mysql driven and we currently use PayPalExpress checkout API for single orders.
For PayPal, the receiving account needs a feature called "reference transactions". This is not enabled by default in the live environment (though it is in sandbox). It requires business approval, so the PayPal account owner should contact PayPal's general customer support or an account manager (note: not technical support) to discuss the business need for the feature.
Once approved for the "reference transactions" feature on a live business account, PayPal can guide you on which API to best integrate to make use of this. Something like v2 or v3 vault and that API's payment tokens are a possibility that sounds exactly what you are describing, though there are other (older/legacy) APIs that use something called a "billing agreement" as what's effectively a token as well.
I need to integrate stripe payment below use-case
I have two customers, customer one wants to send the money to customer two, how we can achieve this ??.
I have one idea when customer one send money to customer two means, we can move money owner of the stripe getway, then we will move money owner account to customer t
I'm using PHP SDK
There's no way to do this with Stripe Customers, but you can ~do it with Stripe Connect.
That said, I'd recommend you write into Support first and make sure they can support your use case: https://support.stripe.com/contact/email
I was wondering for a bit of clarification and help regarding Stripe.
Basically, I have the following:
//get the card token from the stripe request
$customerTok = request('stripeToken');
//create the customer with this token
$customer = \Stripe\Customer::create(array(
"email" => \Auth::user()->email,
"source" => $customerTok,
));
Where customerTok is the bank token passed by Stripe.js (entering their card number, cvc and exp date), and I'm creating the customer in my Stripe Dashboard.
$cardTok = \Stripe\Token::create(array(
"card"=>$customer->sources->retrieve(default_source),
));`
Then I grab a token for their card? (I think this is wrong but this is the principle?)
I now need to make them into a connect managed account (I need users to be able to pay each other, like eBay)
$account = \Stripe\Account::create(
array(
"country" => "GB",
"managed" => true,
"external_account"=>$customer->id,
));
Obviously this isn't production ready code, I'm just trying to understand the flow and if I'm understanding this correctly.. Can anyone explain why this isn't working right now and what I'm getting wrong?
Thanks,
Generally, you cannot retokenize payment information from saved customers (outside of specific scenarios).
Note also that Stripe can only do payouts to debit cards (not credit cards), and only in the US. In all other countries, Stripe can only do payouts to bank accounts.
If your platform's users are both buyers and sellers, you will need to create two different resources for each of them:
a customer object to act as a payment source (when the user buys something)
an account object to act as a payment destination (when a user sells something)
I recommend that you reach out to Stripe's support at https://support.stripe.com/email to explain your business model so that you can receive personalized advice for your integration.
Hi we are creating a mobile app for marketplace where we are hoping to get eBay model implemented. Where buyer will pay the seller and we will take our cut from the seller. We actually don't want to get payment ourself for the sale and handle the disputes for order shipping or chargebacks.
When a sale is done on our app, the buyer should send the payment to the sellers paypal and then Paypal will handle all the other stuff regarding that like disputes or chargebacks.
I want seller to link his paypal account to our app and we will take permissions for future payments and maintain a record where we can calculate his fee regarding sales made on our platform. Paypal Mobile SDK support this feature.
But my question here is how can we automate the original purchase process? One option is when a sale is done, we will send invoice from seller side to the buyer (possible using Paypal REST API) and open invoice pay link on the buyer side. Once the buyer pay the invoice and transfer the funds to the seller we will know that sale is approved successfully because as a Paypal facilitator we have access to that invoice (we actually sent that invoice to the buyer as we have permissions of invoicing of seller account).
But what if we don't want invoicing system? Can we implement anything where buyer will send the funds to the seller without generating an invoice from our app. Like when a sale initiated, we will present buyer a page where he will pay directly to the seller (without us involved) and we will track that transaction and make outstanding cut on that sale?
My Research so far
Payapl mobile SDK for iOS don't allow us to take permissions for invoicing, we can take single, future or profile sharing permissions in app
Paypal Rest API allow us to take permissions for invoicing but not for future payments (that is necessary to take our cut from the seller's account)
If we use Paypal Mobile SDK, we can take funds in our account but not directly to our sellers account
Adaptive payments is an option where can take funds from buyers and after deducting our cut send the rest to the buyer but in that case we will be primary recipient and seller will be secondary, being a primary recipient we are responsible for shipping the product which at this stage we don't want. Want want to be seller as primary recipient
Any help regarding our situation would be greatly appreciated. We just want to automate the system somehow with the APIs and SDKs without being the primary recipient. Please give us suggestion to make this a reality. Thanks
Using any other payment gateway like Stripe or Braintree will not help here because in that case we will be taking money as registered merchants. We would really like to work with Paypal for handling all order related stuff
The Express Checkout API supports Parallel Payments, in which case you specify the SELLERPAYPALACCOUNTID in the request. This is where the money for that particular payment would be sent.
You can use this functionality even with a single payment on the order, though. So you can just setup a single payment and include that SELLERPAYPALACCOUNTID parameter, and the money will go directly to that account.
When doing this you can use your own API credentials and no permissions or anything are required from the 3rd party account to send the funds directly to them.
This PayPal PHP SDK will make the Express Checkout API calls very quick and easy for you, so you could just setup some simple PHP services to hit from your mobile app(s).
i had done simple payment and reccuring payment in paypal using php..but now i want do payment like ebay system..i want manage seller account,middle patry account,buyer account. when buyer order for any product that time money tranfer from buyer account to middle party account and when buyer got product at that time money tranfer from middle party to seller account..i want make this system using php..i tried for create customer and add charge in stripe..but i dont know how to deduct charge from middle party in stripe php api
You can check the whole Stripe API available for PHP at this link and check what meets your needs:
https://stripe.com/docs/api?lang=php#intro