How can I testing in local

Webhook isn’t working in local mode.
After I followed the docs, I can’t retrieves a payment at server side because I only have orderId not PaymentID

After you create a payment using Payment/Create, the output should contain a parameter called Id. This is your PaymentID. You can start monitoring the payment like this:

await connection.invoke('SubscribeToPayment', paymentId);
 
connection.on('PaymentUpdate', (payment) => {
    // Process payment data here
});

To get more information, you can view these docs: