Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

drewdan's avatar
Level 15

Epos Now API

Hey Guys,

Has anyone had any experience with the Eposnow API? I am trying to post request too it, but the documentation is just naff, and I can't get anything thats not a post request to work in the V4 API. The older v2 api works a treat, but given that its deprecated, I feel like I should be trying to use the V4, for example.

I absolutely expect this to fail given that I am only providing a forename, but:


protected $client;

    protected $endPoint;
    /**
     * summary
     */
    public function __construct() {
        $this->endPoint = 'https://api.eposnowhq.com/api/v4/';
        $this->client = new Client([
            'base_uri' => $this->endPoint,
            'auth' => [
                config('epos.key'), config('epos.secret'),
            ],
        ]);
    }

    public function parseResponse($response) {
        return collect(json_decode($response->getBody()->getContents(), true));
    }

    public function addCustomer(array $array) {
        try {
            return $this->parseResponse($this->client->post(
                'Customer',
                [
                    'form_params' => [
                        'Forename' => 'Fooo',
                    ],
                ],
            ));
        } catch (\GuzzleHttp\Exception\RequestException $e) {
            throw $e;
        }
    }

I get a 200 back from the server, no error messages, as if nothing has actually happened. I check the user list and no user has been added. The url for the api is here: https://developer.eposnowhq.com/Docs/v4/index#!/Customer/CustomerPOSTByitems

Any tips anyone could provide would be amazing.

Thanks in advance.

Andrew

0 likes
3 replies
marcomucc's avatar

Hi drewdan! I'm having the same issue. Did you ever discover a resolution?

Thanks!

Marco

drewdan's avatar
Level 15

Hi Marco,

Sadly I did not. I contacted their support and they were less than helpful too. I suspect the endpoint is incorrectly returning a 200, even though nothing has happened.

In the end, I wrote my own epos application and an API for it instead! It's not quite ready yet, but I plan on making the software open source for other people to use.

I hope you have better luck than me!

Andrew

Please or to participate in this conversation.