#dheeraj_44691

1 messages · Page 1 of 1 (latest)

hollow pagodaBOT
low nexus
hardy gale
#

not api key

#

which api to use ?

low nexus
#

Ah I see!

hardy gale
#

Can only apply an application_fee_amount when the PaymentIntent is attempting a direct payment (using an OAuth key or Stripe-Account header) or destination payment (using transfer_data[destination]).

#

how can this problem be fixed ?

low nexus
hardy gale
#

My platform is in Canada
and I am trying to send Money to USA account.

reef oar
#

Hi! I'm taking over from my colleague. Please, give me a moment to catch up.

hardy gale
#

Uncaught (Status 400) (Request req_LDm0HrzaQkrKZX) Funds can't be sent to accounts located in US because it's restricted outside of your platform's region; please contact us via https://support.stripe.com/contact for details

reef oar
#

I think we've been talking yesterday, right?

#

You can't send funds from Canadian Platform to a Connected account in USA, unfortunately.

hardy gale
hardy gale
#

$charge = \Stripe\Charge::create([
'amount' => 1000, // Amount in cents
'currency' => 'usd',
'source' => 'tok_visa', // Payment source (token or card details)
'on_behalf_of' => 'acct_1hvggvGFHg4FKe0LC', // Recipient's Stripe account ID
]);
print_r($charge);
// Create a transfer from your platform's account to the seller's account
$transfer = \Stripe\Transfer::create([
'amount' => 800, // Amount in cents (after deducting platform fee)
'currency' => 'usd',
'destination' => 'acct_1Ng8nGFHpphyv', // Recipient's Stripe account ID
]);

// Handle success or error responses
if ($charge && $transfer) {
echo "Charge and transfer successful!";
} else {
echo "Charge and transfer failed.";
}

reef oar
#

Your code is correct, but because of the above limitation, it won't work.

hardy gale
#

so when will it be ok

reef oar
#

I think you might be able to ask Stripe Support to enable this for you: https://support.stripe.com/?contact=true

But otherwise, you will need to have a separate Stripe account in the US (and probably register a company there).