I'm trying to connect through stripe object and derive the destination account, and then try and retrieve the customer object id, and eventually the available payment methods with the attached last 4 digits of either the bank account or card associated with the customer id.
require_once 'stripe-php-master/init.php';
$stripe = new \Stripe\StripeClient(
$STRIPE_API_KEY
);
$link = $stripe->accounts->retrieve(
$STRIPE_DEST
[]
);
$paymentMethods = $stripe->paymentMethods->all([
'customer' => $customer,
'type' => 'card',
]);
$last4 = $paymentMethods->sources->data[0]->last4;