#crenon
1 messages · Page 1 of 1 (latest)
Hi again, sorry to bother you
I'm getting a similar error, but now it's when i'm creating a payment intent in a cron task
the server code is this:
'amount' => intval($row['recurring_amount'] * 100),
'customer' => $row['stripe_customercode'],
'currency' => 'usd',
'transfer_data' => ['destination' => $row['stripe_destination']],
'off_session' => true,
'confirm' => true,
'payment_method' => $row['stripe_paymentmethod'],
'application_fee_amount' => $fee,
'capture_method' => 'manual',
'metadata' => ['dp_recurring_profile' => $dp_recurring_profile],
], ['stripe_account' => $row['stripe_destination']]);```
seems we're getting back \Stripe\Exception\InvalidRequestException
("Invalid Parameters")
Can you share the request id where you're seeing the error please?
Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
e
oops one sec
req_NoVTRV9aXlPUbi
oh, i see that the full error is " The 'transfer_data[destination]' param cannot be set to your own account"
I'm not sure what that means... the destination account is the connected account's stripe destination, isn't that correct?
I think there is a confusion on how the different connect charge flows work.
yeah i think so
Typing up...
thanks very much
By using the Stripe Account Header, you're making a direct charge: https://stripe.com/docs/connect/direct-charges. With direct charges, the object live on the Connected Account.
However, with destination charges, the objects live on the Platform account: https://stripe.com/docs/connect/destination-charges
On the above request, you are mixing the 2. The Stripe Account header, tells Stripe that you're making a Direct Charge on the Connected Account. Then, you also pass a 'transfer_data[destination]' parameter which tells us to transfer funds to the the same Connected Account.
This won't work, you either choose one or the other.
ah ok that makes sense
i'd rather use the destination charge, but i'm getting the error we were working on earlier when I try to do that
one sec and I'll tell you the error
(Status 400) (Request req_lb9w8IIRVKdpqj) No such PaymentMethod: 'pm_1Mtx9aFdcT75LYXenPC88i3L
earlier you helped me add the account header to fix that problem, but it sounds like that's not the solution this time
In this case, you want to make sure that your objects belong to the Platform account.
It looks like you asked migrations to migrate to a different account
I would reach out to support here to clarify next steps
Our support team will be able to assist you better than I can: https://support.stripe.com/contact
well it seems like migrations placed the payment methods on the correct connected accounts, but is it looking like they set the platform account incorrectly on those payment methods?
I'll definitely reach out to migrations, but I suspect I won't hear back until next week so any help you can provide is much appreciated
For instance, do you think I could get these processing as direct charges by omitting the 'transfer data' param, but including the account header?
any downside to trying that?
thanks very much!
That would just create a direct charge
It depends on what you wanted and what you communicated to migrations
In short, yes, that would work.
But I'm not entirely sure what you're trying to do
am i understanding the docs that the difference between destination and direct is the ability to charge the platform fee?
And the fees that are applied, the merchant of record on the payment and statement descriptors etc... I would read the documents thoroughly
it seems like you can pass application_fee_amount on direct charges
hm
ok i'll read up about the differences, and I'll ask migrations why destination charges aren't working on these payment methods
right?
Did you want these payment method to be migrated to your connected accounts? Or your Platform account?
What is your intended charge flow?
the methods should only be used for payments to the specific connected account, so i think we want them on the connected account
sounds like direct charges are the way to go in that case
can i ask you one more thing?
Sure!
when a payment intent for a direct charge is set up, does it trigger different notification webhooks than a destination charge?
if not, i think we should be able to switch to direct charges pretty smoothly
You would want to listen to connect account webhooks: https://stripe.com/docs/connect/webhooks
Again, I would read through the documents carefully and then decide what flow works best for your business use.
great, thanks very much