#memekyTeam
1 messages ยท Page 1 of 1 (latest)
What am I doing wrong, thanks?
Hello ๐
Typically users rely on receiving webhook events in order to be notified about balance being available
You'd listen for balance.available event
https://stripe.com/docs/connect/webhooks#:~:text=and direct charges-,balance.available,-Occurs when your
I think I have explained myself badly.
I want to know through the api this information
$intent = \Stripe\PaymentIntent::retrieve('pi_3MMXAwFX2ddxx3Qo1hCKmRCX');
$latest_charge = $intent->latest_charge;
$time = $stripe->charges->retrieve(
$latest_charge,
['expand' => ['latest_charge.balance_transaction.available_on']]
);
$paymentMethod = $time->latest_charge->balance_transaction->available_on;
The $time function is wrong, can you write it to tell me when I will receive that payment as shown in the image?
available_on is not an expandable property
https://stripe.com/docs/api/balance_transactions/object#balance_transaction_object-available_on
So once you retrieve the charge and the balance transaction
$latest_charge,
['expand' => ['latest_charge.balance_transaction']]
);```
you'll want to look at the charge->balance_transaction['available_on'] property
sorry for the language we are from spain and sometimes we don't translate well
Sure thing!
I can pass this value to 3-24-2022 15:00:23 or how do I interpret it? What is it ??
*3-04-2023 15:00:23
let unix_timestamp = 1549312452
// Create a new JavaScript Date object based on the timestamp
// multiplied by 1000 so that the argument is in milliseconds, not seconds.
var date = new Date(unix_timestamp * 1000);
// Hours part from the timestamp
var hours = date.getHours();
// Minutes part from the timestamp
var minutes = "0" + date.getMinutes();
// Seconds part from the timestamp
var seconds = "0" + date.getSeconds();
// Will display time in 10:30:23 format
var formattedTime = hours + ':' + minutes.substr(-2) + ':' + seconds.substr(-2);
ok I found this I think it will help
thanks for everything it has helped me a lot
NP! ๐ Glad I could help
have a nice day excellent service ๐
You too! ๐ Good Luck