#nerdslice_api
1 messages ¡ Page 1 of 1 (latest)
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- nerdslice_code, 2 days ago, 15 messages
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1251224086852538451
đ Have more to share? Add details, code, screenshots, videos, etc. below.
for 'destination' => $team['connect_id'],?
That is from our database we store their connect id and retrieve it
The code you posted might be truncated. Can you post the full API call function?
$paymentIntent = \Stripe\PaymentIntent::create(
[
'amount' => $total,
'currency' => strtolower($lane->country).'d',
'payment_method_types' => ['card_present'],
'capture_method' => 'automatic_async',
'transfer_data' => [
'amount' => (round($total, 2) - (round($total * .00003))) - 5,
'destination' => $team->connect_id,
],
//get package and determine percent to charge for fee.
//'tax' => $totaltax,
//'application_fee_amount' => 5,
//'processing' => 5
]
);
All i did was change processing fee to transfer_data
I jsut updated team['connect_id'] to team->connect_id
Still getting that same error
Do you need $team->$connect_id instead?
It's a syntax error, so something in the formatting is wrong
I am trying one thing it might be, using laravel cashier, so it might be the api version so I added , 'stripe_version' => '2024-04-10']
And yes I do I need to be able to transfer their funds from my account to theirs
No, I mean, this is a formatting error. Syntax errors mean that the code is written in a way that the interpreter/compiler cannot understand. So you need to poke around at the formatting of the request to see where you might have missed something.
My first guess is you need to add a $ to connect_id such that it looks like this --> $connect_id
That will break within laravel's eloquent
Huh, okay. So if you run your code, what's the full error message?
Are you still just getting syntax error, unexpected single-quoted string "transfer_data", expecting "]" ?
Yes I am
Hold on. Let me load this in my test integration
ok
Wait wait wait... what is that method syntax for the function?
Like, why this --> \Stripe\PaymentIntent::create(
Instead of this --> $stripe->paymentIntents->create(
Not sure how I glossed over that so easily
Think I got hung up on the transfer_data part of the request
OK I got it working
I changed to the later and did a couple items.
Thank you for at least being a sounding board to help me resolve this
But do have one other issue along with this
Sure thing! Glad we got you unblocked.
What's the next question?
Actually it might be that I did not number format my fee
Happens to the best of us
So for req_KmPLeTQCbTDhlg I do not see the instant transfer including the 3% reduction but it might be due to the fact that the fee is too small but unsure? We are wanting to charge the customer the rate and transfer the remaining
So like for $1 charge it should be $1.05 charged with tax and transfer $.92 to the customer
It looks like you set the transfer amount on the Payment Intent to 100 or $1.00. So $1.00 would be transferred to the Connect account, and $0.05 would have remained in the Platform's balance
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.