I am trying to use We Pay as my payment provider. I would like to know if it is possible to add We Pay as a payment provider using a code
You can do that.
With the Wix Ecom Backend API, you can get orders so you can send data to the payment provider, then update payment status if needed: wix-ecom-backend - Velo API Reference - Wix.com