createInvoice( '12.50000000', 'USDT', 'Customer', 'customer@example.com', $orderId, 'https://merchant.example/payment-callback', 'merchant-order-'.$orderId ); $paymentLink=(string)( $invoice['payment_link'] ?? '' ); if($paymentLink===''){ throw new RuntimeException( 'Hosted checkout link missing.' ); } header( 'Location: '.$paymentLink, true, 303 ); exit;