customers->page(null, 1)[0]; /* * Create a SEPA Direct Debit mandate for the customer */ $mandate = $customer->createMandate([ "method" => \Mollie\Api\Types\MandateMethod::DIRECTDEBIT, "consumerAccount" => 'NL34ABNA0243341423', "consumerName" => 'B. A. Example', ]); echo "
Mandate created with id " . $mandate->id . " for customer " . $customer->name . "
"; } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); }