#amepro
1 messages · Page 1 of 1 (latest)
Can you share any example payment IDs? pi_xxx
That works too
ok but why does it tell me that I have no funds? shouldn't it use the funds from the customer's payment?
Or is this because I'm using the test credit cards that Stripe provides?
If you share an ID I can look at I can see what's going on
which id? mine or that of the express courier that I generated via connect?
I suspect you may need to use a different card to bypass the pending balance to funds are immediately available: https://stripe.com/docs/testing#available-balance
The ID of a payment you've created would be great
Can you paste that here
Taking a look
ok thanks
Where does it tell you you have no funds?
yes i'm using laravel
Can you share the ID (req_xxx) of the failing API request? https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
ok one moment
this the log
[2022-12-19 09:54:05] local.INFO: Stripe_Event ["payment_intent.succeeded",{"Stripe\StripeObject":{"order":"29"}},{"Stripe\Event":{"id":"evt_3MGg2pLKgAwrDGTa0sqhJl9z","object":"event","api_version":"2022-11-15","created":1671443644,"data":{"object":{"id":"pi_3MGg2pLKgAwrDGTa0ycAzBSh","object":"payment_intent","amount":1400,"amount_capturable":0,"amount_details":{"tip":[]},"amount_received":1400,"application":null,"application_fee_amount":null,"automatic_payment_methods":null,"canceled_at":null,"cancellation_reason":null,"capture_method":"automatic","client_secret":"pi_3MGg2pLKgAwrDGTa0ycAzBSh_secret_kqukT860m47VatF8lYSm5kM79","confirmation_method":"automatic","created":1671443643,"currency":"eur","customer":null,"description":null,"invoice":null,"last_payment_error":null,"latest_charge":"ch_3MGg2pLKgAwrDGTa0s7HMFZv","livemode":false,"metadata":{"order":"29"},"next_action":null,"on_behalf_of":null,"payment_method":"pm_1MGg2oLKgAwrDGTa2ru5MRVE","payment_method_options":{"card":{"installments":null,"mandate_options":null,"network":null,"request_three_d_secure":"automatic"}},"payment_method_types":["card"],"processing":null,"receipt_email":null,"review":null,"setup_future_usage":null,"shipping":null,"source":null,"statement_descriptor":null,"statement_descriptor_suffix":null,"status":"succeeded","transfer_data":null,"transfer_group":"29"}},"livemode":false,"pending_webhooks":2,"request":{"id":"req_aQrwzXLzL6SEzd","idempotency_key":"9dc06e5f-53b6-431d-9791-aaf784d61f4a"},"type":"payment_intent.succeeded"}}]
I'm not seeing an error there. That's just a Payment Intent object from an Event
Did you try processing the same payments with the test cards here: https://stripe.com/docs/testing#available-balance ?
I always use these test credit cards
The specific available balances ones, like 4000000000000077?
pi_3MGg2pLKgAwrDGTa0ycAzBSh used the 4242 card
Those funds won't be available immediately, they're in a pending state (like a normal card payment)
You need to use the available balance cards I've linked
ok I did as you told me but in the connect account I still can't find anything, while in my dashboard I found the payment for the product and the shipping money seems to have disappeared
How are you transferring funds to the connected account? There's no parameters on that Payment Intent that would send a balance to any connected accounts
in this way
Stripe::setApiKey(env('STRIPE_SECRET'));
// Create a Transfer to a connected account
$transfer = Transfer::create([
'amount' => number_format($orderCourier->shipment_price, 2, '', ''),
'currency' => 'eur',
'destination' => env('STRIPE_COURIER_ID'),
'transfer_group' => $order->id,
]);
Can you share an example req_xxx for one of those API requests?
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
req_ttGQ2A5QhsjSSB
That's not an API request for the transfer, that's for the original payment
What is it you're trying to do exactly?
I buy a product that costs $10 and shipping costs $5
$10 must end up in my account while the $5 for shipping automatically goes to the courier
Looks like you're using Checkout? Then you can just pass these params when you create your session to automate the transfer: payment_intent_data.application_fee_amount & payment_intent_data.transfer_data[destination]
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I don't understand the question
i've tried in this way:
$intent = [
'transfer_group' => $order->id,
'metadata' => ['order' => $order->id],
] ;
if ($this->order['shipment'] == true){
$intent['transfer_data'] = [
'destination' => env('STRIPE_COURIER_ID'),
'amount' => number_format($this->order['shipment_price'], 2, '', ''),
];
}
$payment = $stripe->checkout->sessions->create([
'mode' => 'payment',
'success_url' => route('tpage', ['orderid' => $order->id]),
'cancel_url' => 'https://example.com/cancel', //TODO
'line_items' => $products,
'payment_intent_data' => $intent,
]);
but doesn't work
What do you mean by 'doesn't work'? Did it return an error?
Can you share the cs_xxx ID that API call created?
the problem is the shipment can be more then products cost
how can i manage this problems?
req_Ryt33Zviks0qbU?t=1671449734
I don't really follow, you passed an amount of 14 EUR but try to transfer 277 EUR so that naturally won't work. You can look at the log in the dashboard to see what your code passed.
my bad