paymentLinks->create(["amount" => ["currency" => "EUR", "value" => "10.00"], "description" => "Bicycle tires", "webhookUrl" => "{$protocol}://{$hostname}{$path}/webhook.php"]); /* * Send the customer off to complete the payment. * This request should always be a GET, thus we enforce 303 http response code */ \header("Location: " . $paymentLink->getCheckoutUrl(), \true, 303); } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . \htmlspecialchars($e->getMessage()); }