Get Stripe Connected AccountsID Using Client Address Email - stripe-payments

Using Stripe API, I built a Marketplace App. When the clients add their account to my stripe connect, I'm trying to get the client AccountID so I can do payout processing.
For the moment, I'm using Stripe's object (List all connected accounts). It returns a JSON object but I don't know how to get the client AccountID using client email address.
If anyone can help me to do this using cURL or PHP or java ...

There is no way to fetch or list Stripe Accounts by email address using the Stripe API.
The best approach would be to store an account ID to email address mapping on your end so you can find the account ID without listing all accounts using the Stripe API.

Related

Store data in Stripe to be sent back as part of web hook data?

I am working for the first time with Stripe. I am using stand alone accounts. I have a platform account also. In my web site a number of people with different Stripe accounts will be opening up campaigns for which money can be donated by various donors. Each campaign owner has a separate stripe account and the platform will be charging through the campaign owner's stripe account.
So what it amounts to is the platform account will be charging for a number of campaigns through each campaign owner's Stripe account. My problem is related to web hooks. One point to remember is each campaign has an id associated with it in the database and I am storing the API key of each campaign owner's stripe account and associating it with this id. To get Stripe data from the web hook in the web hook end point I have to set the API key of the connected account with a statement like:
\Stripe\Stripe::setApiKey("api key of stand alone account");
$input = #file_get_contents("php://input");
The trouble with this is there is one web hook end point for a number of Stripe accounts. I cannot hard-code the API key in the above statement. I have to fetch the appropriate API key from my database using the id.
But when Stripe invokes the web hook end point I simply do not have the campaign id with me in order to fetch the appropriate API key and set the API key. Is there any solution around this?
You don't need to store each account's API key. The only information you need to store is the account ID ("acct_..."). With standalone accounts, your integration will receive the account ID in the last step of the OAuth flow, in the stripe_user_id parameter.
You can then issue API requests on behalf of this account by using your own (the platform's) API key, and the Stripe-Account header.
Regarding webhooks specifically, events sent to your server via a "Connect" endpoint will include a user_id field with the account ID. So you can do something like this:
\Stripe\Stripe::setApiKey("PLATFORM_API_KEY");
$input = #file_get_contents("php://input");
$event_json = json_decode($input);
$user_id = $event_json->user_id;
// if you need to send an API request on behalf of this account,
// for example if you want to verify the event by fetching it from
// Stripe, you can use the Stripe-Account header:
$event = \Stripe\Event::retrieve(
$event_json->id,
array("stripe_account" => $user_id)
);

Is that possible to pay someone using their registered Email ID on STRIPE

i m building a online selling store like ebay and I want to pay sellers by using their registered STRIPE email ID (foobar#example.com) (like paypal do so) without connecting him/her in my stripe platform .
Remember I want pay seller using his stripe Email Id not stripe account Id which looks like acct_123dsfg****
if you know how to do that please let me Know :) Thanks
Using stripe gateway you can pay your seller's by following 2 methods only:
1) Seller can configure their stripe account from store dashboard (by adding their publishable key and secret key) and site admin transfer the appropriate amount into seller account.
2) Using stripe connect ( https://stripe.com/docs/connect ).
I think currently stripe do not provide any such functionality that you can pay your seller's using their stripe email id only.

How to send Billing information with Stripe token for validation checks

I have got a stripe token from stripe js, Now I want to charge the customer. How do I send the billing address along with the stripe token for charging. My objective is to validate zip code and address_line1 which I have enabled at the stripe dashboard.
Note:- I can send the billing info without using a stripe token, by using the card details entered. I want to do it using the token received. Is it possible?
The best solution is to send the billing address details when creating the token with Stripe.js This is covered in the createToken() documentation where it lists all the fields you can provide.
Otherwise, you would save the card on a customer first and then use the Update Card API on the server to provide the billing address.

Generating invoice email using Webhook in Stripe and Mailchimp

Can anyone please tell me (or point me in the direction) how to generate an invoice email using webhook api in stripe with the mailchimp account?
You actually can't do that directly because you can't create a MailChimp endpoint which receives data through the web. You need an intermediary layer in between Stripe and MailChimp, which receives data from Stripe, validates the data, converts the data according to your needs, and using MailChimp API sends it to MailChimp to be sent out as an email. But an easier approach will be (in my opinion) creating an in-house solution for sending out emails instead of using MailChimp.

PayPal API Rest & Merchant e-mail account

this is my question:
Is it possible to use the PayPal API Rest with my API-KEY, but with different merchant e-mail account for accept a payment?
I need to allow the users of my web application to connect their paypal account to receive payments on their paypal account. So can i set the target merchant e-mail of a payment using API REST or CLASSIC API?
Thanks in advance
Unfortunately REST API does not have this functionality at this time. To do this you can use Adaptive Payments to be the caller of the API and supply receiver email addresses, or Permissions API to make Classic API calls for other users.

Resources