public function createOrder(array $data, $klarnaIdempotencyKey = null)
    {
        $headers = ['Content-Type' => 'application/json'];
        if (!is_null($klarnaIdempotencyKey)) {
            $headers['Klarna-Idempotency-Key'] = $klarnaIdempotencyKey;
        }

        return $this->request(
            'POST',
            $this->getLocation() . '/order',
            $headers,
            $data !== null ? \json_encode($data) : null
        )
        ->status('200')
        ->contentType('application/json')
        ->getJson();
    }