I want to transfer the amount to the connected account from the platform.
I have tried Transfer Api But we have a limitation we can not send amounts outside of platform origin.
Now I want to transfer the amount with the help destination charges api but in this, we do not have any payment method because the customer is not involved in this process. In this API payment method is required to complete the transaction.
\Stripe\PaymentIntent::create([
'amount' => (int) $amount * 100,
'currency' => 'USD',
'transfer_data' => [
'destination' => {{connected_account_id}},
],
'on_behalf_of' => {{connected_account_id}},
]);
Is any other way to transfer the amount to the connected account ??
Related
Hi i'm using the stripe PHP API to build a platform for a client, the platform is selling monthly subscription to author content on a monthly basis I have a deal with my client to share 50% of the fees we taking on each subscriptions.
I used this snippet to make the subscription:
$stripe->subscriptions->create([
'customer' => '{{CUSTOMER}}',
'items' => [['price' => '{{PRICE}}']],
'expand' => ['latest_invoice.payment_intent'],
'application_fee_percent' => 10,
'transfer_data' => ['destination' => '{{CONNECTED_STRIPE_ACCOUNT_ID}}'],
]);
I was wondering if how i can transfer my half of the 10% automatactly and monthly to an other connected acconunt (mine)... Can someone help me with that?
Given the subscription is on the platform, you can transfer funds to multiple connected accounts after the charge.
Alternatively, you can keep the same code you shared here and then transfer the 5% from the application fee to the other connected account separately. You’d listen to invoice.paid Event and when creating the transfer, pass the source_transaction parameter which transfers funds from a charge. These funds will not become available until the original charge is settled.
I'm creating service like Airbnb using Laravel. So I'm using stripe payment gateway for my project. So I want to create escrow system using stripe. Let's say someone book properties of seller ABC for 3 days. On booking amount is debit from buyer's account and credit to the admin Account. Now on journey completion seller ABC get his money and Admin get his commission from booking. So we have to transfer money to seller account only when journey is complete.
So I'm using following method to achieve this following methods.
Payment Authorization
\Stripe\Stripe::setApiKey('sk_test_****');
\Stripe\PaymentIntent::create([
'amount' => 1099,
'currency' => 'inr',
'payment_method_types' => ['card'],
'capture_method' => 'manual',
]);
Payment Capture
\Stripe\Stripe::setApiKey('sk_test_*****');
$intent = \Stripe\PaymentIntent::retrieve('pi_****');
$intent->capture(['amount_to_capture' => 750]);
Transfer Payment
// Create a Transfer to a connected account (later):
$transfer = \Stripe\Transfer::create([
'amount' => 7000,
'currency' => 'inr',
'destination' => '{{CONNECTED_STRIPE_ACCOUNT_ID}}',
'transfer_group' => '{ORDER10}',
]);
But it's not working properly because I'm getting following error.
Funds can't be sent to accounts located in IN because it's restricted outside of your platform's region;
Can someone please guide me to achieve my requirements.
It seems Stripe only accepts INR payouts within India.
Is your stripe account within India?
Stripe currently does not support the ability to receive INR payouts from Stripe accounts registered outside of India.
Stripe support documentation
I am developing a small online marketplace in WordPress for a client and I am using Stripe Connect. What I am trying to accomplish is:
User A is posting a project, User B bids for this project, gets accepted and delivers the work.
User A now has to pay the agreed amount for the deliverable
User A gets his card charges, Platform account gets the application fee, Stripe gets the Stripe fee, User B gets paid with the remaining amount
I have created the following function with payment intent, destination charge and application amount fee as described here: https://stripe.com/docs/connect/collect-then-transfer-guide
function destination_charge(){
// Set your secret key. Remember to switch to your live secret key in production!
\Stripe\Stripe::setApiKey('sk_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx');
$payment_intent = \Stripe\PaymentIntent::create([
'payment_method_types' => ['card'],
'amount' => 1000,
'currency' => 'usd',
'application_fee_amount' => 123,
'transfer_data' => [
'destination' => 'acct_UserB',
],
]);
}
So if I understand the docs and the concept correctly, when User A triggers the above function, User A gets charged $10 on his card, application takes $1.23 fee and User B gets the remaining amount. Stripe deducts its service fee from the application. Although I am not charging anything from a form, since User A is a verified connected account with card details already in Stripe Connect.
Unfortunately this is not the case though and even if I try separating charges from transfers, as described here: https://stripe.com/docs/connect/charges-transfers, it's not working either.
Stripe Connect is setup for US businesses, USD currency. I am using Express Accounts on a test environment.
Side note: I already tried using top-ups in order to add test funds and create balance, but the "add to balance" button is not available for some reason. https://stripe.com/docs/connect/top-ups
What am I missing here? Is destination charges the right choice for what I am trying to accomplish?
Any suggestion would be helpful.
Thanks.
You can try to use the stripe-account header. By using this, you are simply making the request on-behalf of the connected account. The payment will automatically be credited to the connected account.
$payment_intent = \Stripe\PaymentIntent::create([
'payment_method_types' => ['card'],
'amount' => 1000,
'currency' => 'usd',
'application_fee_amount' => 123,
], ['stripe-account' => 'acct_UserB']);
}
\Stripe\PaymentIntent::confirm(
$payment_intent->id,
['payment_method' => 'pm_card_visa']
);
The scenario is there are 3 users in our website, Admin, Sender and Receiver.
Sender send payments to Receiver, but in our website Sender not directly send the payment to Receiver, the amount holds on Admin Stripe account and after the confirmation Receiver receive the payment from Admin Stripe account. For this process I create a platform from Admin Stripe Account , now Sender and Receiver both are connected to that platform.
Below are the codes we are using:
Sender Send Payment To Admin Strip Account
\Stripe\Stripe::setApiKey("sk_test_ADMIN_KEY");
\Stripe\Charge::create(array(
"amount" => 400,
"currency" => "usd",
"source" => "tok_18uL5yIXv4Heg2KDdPHJFo8A", // obtained with Stripe.js
"description" => "Charge for abigail.white#example.com"
));
Receiver Receive Payment From Admin Stripe Account
\Stripe\Stripe::setApiKey("sk_test_ADMIN_KEY.....");
\Stripe\Charge::create(array(
'amount' => 400,
'currency' => 'usd',
'source' => $token,
'destination' => 'acct_...' //
));
and more all of three users have their stripe accounts, and on test mode all of three have $0 Available Balance. and Amount is not added to Receiver Stripe Account after using the above code.
When accepting payments on behalf of third-parties, you cannot hold funds on the platform's account ("Admin"). For compliance reasons, you must set the destination account when you create the charge.
\Stripe\Stripe::setApiKey("sk_test_..."); // platform's API key
\Stripe\Charge::create(array(
'amount' => 400,
'currency' => 'usd',
'source' => $token,
'destination' => 'acct_...' // connected account's ID
));
This will charge the customer (via the payment method in $token) and add the funds to the connected account's balance. Once the funds become available, they can be transferred account to the connected account's associated bank account.
Note that because this charge is created "through the platform" (i.e. with the destination parameter), the platform will pay Stripe's fees and be responsible for chargebacks and refunds (cf. here). Because there is no application_fee parameter, the platform will effectively lose money on this transaction, as it will pay for Stripe's fees but not receive anything.
If you're using managed accounts, then you (as the platform) are also in control of transfers to the associated bank account. You can read more about this here.
With standalone accounts, the platform does not have control over bank transfers -- instead, each standalone account's owner does, via their own account settings.
I am creating e-Com website. In which I am using stripe payment. The goal is we charge the user and then send amount to admin account and 80% of total charge transfer into vendor account.
The user payment working fine. In stripe admin account i can see the amount is increases per transaction. And vendor amount transfer is also working fine. In stripe admin account ,The Transfer link on left side showing all transfer history.
But when i login to vendor stripe account , I am getting $0 amount. Because transfer was not done.
Here is my transfer code:
$transfer = \Stripe\Transfer::create(array(
"currency" => "usd",
"recipient" => "rp_16lDd5AjH6fE1nozBz8hoQMY",
'amount' => $amount,
//'destination' => "ba_16lDe5AjH6fE1noz5V8oSTzU",
'destination' => "ba_16nn5nAjH6fE1nozX6xpp6JA",
"failure_message" => null,
"failure_code" => null,
)
);
It gives me success msg. After 2-7 days transfer amount not transferred into vendor stripe account. Please help me out.