Forum

Ask, reply and learn. Join the community of Akaunting.

New Discussion

Payment Method is Invalid Error in API

Irving Scott   ( User )

Commented 4 days ago

Hello,

Apologies if this is in the wrong category, but I don't see an "Errors and Issues" channel.

I'm trying to use the APIs in order to automate our revenue tracking. Unfortunately, I've run into an issue that I experienced in both the locally installed and now the hosted versions.

When I use the transactions and transfers APIs (i.e. /api/transactions) after a long delay, it seems like the "payment method" is no longer cached on the server, generating the error below:

{"message": "The payment method is invalid.", "errors": {"payment_method": ["The payment method is invalid."]}, "status_code": 422}

I think this is a caching issue because if I create a Transfer from the website, the APIs magically start working again. Is there a way to "prime" the payment method via API? If not, is there a way to make sure that the cached info is refreshed when the API call runs?

Thanks

Please login or register to leave a response.

Showing 1 to 1 of 1 discussions