WePay error

Looks like the issue might have been how I had WePay setup. I reached out to WePay support and they had to delete some duplication I had going on in the account there. However, what is the proper way to create the WePay account and link it to Invoice Ninja when doing a self-hosted setup?

I added the:

WEPAY_CLIENT_ID=
WEPAY_CLIENT_SECRET=
WEPAY_ENVIRONMENT=production # production or stage
WEPAY_AUTO_UPDATE=true # Requires permission from WePay
WEPAY_FEE_PAYER=payee
WEPAY_APP_FEE_CC_MULTIPLIER=0
WEPAY_APP_FEE_ACH_MULTIPLIER=0
WEPAY_APP_FEE_FIXED=0
WEPAY_THEME='{"name":"Invoice Ninja","primary_color":"0b4d78","secondary_color":"0b4d78","background_color":"f8f8f8","button_color":"33b753"}' # See https://www.wepay.com/developer/reference/structures#theme

to my .env file. However from what WePay support is saying is I need to create the account through Invoice Ninja but I cannot do that without the Client ID and Client Secret correct?

So what is the proper way/order to set this up?

Please see my response here:

https://www.invoiceninja.com/forums/topic/wepay-integration-into-self-hosted/#post-9112

Right I got that I need the Client_ID and Client_secret in the .env. My problem is that WePay is saying that I was not supposed to sign up directly with them but rather through Invoice Ninja. But I cannot get WePay to show ip in Invoice Ninja until AFTER I have put in those items. So I have reached out to the WePay API team for explanation. Hopefully they will get back to me soon.

I’d suggest clarifying that you’re self hosting the app. You need to create your own WePay application as you don’t have access to our credentials.

Right, I did that and that is when support pointed me to the api team. I guess I did something wrong the first time in creating the application causing the postal code error. Just no where that I have found has an exact “this is what you do” guide. Just a “create api application” here and “put this in the env file” there. I am almost positive I am missing a step somewhere. If you have a guide on how to do this I would be greatly appreciative.

We don’t have a guide, those are the basic steps.

As mentioned previously my guess would be it’s related to the WePay API version, they made a change to the address format which caused this problem in the past.

I have created another account (the first was deleted by WePay when they were clearing out the bogus API aplications created by Invoice Ninja as mentioned below) with WePay and added the WEPAY_CLIENT_ID and WEPAY_CLIENT_SECRET to my .env file. Whenever I go in Invoice Ninja and add the payment gateway for WPpay it has me sign up yet again to WePay. Even though it goes under the same account, this creates yet another API Application in WePay. This is what causes me to get the postalcode error that began this whole deal. Is it perhaps no one has yet to fully test the self hosted install with WePay yet? I have no doubt it works great in the hosted version but that is not what I am running.

You need to first create the WePay application and then sign up in the app. Signing up with WePay in the app creates a WePay user account, not an application. If you already have a WePay user account you should be able to login in with your existing credentials.

I believe other self-host users have setup WePay but it isn’t common.

Maybe that is the issue. When I setup the API Application in WePay I might not be setting something up correctly. It only asks for the website and description, which I give it. Invoice Ninja still tries to create another API application. Is there a certain way I need to setup the API Application in WePay to make it work with Invoice Ninja? I have reached out to the WePay API team and they say typically I shouldn’t be creating an account with them that Invoice Ninja should do it for me but they understand I am self hosted. They asked to get you in the email thread but I don’t have contact information so I pointed them to this thread. Hopefully we can get this worked out. As soon as we do I plan to do a thorough walk through so no one else has to deal with this! :slight_smile:

Our email is contact@invoiceninja.com, feel free to add us to the thread.