Design a Payment SystemPayment systems are the backbone of e-commerce. A bug here does not just cause a…