These days many credit card issuers have online support, which allows you to perform most of your account management. This may include canceling your credit card. However, this will depend on your provider. Some providers still require that you call a customer support line to complete the account closure, while others allow you to fully complete the process online.
If you’re unsure whether you can cancel your credit card online, check on your card provider’s website.